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

Proposed by Jay Taoko
Status: Merged
Approved by: Tim Penhey
Approved revision: no longer in the source branch.
Merged at revision: 2275
Proposed branch: lp:~unity-team/unity/unity.fix-975103
Merge into: lp:unity
Diff against target: 67 lines (+30/-27)
1 file modified
plugins/unityshell/src/unityshell.cpp (+30/-27)
To merge this branch: bzr merge lp:~unity-team/unity/unity.fix-975103
Reviewer Review Type Date Requested Status
Tim Penhey (community) Approve
Review via email: mp+101254@code.launchpad.net

Commit message

Deactivated panel blurring when a window is maximised and the dash is open on system without GLSL support.

Description of the change

* Fix for bug #975103
* Deactivated panel blurring when a window is maximised and the dash is open on system without GLSL support.

UNBLOCK

To post a comment you must log in.
Revision history for this message
Tim Penhey (thumper) wrote :

Effectively only adding a single if check. Seems OK to me.

review: Approve
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

as Tim told, just adding a check, and that enables to avoid the crash and slowliness that were experienced on low configuration. Now that the proper check for opengl 2 landed, time to UNBLOCK that one.

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-04-09 12:48:05 +0000
3+++ plugins/unityshell/src/unityshell.cpp 2012-04-09 16:27:19 +0000
4@@ -754,34 +754,37 @@
5 #ifndef USE_GLES
6 bool was_bound = _fbo->bound ();
7
8- if (was_bound && launcher_controller_->IsOverlayOpen() && paint_panel_)
9+ if (nux::GetGraphicsDisplay()->GetGraphicsEngine()->UsingGLSLCodePath())
10 {
11- if (panel_texture_has_changed_ || !panel_texture_.IsValid())
12- {
13- panel_texture_.Release();
14-
15- nux::NBitmapData* bitmap = panel::Style::Instance().GetBackground(screen->width (), screen->height(), 1.0f);
16- nux::BaseTexture* texture2D = nux::GetGraphicsDisplay()->GetGpuDevice()->CreateSystemCapableTexture();
17- if (bitmap && texture2D)
18- {
19- texture2D->Update(bitmap);
20- panel_texture_ = texture2D->GetDeviceTexture();
21- texture2D->UnReference();
22- delete bitmap;
23- }
24- panel_texture_has_changed_ = false;
25- }
26-
27- if (panel_texture_.IsValid())
28- {
29- nux::GetGraphicsDisplay()->GetGraphicsEngine()->ResetModelViewMatrixStack();
30- nux::GetGraphicsDisplay()->GetGraphicsEngine()->Push2DTranslationModelViewMatrix(0.0f, 0.0f, 0.0f);
31- nux::GetGraphicsDisplay()->GetGraphicsEngine()->ResetProjectionMatrix();
32- nux::GetGraphicsDisplay()->GetGraphicsEngine()->SetOrthographicProjectionMatrix(screen->width (), screen->height());
33-
34- nux::TexCoordXForm texxform;
35- int panel_height = panel_style_.panel_height;
36- nux::GetGraphicsDisplay()->GetGraphicsEngine()->QRP_GLSL_1Tex(0, 0, screen->width (), panel_height, panel_texture_, texxform, nux::color::White);
37+ if (was_bound && launcher_controller_->IsOverlayOpen() && paint_panel_)
38+ {
39+ if (panel_texture_has_changed_ || !panel_texture_.IsValid())
40+ {
41+ panel_texture_.Release();
42+
43+ nux::NBitmapData* bitmap = panel::Style::Instance().GetBackground(screen->width (), screen->height(), 1.0f);
44+ nux::BaseTexture* texture2D = nux::GetGraphicsDisplay()->GetGpuDevice()->CreateSystemCapableTexture();
45+ if (bitmap && texture2D)
46+ {
47+ texture2D->Update(bitmap);
48+ panel_texture_ = texture2D->GetDeviceTexture();
49+ texture2D->UnReference();
50+ delete bitmap;
51+ }
52+ panel_texture_has_changed_ = false;
53+ }
54+
55+ if (panel_texture_.IsValid())
56+ {
57+ nux::GetGraphicsDisplay()->GetGraphicsEngine()->ResetModelViewMatrixStack();
58+ nux::GetGraphicsDisplay()->GetGraphicsEngine()->Push2DTranslationModelViewMatrix(0.0f, 0.0f, 0.0f);
59+ nux::GetGraphicsDisplay()->GetGraphicsEngine()->ResetProjectionMatrix();
60+ nux::GetGraphicsDisplay()->GetGraphicsEngine()->SetOrthographicProjectionMatrix(screen->width (), screen->height());
61+
62+ nux::TexCoordXForm texxform;
63+ int panel_height = panel_style_.panel_height;
64+ nux::GetGraphicsDisplay()->GetGraphicsEngine()->QRP_GLSL_1Tex(0, 0, screen->width (), panel_height, panel_texture_, texxform, nux::color::White);
65+ }
66 }
67 }
68