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
=== modified file 'launcher/Launcher.cpp'
--- launcher/Launcher.cpp 2012-10-01 15:12:05 +0000
+++ launcher/Launcher.cpp 2012-10-30 16:57:31 +0000
@@ -2514,6 +2514,19 @@
2514 drag_args.push_front(arg);2514 drag_args.push_front(arg);
25152515
2516 SetOffscreenRenderTarget(texture);2516 SetOffscreenRenderTarget(texture);
2517
2518 unsigned int alpha = 0, src = 0, dest = 0;
2519 GfxContext.GetRenderStates().GetBlend(alpha, src, dest);
2520 GfxContext.GetRenderStates().SetBlend(false);
2521
2522 GfxContext.QRP_Color(0,
2523 0,
2524 texture->GetWidth(),
2525 texture->GetHeight(),
2526 nux::Color(0.0f, 0.0f, 0.0f, 0.0f));
2527
2528 GfxContext.GetRenderStates().SetBlend(alpha, src, dest);
2529
2517 icon_renderer->PreprocessIcons(drag_args, nux::Geometry(0, 0, _icon_size, _icon_size));2530 icon_renderer->PreprocessIcons(drag_args, nux::Geometry(0, 0, _icon_size, _icon_size));
2518 icon_renderer->RenderIcon(nux::GetWindowThread()->GetGraphicsEngine(), arg, nux::Geometry(0, 0, _icon_size, _icon_size), nux::Geometry(0, 0, _icon_size, _icon_size));2531 icon_renderer->RenderIcon(nux::GetWindowThread()->GetGraphicsEngine(), arg, nux::Geometry(0, 0, _icon_size, _icon_size), nux::Geometry(0, 0, _icon_size, _icon_size));
2519 RestoreSystemRenderTarget();2532 RestoreSystemRenderTarget();

Subscribers

People subscribed via source and target branches