Merge lp:~vanvugt/compiz/fix-1020830 into lp:compiz/0.9.9

Proposed by Daniel van Vugt on 2013-01-07
Status: Merged
Approved by: Daniel van Vugt on 2013-01-08
Approved revision: 3542
Merged at revision: 3548
Proposed branch: lp:~vanvugt/compiz/fix-1020830
Merge into: lp:compiz/0.9.9
Diff against target: 185 lines (+25/-23)
7 files modified
debian/compiz-plugins.install (+1/-0)
debian/compiz-plugins.install.armel (+1/-0)
debian/compiz-plugins.install.armhf (+1/-0)
plugins/CMakeLists.txt (+0/-1)
plugins/wallpaper/CMakeLists.txt (+1/-1)
plugins/wallpaper/src/wallpaper.cpp (+19/-19)
plugins/wallpaper/src/wallpaper.h (+2/-2)
To merge this branch: bzr merge lp:~vanvugt/compiz/fix-1020830
Reviewer Review Type Date Requested Status
Daniel van Vugt Approve on 2013-01-08
PS Jenkins bot continuous-integration Needs Fixing on 2013-01-08
Sam Spilsbury 2013-01-07 Approve on 2013-01-07
Review via email: mp+142082@code.launchpad.net

Commit message

Reintroduced the wallpaper plugin. It was unbuildable from v0.9.8.0 until
now. (LP: #1020830)

To post a comment you must log in.
Sam Spilsbury (smspillaz) wrote :

Yay. Happy to have this in as is (as its non-core), only question would be, do you know why:

- window->alpha () && window->type () & CompWindowTypeDesktopMask)
+ window->type () & CompWindowTypeDesktopMask)

The check for alpha () was removed? I believe that was necessary for some reason, something to do with the transparent cube. Or something.

I guess if it was breaking more things than it fixed, then its not worth having.

review: Approve
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Daniel van Vugt (vanvugt) wrote :

Yeah alpha() appeared to be false (which is correct) so the plugin could not work at all with that check.

lp:~vanvugt/compiz/fix-1020830 updated on 2013-01-08
3542. By Daniel van Vugt on 2013-01-08

Remember to install wallpaper for ARM too

