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
=== modified file 'plugins/unityshell/src/unityshell.cpp'
--- plugins/unityshell/src/unityshell.cpp 2012-04-09 12:48:05 +0000
+++ plugins/unityshell/src/unityshell.cpp 2012-04-09 16:27:19 +0000
@@ -754,34 +754,37 @@
754#ifndef USE_GLES754#ifndef USE_GLES
755 bool was_bound = _fbo->bound ();755 bool was_bound = _fbo->bound ();
756756
757 if (was_bound && launcher_controller_->IsOverlayOpen() && paint_panel_)757 if (nux::GetGraphicsDisplay()->GetGraphicsEngine()->UsingGLSLCodePath())
758 {758 {
759 if (panel_texture_has_changed_ || !panel_texture_.IsValid())759 if (was_bound && launcher_controller_->IsOverlayOpen() && paint_panel_)
760 {760 {
761 panel_texture_.Release();761 if (panel_texture_has_changed_ || !panel_texture_.IsValid())
762762 {
763 nux::NBitmapData* bitmap = panel::Style::Instance().GetBackground(screen->width (), screen->height(), 1.0f);763 panel_texture_.Release();
764 nux::BaseTexture* texture2D = nux::GetGraphicsDisplay()->GetGpuDevice()->CreateSystemCapableTexture();764
765 if (bitmap && texture2D)765 nux::NBitmapData* bitmap = panel::Style::Instance().GetBackground(screen->width (), screen->height(), 1.0f);
766 {766 nux::BaseTexture* texture2D = nux::GetGraphicsDisplay()->GetGpuDevice()->CreateSystemCapableTexture();
767 texture2D->Update(bitmap);767 if (bitmap && texture2D)
768 panel_texture_ = texture2D->GetDeviceTexture();768 {
769 texture2D->UnReference();769 texture2D->Update(bitmap);
770 delete bitmap;770 panel_texture_ = texture2D->GetDeviceTexture();
771 }771 texture2D->UnReference();
772 panel_texture_has_changed_ = false;772 delete bitmap;
773 }773 }
774774 panel_texture_has_changed_ = false;
775 if (panel_texture_.IsValid())775 }
776 {776
777 nux::GetGraphicsDisplay()->GetGraphicsEngine()->ResetModelViewMatrixStack();777 if (panel_texture_.IsValid())
778 nux::GetGraphicsDisplay()->GetGraphicsEngine()->Push2DTranslationModelViewMatrix(0.0f, 0.0f, 0.0f);778 {
779 nux::GetGraphicsDisplay()->GetGraphicsEngine()->ResetProjectionMatrix();779 nux::GetGraphicsDisplay()->GetGraphicsEngine()->ResetModelViewMatrixStack();
780 nux::GetGraphicsDisplay()->GetGraphicsEngine()->SetOrthographicProjectionMatrix(screen->width (), screen->height());780 nux::GetGraphicsDisplay()->GetGraphicsEngine()->Push2DTranslationModelViewMatrix(0.0f, 0.0f, 0.0f);
781781 nux::GetGraphicsDisplay()->GetGraphicsEngine()->ResetProjectionMatrix();
782 nux::TexCoordXForm texxform;782 nux::GetGraphicsDisplay()->GetGraphicsEngine()->SetOrthographicProjectionMatrix(screen->width (), screen->height());
783 int panel_height = panel_style_.panel_height;783
784 nux::GetGraphicsDisplay()->GetGraphicsEngine()->QRP_GLSL_1Tex(0, 0, screen->width (), panel_height, panel_texture_, texxform, nux::color::White);784 nux::TexCoordXForm texxform;
785 int panel_height = panel_style_.panel_height;
786 nux::GetGraphicsDisplay()->GetGraphicsEngine()->QRP_GLSL_1Tex(0, 0, screen->width (), panel_height, panel_texture_, texxform, nux::color::White);
787 }
785 }788 }
786 }789 }
787790