Merge lp:~hikiko/unity/unity.showdesktop into lp:unity

Proposed by Eleni Maria Stea
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 4142
Proposed branch: lp:~hikiko/unity/unity.showdesktop
Merge into: lp:unity
Diff against target: 38 lines (+4/-3)
1 file modified
plugins/unityshell/src/UnityShowdesktopHandler.cpp (+4/-3)
To merge this branch: bzr merge lp:~hikiko/unity/unity.showdesktop
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
PS Jenkins bot continuous-integration Pending
Review via email: mp+299036@code.launchpad.net

Commit message

speeds up the showdesktop plugin in lowgfx mode

Description of the change

speeds up the showdesktop plugin in lowgfx mode

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Ok!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/unityshell/src/UnityShowdesktopHandler.cpp'
--- plugins/unityshell/src/UnityShowdesktopHandler.cpp 2012-11-15 20:03:17 +0000
+++ plugins/unityshell/src/UnityShowdesktopHandler.cpp 2016-07-04 11:38:00 +0000
@@ -21,6 +21,7 @@
2121
22#include <glib.h>22#include <glib.h>
23#include "UnityShowdesktopHandler.h"23#include "UnityShowdesktopHandler.h"
24#include "unity-shared/UnitySettings.h"
2425
25namespace unity26namespace unity
26{27{
@@ -99,7 +100,7 @@
99 return;100 return;
100101
101 state_ = ShowdesktopHandler::StateFadeOut;102 state_ = ShowdesktopHandler::StateFadeOut;
102 progress_ = 0.0f;103 progress_ = unity::Settings::Instance().GetLowGfxMode() ? 1.0f : 0.0f;
103104
104 was_hidden_ = showdesktop_handler_window_interface_->Hidden();105 was_hidden_ = showdesktop_handler_window_interface_->Hidden();
105106
@@ -143,7 +144,7 @@
143144
144 if (state_ == ShowdesktopHandler::StateFadeOut)145 if (state_ == ShowdesktopHandler::StateFadeOut)
145 {146 {
146 progress_ += inc;147 progress_ = unity::Settings::Instance().GetLowGfxMode() ? 1.0f : progress_ + inc;
147 if (progress_ >= 1.0f)148 if (progress_ >= 1.0f)
148 {149 {
149 progress_ = 1.0f;150 progress_ = 1.0f;
@@ -152,7 +153,7 @@
152 }153 }
153 else if (state_ == StateFadeIn)154 else if (state_ == StateFadeIn)
154 {155 {
155 progress_ -= inc;156 progress_ = unity::Settings::Instance().GetLowGfxMode() ? 0.0f : progress_ - inc;
156 if (progress_ <= 0.0f)157 if (progress_ <= 0.0f)
157 {158 {
158 progress_ = 0.0f;159 progress_ = 0.0f;