Merge lp:~vanvugt/unity/fix-1037408 into lp:unity

Proposed by Daniel van Vugt
Status: Merged
Approved by: Tim Penhey
Approved revision: no longer in the source branch.
Merged at revision: 2594
Proposed branch: lp:~vanvugt/unity/fix-1037408
Merge into: lp:unity
Prerequisite: lp:~vanvugt/unity/fix-1037949-1036528
Diff against target: 71 lines (+3/-33)
2 files modified
plugins/unityshell/src/unityshell.cpp (+3/-28)
plugins/unityshell/src/unityshell.h (+0/-5)
To merge this branch: bzr merge lp:~vanvugt/unity/fix-1037408
Reviewer Review Type Date Requested Status
Sam Spilsbury (community) Approve
Review via email: mp+120358@code.launchpad.net

Commit message

Always paint the shell separately per output. Otherwise the logic for
deciding whether the shell should be painted on a given monitor makes no
sense and the shell is often not painted at all. (LP: #1037408)

This also appears to resolve VBO and FBO rendering bugs:
(LP: #1036568) (LP: #1036569)
and Benchmark painting:
(LP: #1036609)

Description of the change

See commit message.

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Also seems to fix bug 1036569 and bug 1036568 !?

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

And fixes bug 1036609 !?

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

I have no idea why the code was even doing this anyways. +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/unityshell/src/unityshell.cpp'
--- plugins/unityshell/src/unityshell.cpp 2012-08-20 09:53:25 +0000
+++ plugins/unityshell/src/unityshell.cpp 2012-08-20 09:53:25 +0000
@@ -209,10 +209,6 @@
209 CompositeScreenInterface::setHandler(cScreen);209 CompositeScreenInterface::setHandler(cScreen);
210 GLScreenInterface::setHandler(gScreen);210 GLScreenInterface::setHandler(gScreen);
211211
212#ifdef USE_MODERN_COMPIZ_GL
213 gScreen->glPaintCompositedOutputSetEnabled (this, true);
214#endif
215
216 PluginAdapter::Initialize(screen);212 PluginAdapter::Initialize(screen);
217 WindowManager::SetDefault(PluginAdapter::Default());213 WindowManager::SetDefault(PluginAdapter::Default());
218 AddChild(PluginAdapter::Default());214 AddChild(PluginAdapter::Default());
@@ -1308,37 +1304,16 @@
1308 if (doShellRepaint && !force && fullscreenRegion.contains(*output))1304 if (doShellRepaint && !force && fullscreenRegion.contains(*output))
1309 doShellRepaint = false;1305 doShellRepaint = false;
13101306
1311#ifndef USE_MODERN_COMPIZ_GL
1312 if (doShellRepaint)1307 if (doShellRepaint)
1308#ifdef USE_MODERN_COMPIZ_GL
1309 paintDisplay();
1310#else
1313 paintDisplay(region, transform, mask);1311 paintDisplay(region, transform, mask);
1314#endif1312#endif
13151313
1316 return ret;1314 return ret;
1317}1315}
13181316
1319#ifdef USE_MODERN_COMPIZ_GL
1320void UnityScreen::glPaintCompositedOutput (const CompRegion &region,
1321 ::GLFramebufferObject *fbo,
1322 unsigned int mask)
1323{
1324 if (doShellRepaint)
1325 {
1326 bool useFbo = false;
1327 oldFbo = fbo->bind ();
1328 useFbo = fbo->checkStatus () && fbo->tex ();
1329 if (!useFbo) {
1330 printf ("bailing from UnityScreen::glPaintCompositedOutput");
1331 ::GLFramebufferObject::rebind (oldFbo);
1332 return;
1333 }
1334 paintDisplay();
1335 ::GLFramebufferObject::rebind (oldFbo);
1336 }
1337
1338 gScreen->glPaintCompositedOutput(region, fbo, mask);
1339}
1340#endif
1341
1342/* called whenever a plugin needs to paint the entire scene1317/* called whenever a plugin needs to paint the entire scene
1343 * transformed */1318 * transformed */
13441319
13451320
=== modified file 'plugins/unityshell/src/unityshell.h'
--- plugins/unityshell/src/unityshell.h 2012-08-10 15:11:21 +0000
+++ plugins/unityshell/src/unityshell.h 2012-08-20 09:53:25 +0000
@@ -123,11 +123,6 @@
123 const CompRegion&,123 const CompRegion&,
124 CompOutput*,124 CompOutput*,
125 unsigned int);125 unsigned int);
126#ifdef USE_MODERN_COMPIZ_GL
127 void glPaintCompositedOutput (const CompRegion &region,
128 ::GLFramebufferObject *fbo,
129 unsigned int mask);
130#endif
131126
132 /* paint in the special case that the output is transformed */127 /* paint in the special case that the output is transformed */
133 void glPaintTransformedOutput(const GLScreenPaintAttrib&,128 void glPaintTransformedOutput(const GLScreenPaintAttrib&,