Merge lp:~vanvugt/unity/regionalDamage into lp:unity
Status: | Superseded | ||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Proposed branch: | lp:~vanvugt/unity/regionalDamage | ||||||||||||||||||||||||||||
Merge into: | lp:unity | ||||||||||||||||||||||||||||
Diff against target: |
493 lines (+203/-61) 8 files modified
launcher/AbstractLauncherIcon.h (+1/-0) launcher/Launcher.cpp (+11/-0) launcher/Launcher.h (+4/-0) launcher/LauncherIcon.cpp (+3/-0) panel/PanelController.cpp (+15/-0) panel/PanelController.h (+1/-0) plugins/unityshell/src/unityshell.cpp (+161/-59) plugins/unityshell/src/unityshell.h (+7/-2) |
||||||||||||||||||||||||||||
To merge this branch: | bzr merge lp:~vanvugt/unity/regionalDamage | ||||||||||||||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel van Vugt | Needs Fixing | ||
Unity Team | Pending | ||
Review via email: mp+110989@code.launchpad.net |
This proposal has been superseded by a proposal from 2012-06-22.
Commit message
Stop Unity from redrawing the shell on every frame (ie. when it doesn't need
to). It had a severe impact on graphics performance. (LP: #988079)
This especially improves OpenGL application performance and multi-monitor
desktop performance. Because unity was previously slowing down compiz
rendering by 20-40% for each monitor added to the system. This slowdown no
longer occurs as only damaged areas of the unity shell are repainted. Now
unity will not have any impact on compiz rendering performance for most
frames.
Coincidentally, this also fixes LP: #967112 and LP: #992516. Maybe more...
Description of the change
For me, this branch eliminates the 25-30% slowdown (compared to regular compiz) when unity is running with a single monitor. With 2 monitors, this branch eliminates the 75%(!) slowdown experienced when unity is running. Extrapolate and hypothesize as you like.
WARNING: This fix can only work if no window is redrawing _under_ a panel or launcher. If you have something drawing under the panel, launcher, tooltip or quicklist, then the shell will need to redraw and you won't get any performance benefit. Fixing that is a much bigger job and should be considered separate.
227 + /* ::opacity( ) but that would be slower opMode( ) && // Why must this != isViewable? ).contains( output) )
228 + * The shell is hidden if there exists any window that fully covers
229 + * the output and is in front of all Nux windows on that output.
230 + * We could also check CompositeWindow
231 + * and almost always pointless.
232 + */
233 + if (w->isMapped() &&
234 + w->isViewable() &&
235 + !w->inShowDeskt
236 + w->geometry(
What might be faster here is using the occlusion detection passes from core. That will take into account whether or not the window is truly occluded. Usually you can get this by checking gw->clip () in GLWindow.
This code won't work for windows that are semitransparent or have an alpha channel, which will work a little weird.