Merge lp:~townsend/unity/fix-lp1179210-7.1 into lp:unity/7.1

Proposed by Christopher Townsend
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: no longer in the source branch.
Merged at revision: 3573
Proposed branch: lp:~townsend/unity/fix-lp1179210-7.1
Merge into: lp:unity/7.1
Diff against target: 28 lines (+6/-6)
1 file modified
launcher/Launcher.cpp (+6/-6)
To merge this branch: bzr merge lp:~townsend/unity/fix-lp1179210-7.1
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Marco Trevisan (Treviño) Approve
Review via email: mp+194923@code.launchpad.net

Commit message

In low graphics mode, only draw the Launcher background as needed instead of all of the time, even if the Launcher is hidden. Backport from lp:unity.

Description of the change

= Issue =
When using low graphics and the Launcher is hidden, the background color of the Launcher is always drawn on the screen causing an ugly artefact.

= Fix =
Instead of always drawing the background, only draw the background as needed in the same manner as the normal graphic mode does it.

= Test =
Restart Unity in low graphics mode by doing this: UNITY_LOW_GFX_MODE=1 setsid unity

Note: This is a backport from lp:unity.

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

+1

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'launcher/Launcher.cpp'
--- launcher/Launcher.cpp 2013-10-04 03:55:52 +0000
+++ launcher/Launcher.cpp 2013-11-12 19:26:58 +0000
@@ -1735,12 +1735,6 @@
17351735
1736 nux::Color clear_colour = nux::Color(0x00000000);1736 nux::Color clear_colour = nux::Color(0x00000000);
17371737
1738 if (Settings::Instance().GetLowGfxMode())
1739 {
1740 clear_colour = options()->background_color;
1741 clear_colour.alpha = 1.0f;
1742 }
1743
1744 // clear region1738 // clear region
1745 GfxContext.PushClippingRectangle(base);1739 GfxContext.PushClippingRectangle(base);
1746 gPainter.PushDrawColorLayer(GfxContext, base, clear_colour, true, ROP);1740 gPainter.PushDrawColorLayer(GfxContext, base, clear_colour, true, ROP);
@@ -1873,6 +1867,12 @@
1873 gPainter.Paint2DQuadColor(GfxContext, bkg_box, color);1867 gPainter.Paint2DQuadColor(GfxContext, bkg_box, color);
1874 }1868 }
1875 }1869 }
1870 else
1871 {
1872 nux::Color color = options()->background_color;
1873 color.alpha = 1.0f;
1874 gPainter.Paint2DQuadColor(GfxContext, bkg_box, color);
1875 }
18761876
1877 GfxContext.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER);1877 GfxContext.GetRenderStates().SetPremultipliedBlend(nux::SRC_OVER);
18781878

Subscribers

People subscribed via source and target branches