Daniel van Vugt (vanvugt) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/compiz-plugins.install'
2--- debian/compiz-plugins.install 2013-01-07 09:36:08 +0000
3+++ debian/compiz-plugins.install 2013-01-08 05:19:22 +0000
4@@ -45,6 +45,7 @@
5 debian/tmp/usr/*/compiz/*text.*
6 debian/tmp/usr/*/compiz/*titleinfo.*
7 debian/tmp/usr/*/compiz/*trailfocus.*
8+debian/tmp/usr/*/compiz/*wallpaper.*
9 debian/tmp/usr/*/compiz/*water.*
10 debian/tmp/usr/*/compiz/*widget.*
11 debian/tmp/usr/*/compiz/*winrules.*
12
13=== modified file 'debian/compiz-plugins.install.armel'
14--- debian/compiz-plugins.install.armel 2013-01-05 07:28:00 +0000
15+++ debian/compiz-plugins.install.armel 2013-01-08 05:19:22 +0000
16@@ -36,6 +36,7 @@
17 debian/tmp/usr/*/compiz/*text.*
18 debian/tmp/usr/*/compiz/*titleinfo.*
19 debian/tmp/usr/*/compiz/*trailfocus.*
20+debian/tmp/usr/*/compiz/*wallpaper.*
21 debian/tmp/usr/*/compiz/*water.*
22 debian/tmp/usr/*/compiz/*winrules.*
23 debian/tmp/usr/*/compiz/*wobbly.*
24
25=== modified file 'debian/compiz-plugins.install.armhf'
26--- debian/compiz-plugins.install.armhf 2013-01-05 07:28:00 +0000
27+++ debian/compiz-plugins.install.armhf 2013-01-08 05:19:22 +0000
28@@ -36,6 +36,7 @@
29 debian/tmp/usr/*/compiz/*text.*
30 debian/tmp/usr/*/compiz/*titleinfo.*
31 debian/tmp/usr/*/compiz/*trailfocus.*
32+debian/tmp/usr/*/compiz/*wallpaper.*
33 debian/tmp/usr/*/compiz/*water.*
34 debian/tmp/usr/*/compiz/*winrules.*
35 debian/tmp/usr/*/compiz/*wobbly.*
36
37=== modified file 'plugins/CMakeLists.txt'
38--- plugins/CMakeLists.txt 2013-01-07 09:36:08 +0000
39+++ plugins/CMakeLists.txt 2013-01-08 05:19:22 +0000
40@@ -36,7 +36,6 @@
41 set (COMPIZ_DISABLE_PLUGIN_REFLEX ON)
42 set (COMPIZ_DISABLE_PLUGIN_THUMBNAIL ON)
43 set (COMPIZ_DISABLE_PLUGIN_STACKSWITCH ON)
44-set (COMPIZ_DISABLE_PLUGIN_WALLPAPER ON)
45 set (COMPIZ_DISABLE_PLUGIN_TRIP ON)
46
47 # disable plugins which won't work on ES2 builds
48
49=== modified file 'plugins/wallpaper/CMakeLists.txt'
50--- plugins/wallpaper/CMakeLists.txt 2012-05-16 17:44:47 +0000
51+++ plugins/wallpaper/CMakeLists.txt 2013-01-08 05:19:22 +0000
52@@ -2,4 +2,4 @@
53
54 include (CompizPlugin)
55
56-compiz_plugin (wallpaper PLUGINDEPS composite opengl)
57+compiz_plugin (wallpaper PLUGINDEPS composite opengl LIBRARIES Xrender)
58
59=== modified file 'plugins/wallpaper/src/wallpaper.cpp'
60--- plugins/wallpaper/src/wallpaper.cpp 2012-07-31 13:49:40 +0000
61+++ plugins/wallpaper/src/wallpaper.cpp 2013-01-08 05:19:22 +0000
62@@ -416,7 +416,8 @@
63 }
64
65 void
66-WallpaperWindow::drawBackgrounds (GLFragment::Attrib &attrib,
67+WallpaperWindow::drawBackgrounds (const GLMatrix &transform,
68+ const GLWindowPaintAttrib &attrib,
69 const CompRegion &region,
70 unsigned int mask,
71 WallpaperBackgrounds& bg,
72@@ -428,11 +429,12 @@
73 GLTexture::Matrix matrix;
74 GLTexture::MatrixList tmpMatrixList;
75 WallpaperBackground *back = ws->getBackgroundForViewport (bg);
76- GLFragment::Attrib tmpAttrib = attrib;
77+ GLWindowPaintAttrib tmpAttrib = attrib;
78
79 tmpMatrixList.push_back (matrix);
80
81- gWindow->geometry().reset();
82+ GLVertexBuffer *vb = gWindow->vertexBuffer ();
83+ vb->begin ();
84
85 tmpMatrixList[0] = back->fillTexMatrix[0];
86
87@@ -451,17 +453,14 @@
88
89 if (ws->optionGetCycleWallpapers ())
90 {
91- if (fadingIn)
92- tmpAttrib.setOpacity ((OPAQUE * (1.0f - ws->alpha)) * (attrib.getOpacity () / (float)OPAQUE));
93- else
94- tmpAttrib.setOpacity ((OPAQUE * ws->alpha) * (attrib.getOpacity () / (float)OPAQUE));
95+ tmpAttrib.opacity *= fadingIn ? (1.0f - ws->alpha) : ws->alpha;
96 }
97
98- if (tmpAttrib.getOpacity () != OPAQUE)
99+ if (tmpAttrib.opacity != OPAQUE)
100 mask |= PAINT_WINDOW_BLEND_MASK;
101
102- if (gWindow->geometry ().vCount)
103- gWindow->glDrawTexture(back->fillTex[0], tmpAttrib, mask);
104+ if (vb->end ())
105+ gWindow->glDrawTexture(back->fillTex[0], transform, tmpAttrib, mask);
106
107 if (back->imgSize.width () && back->imgSize.height ())
108 {
109@@ -469,7 +468,7 @@
110 float s1, s2;
111 int x, y;
112
113- gWindow->geometry ().vCount = gWindow->geometry ().indexCount = 0;
114+ vb->begin ();
115 tmpMatrixList[0] = back->imgTex[0]->matrix ();
116
117 if (back->imagePos == WallpaperOptions::BgImagePosScaleAndCrop)
118@@ -558,21 +557,23 @@
119 gWindow->glAddGeometry (tmpMatrixList, reg, region);
120 }
121
122- if (gWindow->geometry ().vCount)
123- gWindow->glDrawTexture (back->imgTex[0], tmpAttrib, mask | PAINT_WINDOW_BLEND_MASK);
124+ if (vb->end ())
125+ gWindow->glDrawTexture (back->imgTex[0], transform, tmpAttrib, mask | PAINT_WINDOW_BLEND_MASK);
126 }
127 }
128
129 bool
130 WallpaperWindow::glDraw (const GLMatrix &transform,
131- GLFragment::Attrib &attrib,
132+ const GLWindowPaintAttrib &attrib,
133 const CompRegion &region,
134 unsigned int mask)
135 {
136 WALLPAPER_SCREEN (screen);
137
138+ bool ret = gWindow->glDraw (transform, attrib, region, mask);
139+
140 if ((!ws->desktop || ws->desktop == window) && !ws->backgroundsPrimary.empty() &&
141- window->alpha () && window->type () & CompWindowTypeDesktopMask)
142+ window->type () & CompWindowTypeDesktopMask)
143 {
144 int filterIdx;
145 GLTexture::Filter saveFilter;
146@@ -588,18 +589,17 @@
147 ws->gScreen->setFilter (filterIdx, GLTexture::Good);
148
149 if (ws->optionGetCycleWallpapers () && ws->rotateTimer.active ())
150- drawBackgrounds (attrib, region, mask,
151+ drawBackgrounds (transform, attrib, region, mask,
152 ws->backgroundsSecondary, true);
153- drawBackgrounds (attrib, region, mask,
154+ drawBackgrounds (transform, attrib, region, mask,
155 ws->backgroundsPrimary, false);
156
157 ws->gScreen->setFilter (filterIdx, saveFilter);
158
159 ws->desktop = window;
160- attrib.setOpacity (OPAQUE);
161 }
162
163- return gWindow->glDraw (transform, attrib, region, mask);
164+ return ret;
165 }
166
167 bool
168
169=== modified file 'plugins/wallpaper/src/wallpaper.h'
170--- plugins/wallpaper/src/wallpaper.h 2010-02-12 19:03:03 +0000
171+++ plugins/wallpaper/src/wallpaper.h 2013-01-08 05:19:22 +0000
172@@ -132,11 +132,11 @@
173 GLWindow *gWindow;
174
175 void
176- drawBackgrounds (GLFragment::Attrib &,
177+ drawBackgrounds (const GLMatrix &, const GLWindowPaintAttrib &,
178 const CompRegion &, unsigned int,
179 WallpaperBackgrounds&, bool);
180
181- bool glDraw (const GLMatrix &, GLFragment::Attrib &,
182+ bool glDraw (const GLMatrix &, const GLWindowPaintAttrib &,
183 const CompRegion &, unsigned int);
184
185 bool damageRect (bool, const CompRect &);

Subscribers

People subscribed via source and target branches