Merge lp:~sil2100/unity/lp1071813.render-launcher-icon-drag_6.0 into lp:unity/6.0

Proposed by Łukasz Zemczak
Status: Merged
Approved by: Łukasz Zemczak
Approved revision: no longer in the source branch.
Merged at revision: 2793
Proposed branch: lp:~sil2100/unity/lp1071813.render-launcher-icon-drag_6.0
Merge into: lp:unity/6.0
Diff against target: 23 lines (+13/-0)
1 file modified
launcher/Launcher.cpp (+13/-0)
To merge this branch: bzr merge lp:~sil2100/unity/lp1071813.render-launcher-icon-drag_6.0
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
Nick Dedekind (community) Approve
Review via email: mp+132171@code.launchpad.net

Commit message

Cherry-picked rev 2871 from lp:unity:
Clear launcher drag icon texture before rendering to it (LP: #1071813)

Description of the change

Cherry-picked Nick's fix from: https://code.launchpad.net/~nick-dedekind/unity/lp1071813.render-launcher-icon-drag/+merge/132104

= Problem description =

https://bugs.launchpad.net/ubuntu/+source/unity/+bug/1071813
Launcher drag icon textures had partial corruption due to performance optimisations in Nux r.686

= The fix =

Clear launcher drag icon texture before rendering to it.

= Test coverage =

No test.

To post a comment you must log in.
Revision history for this message
Nick Dedekind (nick-dedekind) wrote :

Same as merge to trunk.
Builds OK.

LGTM.

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Tested the other proposal identical to this and it worked. So I vote yes.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'launcher/Launcher.cpp'
2--- launcher/Launcher.cpp 2012-10-01 15:12:05 +0000
3+++ launcher/Launcher.cpp 2012-10-30 16:57:31 +0000
4@@ -2514,6 +2514,19 @@
5 drag_args.push_front(arg);
6
7 SetOffscreenRenderTarget(texture);
8+
9+ unsigned int alpha = 0, src = 0, dest = 0;
10+ GfxContext.GetRenderStates().GetBlend(alpha, src, dest);
11+ GfxContext.GetRenderStates().SetBlend(false);
12+
13+ GfxContext.QRP_Color(0,
14+ 0,
15+ texture->GetWidth(),
16+ texture->GetHeight(),
17+ nux::Color(0.0f, 0.0f, 0.0f, 0.0f));
18+
19+ GfxContext.GetRenderStates().SetBlend(alpha, src, dest);
20+
21 icon_renderer->PreprocessIcons(drag_args, nux::Geometry(0, 0, _icon_size, _icon_size));
22 icon_renderer->RenderIcon(nux::GetWindowThread()->GetGraphicsEngine(), arg, nux::Geometry(0, 0, _icon_size, _icon_size), nux::Geometry(0, 0, _icon_size, _icon_size));
23 RestoreSystemRenderTarget();

Subscribers

People subscribed via source and target branches