Merge lp:~mc-return/compiz/compiz.merge-fix1047788-screenshot-selection-rectangle-opaque into lp:compiz/0.9.9

Proposed by MC Return on 2012-10-19
Status: Merged
Approved by: Timo Jyrinki on 2012-10-22
Approved revision: 3441
Merged at revision: 3440
Proposed branch: lp:~mc-return/compiz/compiz.merge-fix1047788-screenshot-selection-rectangle-opaque
Merge into: lp:compiz/0.9.9
Diff against target: 23 lines (+6/-0)
1 file modified
plugins/screenshot/src/screenshot.cpp (+6/-0)
To merge this branch: bzr merge lp:~mc-return/compiz/compiz.merge-fix1047788-screenshot-selection-rectangle-opaque
Reviewer Review Type Date Requested Status
Timo Jyrinki 2012-10-19 Approve on 2012-10-22
PS Jenkins bot continuous-integration Pending
Review via email: mp+130547@code.launchpad.net

Commit Message

Screenshot Plugin: Re-added GL_BLEND enabling and disabling calls to fix the selection rectangle not being transparent anymore.
Make sure to use GL_BLEND for the non-GLES codepath only.
Those calls got lost in r3320 (GLES merge).

(LP: #1047788)

Description of the Change

Note 1: I had to make minor adjustments to when those functions get called to make them work perfectly.

Note 2: Good news ! The screenshot plug-in now works perfectly. Also long-time bug 771875 (Compiz Screenshot renders blue overlay on screenshots) is not reproducible anymore.

You can find a video showing the fix in action here: https://bugs.launchpad.net/ubuntu/+source/compiz/+bug/771875/+attachment/3406112/+files/ScreenshotPluginAfterFixes.webm

To post a comment you must log in.
3439. By MC Return on 2012-10-19

Cleaner .diff

3440. By MC Return on 2012-10-20

Rebased on latest lp:compiz

3441. By MC Return on 2012-10-20

Make sure to use GL_BLEND for the non-GLES codepath only

Timo Jyrinki (timo-jyrinki) wrote :

Looks fine!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugins/screenshot/src/screenshot.cpp'
2--- plugins/screenshot/src/screenshot.cpp 2012-07-30 07:10:52 +0000
3+++ plugins/screenshot/src/screenshot.cpp 2012-10-20 10:05:24 +0000
4@@ -295,6 +295,9 @@
5 -output->region ()->extents.y2,
6 0.0f);
7
8+#ifndef USE_GLES
9+ glEnable (GL_BLEND);
10+#endif
11 streamingBuffer->begin (GL_TRIANGLE_STRIP);
12
13 streamingBuffer->addColors (1, colorData);
14@@ -315,6 +318,9 @@
15 streamingBuffer->addVertices (4, vertexData);
16
17 streamingBuffer->end ();
18+#ifndef USE_GLES
19+ glDisable (GL_BLEND);
20+#endif
21 streamingBuffer->render (transform);
22 }
23 }

Subscribers

People subscribed via source and target branches