Merge lp:~hikiko/compiz/compiz.grid-blend-option into lp:compiz/0.9.13

Proposed by Eleni Maria Stea
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 4091
Merged at revision: 4090
Proposed branch: lp:~hikiko/compiz/compiz.grid-blend-option
Merge into: lp:compiz/0.9.13
Diff against target: 67 lines (+17/-4)
3 files modified
debian/unity-lowgfx.ini (+1/-0)
plugins/grid/grid.xml.in (+5/-0)
plugins/grid/src/grid.cpp (+11/-4)
To merge this branch: bzr merge lp:~hikiko/compiz/compiz.grid-blend-option
Reviewer Review Type Date Requested Status
Marco Trevisan (Treviño) Approve
Review via email: mp+305094@code.launchpad.net

Commit message

Added option to disable blend in grid plugin

Description of the change

Added option to disable blend in grid plugin

To post a comment you must log in.
4089. By Eleni Maria Stea

:s/blending/transparency

4090. By Eleni Maria Stea

updated unity-lowgfx profile

4091. By Eleni Maria Stea

fixed option

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

Ack!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/unity-lowgfx.ini'
2--- debian/unity-lowgfx.ini 2016-07-12 13:57:05 +0000
3+++ debian/unity-lowgfx.ini 2016-09-08 09:37:34 +0000
4@@ -13,6 +13,7 @@
5
6 [grid]
7 s0_animation_duration = 1
8+s0_disable_blend = true
9
10 [resize]
11 s0_mode = 2
12
13=== modified file 'plugins/grid/grid.xml.in'
14--- plugins/grid/grid.xml.in 2015-10-26 17:15:43 +0000
15+++ plugins/grid/grid.xml.in 2016-09-08 09:37:34 +0000
16@@ -589,6 +589,11 @@
17 <alpha>0x4f4f</alpha>
18 </default>
19 </option>
20+ <option name="disable_blend" type="bool">
21+ <_short>Disable Transparency</_short>
22+ <_long>Disable blending.</_long>
23+ <default>false</default>
24+ </option>
25 </group>
26 </options>
27 </plugin>
28
29=== modified file 'plugins/grid/src/grid.cpp'
30--- plugins/grid/src/grid.cpp 2016-07-28 04:04:15 +0000
31+++ plugins/grid/src/grid.cpp 2016-09-08 09:37:34 +0000
32@@ -510,6 +510,7 @@
33 GLushort colorData[4];
34 GLushort *color;
35 GLboolean isBlendingEnabled;
36+ bool blend = !optionGetDisableBlend ();
37
38 const float MaxUShortFloat = std::numeric_limits <unsigned short>::max ();
39
40@@ -520,8 +521,11 @@
41
42 sTransform.toScreenSpace (output, -DEFAULT_Z_CAMERA);
43
44- glGetBooleanv (GL_BLEND, &isBlendingEnabled);
45- glEnable (GL_BLEND);
46+ if (blend)
47+ {
48+ glGetBooleanv (GL_BLEND, &isBlendingEnabled);
49+ glEnable (GL_BLEND);
50+ }
51
52 for (iter = animations.begin (); iter != animations.end () && animating; ++iter)
53 {
54@@ -661,8 +665,11 @@
55 streamingBuffer->render (sTransform);
56 }
57
58- if (!isBlendingEnabled)
59- glDisable (GL_BLEND);
60+ if (blend)
61+ {
62+ if (!isBlendingEnabled)
63+ glDisable (GL_BLEND);
64+ }
65 }
66
67 bool

Subscribers

People subscribed via source and target branches