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
1=== modified file 'plugins/unityshell/src/UnityShowdesktopHandler.cpp'
2--- plugins/unityshell/src/UnityShowdesktopHandler.cpp 2012-11-15 20:03:17 +0000
3+++ plugins/unityshell/src/UnityShowdesktopHandler.cpp 2016-07-04 11:38:00 +0000
4@@ -21,6 +21,7 @@
5
6 #include <glib.h>
7 #include "UnityShowdesktopHandler.h"
8+#include "unity-shared/UnitySettings.h"
9
10 namespace unity
11 {
12@@ -99,7 +100,7 @@
13 return;
14
15 state_ = ShowdesktopHandler::StateFadeOut;
16- progress_ = 0.0f;
17+ progress_ = unity::Settings::Instance().GetLowGfxMode() ? 1.0f : 0.0f;
18
19 was_hidden_ = showdesktop_handler_window_interface_->Hidden();
20
21@@ -143,7 +144,7 @@
22
23 if (state_ == ShowdesktopHandler::StateFadeOut)
24 {
25- progress_ += inc;
26+ progress_ = unity::Settings::Instance().GetLowGfxMode() ? 1.0f : progress_ + inc;
27 if (progress_ >= 1.0f)
28 {
29 progress_ = 1.0f;
30@@ -152,7 +153,7 @@
31 }
32 else if (state_ == StateFadeIn)
33 {
34- progress_ -= inc;
35+ progress_ = unity::Settings::Instance().GetLowGfxMode() ? 0.0f : progress_ - inc;
36 if (progress_ <= 0.0f)
37 {
38 progress_ = 0.0f;