UbuntuShape incompatible with Qt Scenegraph renderer batching strategy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu UI Toolkit |
Fix Released
|
High
|
Loïc Molinari | ||
ubuntu-ui-toolkit (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Vivid |
New
|
Undecided
|
Unassigned |
Bug Description
The default Qt Scenegraph renderer tries to assemble common primitives in the scenegraph into batches which it can use to reduce the number of draw calls and state changes. See
http://
for more info.
The UbuntuShape appears to break this batching behaviour.
You can see how Qt selects batches by setting QSG_VISUALIZE=
Here is a file which shows good batching:
import QtQuick 2.0
Item {
width: 400
height: 400
Grid {
columns: 100
Repeater {
model: 1000
delegate: Image {
}
}
}
}
If you run that with the QSG_VISUALIZE=
Now try:
import QtQuick 2.0
import Ubuntu.Components 0.1
Item {
width: 400
height: 400
Grid {
columns: 100
Repeater {
model: 1000
delegate: UbuntuShape {
image: Image {
}
}
}
}
}
and you'll see every delegate has a different color. This means Qt was unable to recognize that the delegates all had similar basis. If you run under apitrace, you'll see the GPU calls per frame are in the multiple thousands.
We really suffer from this lack of batching in listviews or gridviews where each delegate uses an UbuntuShape.
Related branches
- PS Jenkins bot: Approve (continuous-integration)
- Gerry Boland: Pending requested
- Florian Boucault: Pending requested
-
Diff: 58 lines (+23/-0)2 files modifiedmodules/Ubuntu/Components/plugin/shapeitem.cpp (+21/-0)
modules/Ubuntu/Components/plugin/shapeitem.h (+2/-0)
Changed in ubuntu-ui-toolkit: | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Loïc Molinari (loic.molinari) |
Changed in ubuntu-ui-toolkit (Ubuntu): | |
status: | New → Fix Released |
Fix committed into lp:~ubuntu-sdk-team/ubuntu-ui-toolkit/staging at revision None, scheduled for release in ubuntu-ui-toolkit, milestone Unknown