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
=== modified file 'plugins/scaleaddon/src/scaleaddon.cpp'
--- plugins/scaleaddon/src/scaleaddon.cpp 2012-09-05 16:05:31 +0000
+++ plugins/scaleaddon/src/scaleaddon.cpp 2012-10-26 09:17:18 +0000
@@ -142,8 +142,13 @@
142 glGetIntegerv (GL_BLEND_SRC_ALPHA, &oldBlendSrcAlpha);142 glGetIntegerv (GL_BLEND_SRC_ALPHA, &oldBlendSrcAlpha);
143 glGetIntegerv (GL_BLEND_DST_ALPHA, &oldBlendDstAlpha);143 glGetIntegerv (GL_BLEND_DST_ALPHA, &oldBlendDstAlpha);
144#else144#else
145 GLboolean wasBlend = glIsEnabled (GL_BLEND);
145 glGetIntegerv (GL_BLEND_SRC, &oldBlendSrc);146 glGetIntegerv (GL_BLEND_SRC, &oldBlendSrc);
146 glGetIntegerv (GL_BLEND_DST, &oldBlendDst);147 glGetIntegerv (GL_BLEND_DST, &oldBlendDst);
148
149 if (!wasBlend)
150 glEnable (GL_BLEND);
151
147#endif152#endif
148153
149 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);154 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -179,6 +184,8 @@
179 glBlendFuncSeparate (oldBlendSrc, oldBlendDst,184 glBlendFuncSeparate (oldBlendSrc, oldBlendDst,
180 oldBlendSrcAlpha, oldBlendDstAlpha);185 oldBlendSrcAlpha, oldBlendDstAlpha);
181#else186#else
187 if (!wasBlend)
188 glDisable (GL_BLEND);
182 glBlendFunc (oldBlendSrc, oldBlendDst);189 glBlendFunc (oldBlendSrc, oldBlendDst);
183#endif190#endif
184}191}

Subscribers

People subscribed via source and target branches