Merge lp:~mc-return/compiz/compiz.merge-fix1042132-missing-text-transparency into lp:compiz/0.9.9

Proposed by MC Return
Status: Merged
Approved by: Daniel van Vugt
Approved revision: 3437
Merged at revision: 3438
Proposed branch: lp:~mc-return/compiz/compiz.merge-fix1042132-missing-text-transparency
Merge into: lp:compiz/0.9.9
Diff against target: 31 lines (+7/-0)
1 file modified
plugins/text/src/text.cpp (+7/-0)
To merge this branch: bzr merge lp:~mc-return/compiz/compiz.merge-fix1042132-missing-text-transparency
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve
MC Return Needs Resubmitting
PS Jenkins bot continuous-integration Pending
Review via email: mp+130486@code.launchpad.net

Commit message

Re-added missing glEnable (GL_BLEND); and glDisable (GL_BLEND); calls to the OpenGL codepath to fix the text plugin's missing transparency.
Those got lost during the big GLES merge.
(LP: #1042132)

Description of the change

To test that it works, enable the shift-switcher and text plugins, open some windows and start the shift switcher.

Note: Workspacenames text still shows some flickering, but I am pretty sure I'll find the cause for this in the plugin workspacenames itself and it is unrelated to this fix.
Even with minor flickering this plugin now also looks much better with this fix applied.

To post a comment you must log in.
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

For cleaner diffs and better compatibility with backporting in future, please use the exact syntax that we had prior to GLES. See the GLES merge:
http://bazaar.launchpad.net/~compiz-team/compiz/0.9.9/revision/3320#plugins/text/src/text.cpp

review: Needs Fixing
3435. By MC Return

Trying to keep the .diff cleaner

3436. By MC Return

Removed newlines

Revision history for this message
MC Return (mc-return) :
review: Needs Resubmitting
3437. By MC Return

Restored the wasBlend checks also

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

Confirmed fixed with shift and workspacenames.

A new rendering problem with workspacenames is now visible. The label darkens due to the new rendering method(s) (always swap buffers) from the GLES work. But that's a different bug for another day.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'plugins/text/src/text.cpp'
--- plugins/text/src/text.cpp 2012-10-12 09:05:18 +0000
+++ plugins/text/src/text.cpp 2012-10-19 08:06:21 +0000
@@ -492,6 +492,7 @@
492 float y,492 float y,
493 float alpha) const493 float alpha) const
494{494{
495 GLboolean wasBlend;
495 GLint oldBlendSrc, oldBlendDst;496 GLint oldBlendSrc, oldBlendDst;
496 GLushort colorData[4];497 GLushort colorData[4];
497 GLfloat textureData[8];498 GLfloat textureData[8];
@@ -510,6 +511,10 @@
510#else511#else
511 glGetIntegerv (GL_BLEND_SRC, &oldBlendSrc);512 glGetIntegerv (GL_BLEND_SRC, &oldBlendSrc);
512 glGetIntegerv (GL_BLEND_DST, &oldBlendDst);513 glGetIntegerv (GL_BLEND_DST, &oldBlendDst);
514
515 wasBlend = glIsEnabled (GL_BLEND);
516 if (!wasBlend)
517 glEnable (GL_BLEND);
513#endif518#endif
514519
515 glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);520 glBlendFunc (GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
@@ -564,6 +569,8 @@
564 glBlendFuncSeparate (oldBlendSrc, oldBlendDst,569 glBlendFuncSeparate (oldBlendSrc, oldBlendDst,
565 oldBlendSrcAlpha, oldBlendDstAlpha);570 oldBlendSrcAlpha, oldBlendDstAlpha);
566#else571#else
572 if (!wasBlend)
573 glDisable (GL_BLEND);
567 glBlendFunc (oldBlendSrc, oldBlendDst);574 glBlendFunc (oldBlendSrc, oldBlendDst);
568#endif575#endif
569}576}

Subscribers

People subscribed via source and target branches