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

Proposed by Daniel van Vugt on 2012-08-20
Status: Merged
Approved by: Tim Penhey on 2012-08-21
Approved revision: 2581
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) 2012-08-20 Approve on 2012-08-20
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.
Daniel van Vugt (vanvugt) wrote :

Also seems to fix bug 1036569 and bug 1036568 !?

Daniel van Vugt (vanvugt) wrote :

And fixes bug 1036609 !?

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
1=== modified file 'plugins/unityshell/src/unityshell.cpp'
2--- plugins/unityshell/src/unityshell.cpp 2012-08-20 09:53:25 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2012-08-20 09:53:25 +0000
4@@ -209,10 +209,6 @@
5 CompositeScreenInterface::setHandler(cScreen);
6 GLScreenInterface::setHandler(gScreen);
7
8-#ifdef USE_MODERN_COMPIZ_GL
9- gScreen->glPaintCompositedOutputSetEnabled (this, true);
10-#endif
11-
12 PluginAdapter::Initialize(screen);
13 WindowManager::SetDefault(PluginAdapter::Default());
14 AddChild(PluginAdapter::Default());
15@@ -1308,37 +1304,16 @@
16 if (doShellRepaint && !force && fullscreenRegion.contains(*output))
17 doShellRepaint = false;
18
19-#ifndef USE_MODERN_COMPIZ_GL
20 if (doShellRepaint)
21+#ifdef USE_MODERN_COMPIZ_GL
22+ paintDisplay();
23+#else
24 paintDisplay(region, transform, mask);
25 #endif
26
27 return ret;
28 }
29
30-#ifdef USE_MODERN_COMPIZ_GL
31-void UnityScreen::glPaintCompositedOutput (const CompRegion &region,
32- ::GLFramebufferObject *fbo,
33- unsigned int mask)
34-{
35- if (doShellRepaint)
36- {
37- bool useFbo = false;
38- oldFbo = fbo->bind ();
39- useFbo = fbo->checkStatus () && fbo->tex ();
40- if (!useFbo) {
41- printf ("bailing from UnityScreen::glPaintCompositedOutput");
42- ::GLFramebufferObject::rebind (oldFbo);
43- return;
44- }
45- paintDisplay();
46- ::GLFramebufferObject::rebind (oldFbo);
47- }
48-
49- gScreen->glPaintCompositedOutput(region, fbo, mask);
50-}
51-#endif
52-
53 /* called whenever a plugin needs to paint the entire scene
54 * transformed */
55
56
57=== modified file 'plugins/unityshell/src/unityshell.h'
58--- plugins/unityshell/src/unityshell.h 2012-08-10 15:11:21 +0000
59+++ plugins/unityshell/src/unityshell.h 2012-08-20 09:53:25 +0000
60@@ -123,11 +123,6 @@
61 const CompRegion&,
62 CompOutput*,
63 unsigned int);
64-#ifdef USE_MODERN_COMPIZ_GL
65- void glPaintCompositedOutput (const CompRegion &region,
66- ::GLFramebufferObject *fbo,
67- unsigned int mask);
68-#endif
69
70 /* paint in the special case that the output is transformed */
71 void glPaintTransformedOutput(const GLScreenPaintAttrib&,