Merge lp:~unity-team/unity/unity.fix-965323 into lp:unity

Proposed by Andrea Cimitan on 2012-04-17
Status: Merged
Approved by: Andrea Cimitan on 2012-04-17
Approved revision: 2286
Merged at revision: 2288
Proposed branch: lp:~unity-team/unity/unity.fix-965323
Merge into: lp:unity
Diff against target: 94 lines (+6/-10)
4 files modified
plugins/unityshell/src/Launcher.cpp (+1/-1)
plugins/unityshell/src/OverlayRenderer.cpp (+2/-3)
plugins/unityshell/src/PanelView.cpp (+2/-2)
plugins/unityshell/src/UnityWindowView.cpp (+1/-4)
To merge this branch: bzr merge lp:~unity-team/unity/unity.fix-965323
Reviewer Review Type Date Requested Status
Robert Carr (community) Approve on 2012-04-17
Michal Hruby (community) 2012-04-17 Approve on 2012-04-17
Review via email: mp+102278@code.launchpad.net

Commit Message

Fix transparent panel in non-GLSL hardware, and use bool 'false' instead 'FALSE'

Description of the Change

Correctly paint background panel layers.

At the same time, use 'false' boolean instead 'FALSE' (it works as before, but it's more elegant in C++)

To post a comment you must log in.
Michal Hruby (mhr3) wrote :

Looks fine to me.

review: Approve
Robert Carr (robertcarr) wrote :

This is right. Was a mistake in ~new-dash-blending branch.

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/Launcher.cpp'
2--- plugins/unityshell/src/Launcher.cpp 2012-04-15 12:13:39 +0000
3+++ plugins/unityshell/src/Launcher.cpp 2012-04-17 10:22:27 +0000
4@@ -2005,7 +2005,7 @@
5
6 // apply the bg colour
7 #ifndef NUX_OPENGLES_20
8- if (GfxContext.UsingGLSLCodePath() == FALSE)
9+ if (GfxContext.UsingGLSLCodePath() == false)
10 gPainter.Paint2DQuadColor(GfxContext, bkg_box, _background_color);
11 #endif
12
13
14=== modified file 'plugins/unityshell/src/OverlayRenderer.cpp'
15--- plugins/unityshell/src/OverlayRenderer.cpp 2012-04-16 10:45:40 +0000
16+++ plugins/unityshell/src/OverlayRenderer.cpp 2012-04-17 10:22:27 +0000
17@@ -500,14 +500,13 @@
18 nux::GetPainter().RenderSinglePaintLayer(gfx_context, larger_content_geo, bg_darken_layer_);
19
20 #ifndef NUX_OPENGLES_20
21- if (gfx_context.UsingGLSLCodePath() == FALSE)
22+ if (gfx_context.UsingGLSLCodePath() == false)
23 {
24 bg_layer_->SetGeometry(larger_content_geo);
25 nux::GetPainter().RenderSinglePaintLayer(gfx_context, larger_content_geo, bg_layer_);
26 }
27 #endif
28
29-
30 texxform_absolute_bg.flip_v_coord = false;
31 texxform_absolute_bg.uoffset = (1.0f / bg_shine_texture_->GetWidth()) * parent->x_offset;
32 texxform_absolute_bg.voffset = (1.0f / bg_shine_texture_->GetHeight()) * parent->y_offset;
33@@ -835,7 +834,7 @@
34 bgs++;
35
36 #ifndef NUX_OPENGLES_20
37- if (gfx_context.UsingGLSLCodePath() == FALSE)
38+ if (gfx_context.UsingGLSLCodePath() == false)
39 {
40 nux::GetPainter().PushLayer(gfx_context, bg_layer_->GetGeometry(), bg_layer_);
41 bgs++;
42
43=== modified file 'plugins/unityshell/src/PanelView.cpp'
44--- plugins/unityshell/src/PanelView.cpp 2012-04-05 16:18:35 +0000
45+++ plugins/unityshell/src/PanelView.cpp 2012-04-17 10:22:27 +0000
46@@ -291,7 +291,7 @@
47 }
48 }
49
50- if (!_overlay_is_open)
51+ if (!_overlay_is_open || GfxContext.UsingGLSLCodePath() == false)
52 nux::GetPainter().RenderSinglePaintLayer(GfxContext, GetGeometry(), _bg_layer.get());
53
54 GfxContext.PopClippingRectangle();
55@@ -366,7 +366,7 @@
56 }
57 }
58
59- if (!_overlay_is_open)
60+ if (!_overlay_is_open || GfxContext.UsingGLSLCodePath() == false)
61 gPainter.PushLayer(GfxContext, GetGeometry(), _bg_layer.get());
62
63 if (_overlay_is_open)
64
65=== modified file 'plugins/unityshell/src/UnityWindowView.cpp'
66--- plugins/unityshell/src/UnityWindowView.cpp 2012-03-20 08:42:33 +0000
67+++ plugins/unityshell/src/UnityWindowView.cpp 2012-04-17 10:22:27 +0000
68@@ -65,9 +65,7 @@
69 background_geo.height - internal_offset * 2);
70 GfxContext.PushClippingRectangle(internal_clip);
71
72-
73 nux::Geometry geo_absolute = GetAbsoluteGeometry ();
74-
75
76 if (BackgroundEffectHelper::blur_type != BLUR_NONE)
77 {
78@@ -110,7 +108,6 @@
79 background_color, nux::LAYER_BLEND_MODE_OVERLAY,
80 true, rop);
81 #endif
82-
83 }
84 }
85
86@@ -118,7 +115,7 @@
87 rop.Blend = true;
88
89 #ifndef NUX_OPENGLES_20
90- if (GfxContext.UsingGLSLCodePath() == FALSE)
91+ if (GfxContext.UsingGLSLCodePath() == false)
92 {
93 rop.SrcBlend = GL_ONE;
94 rop.DstBlend = GL_ONE_MINUS_SRC_ALPHA;