Merge lp:~mc-return/compiz/compiz.merge-fix1068503-scaleaddon-solid-window-highlight into lp:compiz/0.9.9

Proposed by MC Return
Status: Merged
Approved by: Sam Spilsbury
Approved revision: 3442
Merged at revision: 3446
Proposed branch: lp:~mc-return/compiz/compiz.merge-fix1068503-scaleaddon-solid-window-highlight
Merge into: lp:compiz/0.9.9
Diff against target: 26 lines (+7/-0)
1 file modified
plugins/scaleaddon/src/scaleaddon.cpp (+7/-0)
To merge this branch: bzr merge lp:~mc-return/compiz/compiz.merge-fix1068503-scaleaddon-solid-window-highlight
Reviewer Review Type Date Requested Status
Sam Spilsbury Approve
PS Jenkins bot (community) continuous-integration Needs Fixing
Daniel van Vugt Approve
MC Return Needs Resubmitting
Review via email: mp+131049@code.launchpad.net

Commit message

Re-added GL_BLEND code to the non-GLES codepath to fix the regression caused by r3320.
Fixes scaleaddon window highlight being rendered solid.

(LP #1068503)

To post a comment you must log in.
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Looks fine to me, though I'm not a fan of ifdefs. Can we reduce them by moving the declaration of wasBlend to its definition?, eg

GLboolean wasBlend = glIsEnabled (GL_BLEND);

That way we can keep it within the same ifdef.

Revision history for this message
MC Return (mc-return) wrote :

> Looks fine to me, though I'm not a fan of ifdefs. Can we reduce them by moving
> the declaration of wasBlend to its definition?, eg
>
> GLboolean wasBlend = glIsEnabled (GL_BLEND);
>
> That way we can keep it within the same ifdef.

Sure :)

Done.

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

Works for me.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Re-ack for fixed testcases in ~compiz-team/compiz/ubuntu

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/scaleaddon/src/scaleaddon.cpp'
2--- plugins/scaleaddon/src/scaleaddon.cpp 2012-09-05 16:05:31 +0000
3+++ plugins/scaleaddon/src/scaleaddon.cpp 2012-10-26 09:17:18 +0000
4@@ -142,8 +142,13 @@
5 glGetIntegerv (GL_BLEND_SRC_ALPHA, &oldBlendSrcAlpha);
6 glGetIntegerv (GL_BLEND_DST_ALPHA, &oldBlendDstAlpha);
7 #else
8+ GLboolean wasBlend = glIsEnabled (GL_BLEND);
9 glGetIntegerv (GL_BLEND_SRC, &oldBlendSrc);
10 glGetIntegerv (GL_BLEND_DST, &oldBlendDst);
11+
12+ if (!wasBlend)
13+ glEnable (GL_BLEND);
14+
15 #endif
16
17 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
18@@ -179,6 +184,8 @@
19 glBlendFuncSeparate (oldBlendSrc, oldBlendDst,
20 oldBlendSrcAlpha, oldBlendDstAlpha);
21 #else
22+ if (!wasBlend)
23+ glDisable (GL_BLEND);
24 glBlendFunc (oldBlendSrc, oldBlendDst);
25 #endif
26 }

Subscribers

People subscribed via source and target branches