Merge lp:~vanvugt/compiz/blacklist into lp:compiz/0.9.9
- blacklist
- Merge into 0.9.9
Status: | Merged |
---|---|
Approved by: | Timo Jyrinki |
Approved revision: | 3525 |
Merged at revision: | 3525 |
Proposed branch: | lp:~vanvugt/compiz/blacklist |
Merge into: | lp:compiz/0.9.9 |
Diff against target: |
441 lines (+308/-5) 10 files modified
plugins/opengl/CMakeLists.txt (+2/-0) plugins/opengl/opengl.xml.in (+5/-0) plugins/opengl/src/blacklist/CMakeLists.txt (+6/-0) plugins/opengl/src/blacklist/blacklist.cpp (+67/-0) plugins/opengl/src/blacklist/blacklist.h (+38/-0) plugins/opengl/src/blacklist/tests/CMakeLists.txt (+9/-0) plugins/opengl/src/blacklist/tests/test-blacklist.cpp (+152/-0) plugins/opengl/src/paint.cpp (+6/-0) plugins/opengl/src/privates.h (+4/-0) plugins/opengl/src/screen.cpp (+19/-5) |
To merge this branch: | bzr merge lp:~vanvugt/compiz/blacklist |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Timo Jyrinki | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+139394@code.launchpad.net |
Commit message
Add a feature for blacklisting certain graphics drivers from being able to
unredirect fullscreen windows. Right now the only known broken drivers are
nouveau and intel on precise (Mesa 8.0). But the blacklist is a regex that
can be adjusted at any time.
(LP: #1089246)
Description of the change
PS Jenkins bot (ps-jenkins) wrote : | # |
Timo Jyrinki (timo-jyrinki) wrote : | # |
Looks, builds and functions fine. My quantal Intel wasn't blacklisted, but I was able to blacklist it by modifying the default regexp.
Michael Terry (mterry) wrote : | # |
Will it always be obvious what "blacklisted" means? Right now it seems it is specific to one feature. We might get a second feature in the future that needs a separate blacklist list. Just saying that maybe the function name should be something like blacklisted_
Daniel van Vugt (vanvugt) wrote : | # |
Michael makes a good point and I did think about that. However it's possible and even likely to never be a problem for the lifetime of the Compiz code.
Daniel van Vugt (vanvugt) wrote : | # |
Although, the "blacklisted" function is generic. It is specific to OpenGL drivers but the same function could be applied to other features; not just "unredirected fullscreen windows". So a generic name is appropriate.
Preview Diff
1 | === modified file 'plugins/opengl/CMakeLists.txt' | |||
2 | --- plugins/opengl/CMakeLists.txt 2012-11-08 09:18:59 +0000 | |||
3 | +++ plugins/opengl/CMakeLists.txt 2012-12-12 07:55:25 +0000 | |||
4 | @@ -5,11 +5,13 @@ | |||
5 | 5 | set (INTERNAL_LIBRARIES | 5 | set (INTERNAL_LIBRARIES |
6 | 6 | compiz_opengl_double_buffer | 6 | compiz_opengl_double_buffer |
7 | 7 | compiz_opengl_fsregion | 7 | compiz_opengl_fsregion |
8 | 8 | compiz_opengl_blacklist | ||
9 | 8 | compiz_opengl_glx_tfp_bind | 9 | compiz_opengl_glx_tfp_bind |
10 | 9 | ) | 10 | ) |
11 | 10 | 11 | ||
12 | 11 | add_subdirectory (src/doublebuffer) | 12 | add_subdirectory (src/doublebuffer) |
13 | 12 | add_subdirectory (src/fsregion) | 13 | add_subdirectory (src/fsregion) |
14 | 14 | add_subdirectory (src/blacklist) | ||
15 | 13 | add_subdirectory (src/glxtfpbind) | 15 | add_subdirectory (src/glxtfpbind) |
16 | 14 | 16 | ||
17 | 15 | include_directories (src/glxtfpbind/include) | 17 | include_directories (src/glxtfpbind/include) |
18 | 16 | 18 | ||
19 | === modified file 'plugins/opengl/opengl.xml.in' | |||
20 | --- plugins/opengl/opengl.xml.in 2012-10-15 10:31:51 +0000 | |||
21 | +++ plugins/opengl/opengl.xml.in 2012-12-12 07:55:25 +0000 | |||
22 | @@ -59,6 +59,11 @@ | |||
23 | 59 | <_long>Use glXSwapBuffers to display every frame. This eliminates visible tearing with most drivers and dramatically improves visual smoothness. Automatically enabled when framebuffer_object is on.</_long> | 59 | <_long>Use glXSwapBuffers to display every frame. This eliminates visible tearing with most drivers and dramatically improves visual smoothness. Automatically enabled when framebuffer_object is on.</_long> |
24 | 60 | <default>true</default> | 60 | <default>true</default> |
25 | 61 | </option> | 61 | </option> |
26 | 62 | <option name="unredirect_driver_blacklist" type="string"> | ||
27 | 63 | <_short>Unredirect Driver Blacklist</_short> | ||
28 | 64 | <_long>If non-empty, specifies a POSIX (extended) regular expression to match against the OpenGL driver strings (newline separated): "GL_VENDOR\nGL_RENDERER\nGL_VERSION". If the regular expression matches a substring of that concatenation then no windows will ever be unredirected while using that particular graphics driver.</_long> | ||
29 | 65 | <default>(nouveau|Intel).*Mesa 8\\.0</default> | ||
30 | 66 | </option> | ||
31 | 62 | </options> | 67 | </options> |
32 | 63 | </plugin> | 68 | </plugin> |
33 | 64 | </compiz> | 69 | </compiz> |
34 | 65 | 70 | ||
35 | === added directory 'plugins/opengl/src/blacklist' | |||
36 | === added file 'plugins/opengl/src/blacklist/CMakeLists.txt' | |||
37 | --- plugins/opengl/src/blacklist/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
38 | +++ plugins/opengl/src/blacklist/CMakeLists.txt 2012-12-12 07:55:25 +0000 | |||
39 | @@ -0,0 +1,6 @@ | |||
40 | 1 | if (COMPIZ_BUILD_TESTING) | ||
41 | 2 | add_subdirectory (tests) | ||
42 | 3 | endif () | ||
43 | 4 | |||
44 | 5 | add_library (compiz_opengl_blacklist STATIC blacklist.cpp) | ||
45 | 6 | |||
46 | 0 | 7 | ||
47 | === added file 'plugins/opengl/src/blacklist/blacklist.cpp' | |||
48 | --- plugins/opengl/src/blacklist/blacklist.cpp 1970-01-01 00:00:00 +0000 | |||
49 | +++ plugins/opengl/src/blacklist/blacklist.cpp 2012-12-12 07:55:25 +0000 | |||
50 | @@ -0,0 +1,67 @@ | |||
51 | 1 | /* | ||
52 | 2 | * Compiz opengl plugin, Blacklist feature | ||
53 | 3 | * | ||
54 | 4 | * Copyright (c) 2012 Canonical Ltd. | ||
55 | 5 | * Author: Daniel van Vugt <daniel.van.vugt@canonical.com> | ||
56 | 6 | * | ||
57 | 7 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
58 | 8 | * copy of this software and associated documentation files (the "Software"), | ||
59 | 9 | * to deal in the Software without restriction, including without limitation | ||
60 | 10 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
61 | 11 | * and/or sell copies of the Software, and to permit persons to whom the | ||
62 | 12 | * Software is furnished to do so, subject to the following conditions: | ||
63 | 13 | * | ||
64 | 14 | * The above copyright notice and this permission notice shall be included in | ||
65 | 15 | * all copies or substantial portions of the Software. | ||
66 | 16 | * | ||
67 | 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
68 | 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
69 | 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
70 | 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
71 | 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
72 | 22 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
73 | 23 | * DEALINGS IN THE SOFTWARE. | ||
74 | 24 | */ | ||
75 | 25 | |||
76 | 26 | #include "blacklist.h" | ||
77 | 27 | #include <cstdio> | ||
78 | 28 | #include <regex.h> | ||
79 | 29 | |||
80 | 30 | namespace compiz { | ||
81 | 31 | namespace opengl { | ||
82 | 32 | |||
83 | 33 | bool blacklisted (const char *blacklistRegex, const char *glVendor, | ||
84 | 34 | const char *glRenderer, const char *glVersion) | ||
85 | 35 | { | ||
86 | 36 | bool matches = false; | ||
87 | 37 | |||
88 | 38 | if (blacklistRegex && blacklistRegex[0]) | ||
89 | 39 | { | ||
90 | 40 | regex_t re; | ||
91 | 41 | |||
92 | 42 | // Ensure the regex contains something other than spaces, or ignore. | ||
93 | 43 | const char *p = blacklistRegex; | ||
94 | 44 | while (*p == ' ') | ||
95 | 45 | p++; | ||
96 | 46 | |||
97 | 47 | if (*p && !regcomp (&re, blacklistRegex, REG_EXTENDED)) | ||
98 | 48 | { | ||
99 | 49 | char driver[1024]; | ||
100 | 50 | |||
101 | 51 | snprintf (driver, sizeof driver, "%s\n%s\n%s", | ||
102 | 52 | glVendor ? glVendor : "", | ||
103 | 53 | glRenderer ? glRenderer : "", | ||
104 | 54 | glVersion ? glVersion : ""); | ||
105 | 55 | |||
106 | 56 | if (!regexec (&re, driver, 0, NULL, 0)) | ||
107 | 57 | matches = true; | ||
108 | 58 | |||
109 | 59 | regfree (&re); | ||
110 | 60 | } | ||
111 | 61 | } | ||
112 | 62 | |||
113 | 63 | return matches; | ||
114 | 64 | } | ||
115 | 65 | |||
116 | 66 | } // namespace opengl | ||
117 | 67 | } // namespace compiz | ||
118 | 0 | 68 | ||
119 | === added file 'plugins/opengl/src/blacklist/blacklist.h' | |||
120 | --- plugins/opengl/src/blacklist/blacklist.h 1970-01-01 00:00:00 +0000 | |||
121 | +++ plugins/opengl/src/blacklist/blacklist.h 2012-12-12 07:55:25 +0000 | |||
122 | @@ -0,0 +1,38 @@ | |||
123 | 1 | /* | ||
124 | 2 | * Compiz opengl plugin, Blacklist function | ||
125 | 3 | * | ||
126 | 4 | * Copyright (c) 2012 Canonical Ltd. | ||
127 | 5 | * Author: Daniel van Vugt <daniel.van.vugt@canonical.com> | ||
128 | 6 | * | ||
129 | 7 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
130 | 8 | * copy of this software and associated documentation files (the "Software"), | ||
131 | 9 | * to deal in the Software without restriction, including without limitation | ||
132 | 10 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
133 | 11 | * and/or sell copies of the Software, and to permit persons to whom the | ||
134 | 12 | * Software is furnished to do so, subject to the following conditions: | ||
135 | 13 | * | ||
136 | 14 | * The above copyright notice and this permission notice shall be included in | ||
137 | 15 | * all copies or substantial portions of the Software. | ||
138 | 16 | * | ||
139 | 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
140 | 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
141 | 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
142 | 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
143 | 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
144 | 22 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
145 | 23 | * DEALINGS IN THE SOFTWARE. | ||
146 | 24 | */ | ||
147 | 25 | |||
148 | 26 | #ifndef __COMPIZ_OPENGL_BLACKLIST_H | ||
149 | 27 | #define __COMPIZ_OPENGL_BLACKLIST_H | ||
150 | 28 | |||
151 | 29 | namespace compiz { | ||
152 | 30 | namespace opengl { | ||
153 | 31 | |||
154 | 32 | bool blacklisted (const char *blacklistRegex, const char *glVendor, | ||
155 | 33 | const char *glRenderer, const char *glVersion); | ||
156 | 34 | |||
157 | 35 | } // namespace opengl | ||
158 | 36 | } // namespace compiz | ||
159 | 37 | |||
160 | 38 | #endif | ||
161 | 0 | 39 | ||
162 | === added directory 'plugins/opengl/src/blacklist/tests' | |||
163 | === added file 'plugins/opengl/src/blacklist/tests/CMakeLists.txt' | |||
164 | --- plugins/opengl/src/blacklist/tests/CMakeLists.txt 1970-01-01 00:00:00 +0000 | |||
165 | +++ plugins/opengl/src/blacklist/tests/CMakeLists.txt 2012-12-12 07:55:25 +0000 | |||
166 | @@ -0,0 +1,9 @@ | |||
167 | 1 | include_directories (${GTEST_INCLUDE_DIRS} ..) | ||
168 | 2 | set (exe "compiz_opengl_test_blacklist") | ||
169 | 3 | add_executable (${exe} test-blacklist.cpp) | ||
170 | 4 | target_link_libraries (${exe} | ||
171 | 5 | compiz_opengl_blacklist | ||
172 | 6 | ${GTEST_BOTH_LIBRARIES} | ||
173 | 7 | ) | ||
174 | 8 | compiz_discover_tests(${exe} COVERAGE compiz_opengl_blacklist) | ||
175 | 9 | |||
176 | 0 | 10 | ||
177 | === added file 'plugins/opengl/src/blacklist/tests/test-blacklist.cpp' | |||
178 | --- plugins/opengl/src/blacklist/tests/test-blacklist.cpp 1970-01-01 00:00:00 +0000 | |||
179 | +++ plugins/opengl/src/blacklist/tests/test-blacklist.cpp 2012-12-12 07:55:25 +0000 | |||
180 | @@ -0,0 +1,152 @@ | |||
181 | 1 | /* | ||
182 | 2 | * Compiz opengl plugin, Backlist feature | ||
183 | 3 | * | ||
184 | 4 | * Copyright (c) 2012 Canonical Ltd. | ||
185 | 5 | * Author: Daniel van Vugt <daniel.van.vugt@canonical.com> | ||
186 | 6 | * | ||
187 | 7 | * Permission is hereby granted, free of charge, to any person obtaining a | ||
188 | 8 | * copy of this software and associated documentation files (the "Software"), | ||
189 | 9 | * to deal in the Software without restriction, including without limitation | ||
190 | 10 | * the rights to use, copy, modify, merge, publish, distribute, sublicense, | ||
191 | 11 | * and/or sell copies of the Software, and to permit persons to whom the | ||
192 | 12 | * Software is furnished to do so, subject to the following conditions: | ||
193 | 13 | * | ||
194 | 14 | * The above copyright notice and this permission notice shall be included in | ||
195 | 15 | * all copies or substantial portions of the Software. | ||
196 | 16 | * | ||
197 | 17 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
198 | 18 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
199 | 19 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
200 | 20 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
201 | 21 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING | ||
202 | 22 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | ||
203 | 23 | * DEALINGS IN THE SOFTWARE. | ||
204 | 24 | */ | ||
205 | 25 | |||
206 | 26 | #include "gtest/gtest.h" | ||
207 | 27 | #include "blacklist.h" | ||
208 | 28 | |||
209 | 29 | using namespace compiz::opengl; | ||
210 | 30 | |||
211 | 31 | static const char *recommendedRegex = "(nouveau|Intel).*Mesa 8\\.0"; | ||
212 | 32 | |||
213 | 33 | TEST (DriverBlacklist, QuantalIntelIsGood) | ||
214 | 34 | { | ||
215 | 35 | EXPECT_FALSE (blacklisted (recommendedRegex, | ||
216 | 36 | "Intel Open Source Technology Center", | ||
217 | 37 | "Mesa DRI Intel(R) Sandybridge Desktop", | ||
218 | 38 | "3.0 Mesa 9.0")); | ||
219 | 39 | } | ||
220 | 40 | |||
221 | 41 | TEST (DriverBlacklist, PreciseIntelIsBad) | ||
222 | 42 | { | ||
223 | 43 | EXPECT_TRUE (blacklisted (recommendedRegex, | ||
224 | 44 | "Tungsten Graphics, Inc", | ||
225 | 45 | "Mesa DRI Intel(R) Sandybridge Desktop", | ||
226 | 46 | "3.0 Mesa 8.0.2")); | ||
227 | 47 | } | ||
228 | 48 | |||
229 | 49 | TEST (DriverBlacklist, QuantalNouveauIsGood) | ||
230 | 50 | { | ||
231 | 51 | EXPECT_FALSE (blacklisted (recommendedRegex, | ||
232 | 52 | "nouveau", | ||
233 | 53 | "Gallium 0.4 on NV86", | ||
234 | 54 | "3.0 Mesa 9.0-devel")); | ||
235 | 55 | } | ||
236 | 56 | |||
237 | 57 | TEST (DriverBlacklist, PreciseNouveauIsBad) | ||
238 | 58 | { | ||
239 | 59 | EXPECT_TRUE (blacklisted (recommendedRegex, | ||
240 | 60 | "nouveau", | ||
241 | 61 | "Gallium 0.4 on NVA8", | ||
242 | 62 | "2.1 Mesa 8.0.2")); | ||
243 | 63 | } | ||
244 | 64 | |||
245 | 65 | TEST (DriverBlacklist, FglrxIsGood) | ||
246 | 66 | { | ||
247 | 67 | EXPECT_FALSE (blacklisted (recommendedRegex, | ||
248 | 68 | "Advanced Micro Devices, Inc.", | ||
249 | 69 | "ATI Radeon HD 5450", | ||
250 | 70 | "4.2.11627 Compatibility Profile Context")); | ||
251 | 71 | } | ||
252 | 72 | |||
253 | 73 | TEST (DriverBlacklist, NvidiaIsGood) | ||
254 | 74 | { | ||
255 | 75 | EXPECT_FALSE (blacklisted (recommendedRegex, | ||
256 | 76 | "NVIDIA Corporation", | ||
257 | 77 | "Quadro 1000M/PCIe/SSE2", | ||
258 | 78 | "4.2.0 NVIDIA 304.48")); | ||
259 | 79 | } | ||
260 | 80 | |||
261 | 81 | TEST (DriverBlacklist, RadeonIsGood1) | ||
262 | 82 | { | ||
263 | 83 | EXPECT_FALSE (blacklisted (recommendedRegex, | ||
264 | 84 | "X.Org R300 Project", | ||
265 | 85 | "Gallium 0.4 on ATI RV350", | ||
266 | 86 | "2.1 Mesa 8.0.2")); | ||
267 | 87 | } | ||
268 | 88 | |||
269 | 89 | TEST (DriverBlacklist, RadeonIsGood2) | ||
270 | 90 | { | ||
271 | 91 | EXPECT_FALSE (blacklisted (recommendedRegex, | ||
272 | 92 | "X.Org", | ||
273 | 93 | "Gallium 0.4 on AMD CEDAR", | ||
274 | 94 | "2.1 Mesa 8.0.3")); | ||
275 | 95 | } | ||
276 | 96 | |||
277 | 97 | TEST (DriverBlacklist, RadeonIsGood3) | ||
278 | 98 | { | ||
279 | 99 | EXPECT_FALSE (blacklisted (recommendedRegex, | ||
280 | 100 | "X.Org", | ||
281 | 101 | "Gallium 0.4 on AMD RS880", | ||
282 | 102 | "2.1 Mesa 8.0.2")); | ||
283 | 103 | } | ||
284 | 104 | |||
285 | 105 | TEST (DriverBlacklist, LLVMpipeIsGood) | ||
286 | 106 | { | ||
287 | 107 | EXPECT_FALSE (blacklisted (recommendedRegex, | ||
288 | 108 | "VMware, Inc.", | ||
289 | 109 | "Gallium 0.4 on llvmpipe (LLVM 0x300)", | ||
290 | 110 | "2.1 Mesa 8.0.4")); | ||
291 | 111 | } | ||
292 | 112 | |||
293 | 113 | TEST (DriverBlacklist, UnknownIsGood) | ||
294 | 114 | { | ||
295 | 115 | EXPECT_FALSE (blacklisted (recommendedRegex, | ||
296 | 116 | "Acme", | ||
297 | 117 | "Graphics Driver", | ||
298 | 118 | "4.2 8.0 9.0 123.456")); | ||
299 | 119 | } | ||
300 | 120 | |||
301 | 121 | TEST (DriverBlacklist, NoBlacklist) | ||
302 | 122 | { | ||
303 | 123 | EXPECT_FALSE (blacklisted ("", | ||
304 | 124 | "Tungsten Graphics, Inc", | ||
305 | 125 | "Mesa DRI Intel(R) Sandybridge Desktop", | ||
306 | 126 | "3.0 Mesa 8.0.2")); | ||
307 | 127 | EXPECT_FALSE (blacklisted ("", "foo", "bar", "blah")); | ||
308 | 128 | EXPECT_FALSE (blacklisted ("", "", "", "")); | ||
309 | 129 | } | ||
310 | 130 | |||
311 | 131 | TEST (DriverBlacklist, LineContinuation) | ||
312 | 132 | { | ||
313 | 133 | EXPECT_FALSE (blacklisted ("alpha", "beta", "gamma", "delta")); | ||
314 | 134 | EXPECT_FALSE (blacklisted ("betagam", "beta", "gamma", "delta")); | ||
315 | 135 | EXPECT_TRUE (blacklisted ("gamma", "beta", "gamma", "delta")); | ||
316 | 136 | EXPECT_TRUE (blacklisted ("del", "beta", "gamma", "delta")); | ||
317 | 137 | EXPECT_TRUE (blacklisted ("(mag|gam)", "beta", "gamma", "delta")); | ||
318 | 138 | EXPECT_TRUE (blacklisted ("beta.*delt", "beta", "gamma", "delta")); | ||
319 | 139 | EXPECT_FALSE (blacklisted ("beta.*felt", "beta", "gamma", "delta")); | ||
320 | 140 | |||
321 | 141 | EXPECT_TRUE (blacklisted ("beta\ngamma\ndelta", "beta", "gamma", "delta")); | ||
322 | 142 | } | ||
323 | 143 | |||
324 | 144 | TEST (DriverBlacklist, StraySpaces) | ||
325 | 145 | { | ||
326 | 146 | EXPECT_FALSE (blacklisted (" ", "Hello world", "and", "goodbye")); | ||
327 | 147 | EXPECT_FALSE (blacklisted (" ", " ", " ", " ")); | ||
328 | 148 | EXPECT_FALSE (blacklisted (" ", | ||
329 | 149 | "Tungsten Graphics, Inc", | ||
330 | 150 | "Mesa DRI Intel(R) Sandybridge Desktop", | ||
331 | 151 | "3.0 Mesa 8.0.2")); | ||
332 | 152 | } | ||
333 | 0 | 153 | ||
334 | === modified file 'plugins/opengl/src/paint.cpp' | |||
335 | --- plugins/opengl/src/paint.cpp 2012-12-12 04:29:49 +0000 | |||
336 | +++ plugins/opengl/src/paint.cpp 2012-12-12 07:55:25 +0000 | |||
337 | @@ -261,6 +261,11 @@ | |||
338 | 261 | const CompMatch &unredirectable = CompositeScreen::get (screen)-> | 261 | const CompMatch &unredirectable = CompositeScreen::get (screen)-> |
339 | 262 | getOption ("unredirect_match")->value ().match (); | 262 | getOption ("unredirect_match")->value ().match (); |
340 | 263 | 263 | ||
341 | 264 | const CompString &blacklist = | ||
342 | 265 | getOption ("unredirect_driver_blacklist")->value ().s (); | ||
343 | 266 | |||
344 | 267 | bool blacklisted = driverIsBlacklisted (blacklist.c_str ()); | ||
345 | 268 | |||
346 | 264 | if (mask & PAINT_SCREEN_TRANSFORMED_MASK) | 269 | if (mask & PAINT_SCREEN_TRANSFORMED_MASK) |
347 | 265 | { | 270 | { |
348 | 266 | windowMask = PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK; | 271 | windowMask = PAINT_WINDOW_ON_TRANSFORMED_SCREEN_MASK; |
349 | @@ -354,6 +359,7 @@ | |||
350 | 354 | * beneath them and so neither should be unredirected in that case. | 359 | * beneath them and so neither should be unredirected in that case. |
351 | 355 | */ | 360 | */ |
352 | 356 | if (unredirectFS && | 361 | if (unredirectFS && |
353 | 362 | !blacklisted && | ||
354 | 357 | unredirectable.evaluate (w) && | 363 | unredirectable.evaluate (w) && |
355 | 358 | !(mask & PAINT_SCREEN_TRANSFORMED_MASK) && | 364 | !(mask & PAINT_SCREEN_TRANSFORMED_MASK) && |
356 | 359 | !(mask & PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK) && | 365 | !(mask & PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS_MASK) && |
357 | 360 | 366 | ||
358 | === modified file 'plugins/opengl/src/privates.h' | |||
359 | --- plugins/opengl/src/privates.h 2012-12-07 08:09:56 +0000 | |||
360 | +++ plugins/opengl/src/privates.h 2012-12-12 07:55:25 +0000 | |||
361 | @@ -161,6 +161,8 @@ | |||
362 | 161 | 161 | ||
363 | 162 | void updateView (); | 162 | void updateView (); |
364 | 163 | 163 | ||
365 | 164 | bool driverIsBlacklisted (const char *regex) const; | ||
366 | 165 | |||
367 | 164 | public: | 166 | public: |
368 | 165 | 167 | ||
369 | 166 | GLScreen *gScreen; | 168 | GLScreen *gScreen; |
370 | @@ -219,6 +221,8 @@ | |||
371 | 219 | 221 | ||
372 | 220 | Pixmap rootPixmapCopy; | 222 | Pixmap rootPixmapCopy; |
373 | 221 | CompSize rootPixmapSize; | 223 | CompSize rootPixmapSize; |
374 | 224 | |||
375 | 225 | const char *glVendor, *glRenderer, *glVersion; | ||
376 | 222 | }; | 226 | }; |
377 | 223 | 227 | ||
378 | 224 | class PrivateGLWindow : | 228 | class PrivateGLWindow : |
379 | 225 | 229 | ||
380 | === modified file 'plugins/opengl/src/screen.cpp' | |||
381 | --- plugins/opengl/src/screen.cpp 2012-12-10 03:28:47 +0000 | |||
382 | +++ plugins/opengl/src/screen.cpp 2012-12-12 07:55:25 +0000 | |||
383 | @@ -36,6 +36,7 @@ | |||
384 | 36 | #include <boost/make_shared.hpp> | 36 | #include <boost/make_shared.hpp> |
385 | 37 | 37 | ||
386 | 38 | #include "privates.h" | 38 | #include "privates.h" |
387 | 39 | #include "blacklist/blacklist.h" | ||
388 | 39 | 40 | ||
389 | 40 | #include <dlfcn.h> | 41 | #include <dlfcn.h> |
390 | 41 | #include <math.h> | 42 | #include <math.h> |
391 | @@ -600,8 +601,6 @@ | |||
392 | 600 | GLfloat ambientLight[] = { 0.0f, 0.0f, 0.0f, 0.0f }; | 601 | GLfloat ambientLight[] = { 0.0f, 0.0f, 0.0f, 0.0f }; |
393 | 601 | GLfloat diffuseLight[] = { 0.9f, 0.9f, 0.9f, 0.9f }; | 602 | GLfloat diffuseLight[] = { 0.9f, 0.9f, 0.9f, 0.9f }; |
394 | 602 | GLfloat light0Position[] = { -0.5f, 0.5f, -9.0f, 1.0f }; | 603 | GLfloat light0Position[] = { -0.5f, 0.5f, -9.0f, 1.0f }; |
395 | 603 | const char *glRenderer; | ||
396 | 604 | const char *glVendor; | ||
397 | 605 | CompOption::Vector o (0); | 604 | CompOption::Vector o (0); |
398 | 606 | 605 | ||
399 | 607 | priv->ctx = glXCreateContext (dpy, visinfo, NULL, True); | 606 | priv->ctx = glXCreateContext (dpy, visinfo, NULL, True); |
400 | @@ -640,8 +639,14 @@ | |||
401 | 640 | return false; | 639 | return false; |
402 | 641 | } | 640 | } |
403 | 642 | 641 | ||
406 | 643 | glRenderer = (const char *) glGetString (GL_RENDERER); | 642 | const char *glVendor = (const char *) glGetString (GL_VENDOR); |
407 | 644 | glVendor = (const char *) glGetString (GL_VENDOR); | 643 | const char *glRenderer = (const char *) glGetString (GL_RENDERER); |
408 | 644 | const char *glVersion = (const char *) glGetString (GL_VERSION); | ||
409 | 645 | |||
410 | 646 | priv->glVendor = glVendor; | ||
411 | 647 | priv->glRenderer = glRenderer; | ||
412 | 648 | priv->glVersion = glVersion; | ||
413 | 649 | |||
414 | 645 | if (glRenderer != NULL && | 650 | if (glRenderer != NULL && |
415 | 646 | (strcmp (glRenderer, "Software Rasterizer") == 0 || | 651 | (strcmp (glRenderer, "Software Rasterizer") == 0 || |
416 | 647 | strcmp (glRenderer, "Mesa X11") == 0)) | 652 | strcmp (glRenderer, "Mesa X11") == 0)) |
417 | @@ -1240,7 +1245,10 @@ | |||
418 | 1240 | shaderCache (), | 1245 | shaderCache (), |
419 | 1241 | autoProgram (new GLScreenAutoProgram(gs)), | 1246 | autoProgram (new GLScreenAutoProgram(gs)), |
420 | 1242 | rootPixmapCopy (None), | 1247 | rootPixmapCopy (None), |
422 | 1243 | rootPixmapSize () | 1248 | rootPixmapSize (), |
423 | 1249 | glVendor (NULL), | ||
424 | 1250 | glRenderer (NULL), | ||
425 | 1251 | glVersion (NULL) | ||
426 | 1244 | { | 1252 | { |
427 | 1245 | ScreenInterface::setHandler (screen); | 1253 | ScreenInterface::setHandler (screen); |
428 | 1246 | } | 1254 | } |
429 | @@ -2144,6 +2152,12 @@ | |||
430 | 2144 | CompositeScreen::get (screen)->damageScreen (); | 2152 | CompositeScreen::get (screen)->damageScreen (); |
431 | 2145 | } | 2153 | } |
432 | 2146 | 2154 | ||
433 | 2155 | bool | ||
434 | 2156 | PrivateGLScreen::driverIsBlacklisted (const char *regex) const | ||
435 | 2157 | { | ||
436 | 2158 | return blacklisted (regex, glVendor, glRenderer, glVersion); | ||
437 | 2159 | } | ||
438 | 2160 | |||
439 | 2147 | GLTexture::BindPixmapHandle | 2161 | GLTexture::BindPixmapHandle |
440 | 2148 | GLScreen::registerBindPixmap (GLTexture::BindPixmapProc proc) | 2162 | GLScreen::registerBindPixmap (GLTexture::BindPixmapProc proc) |
441 | 2149 | { | 2163 | { |
PASSED: Continuous integration, rev:3525 jenkins. qa.ubuntu. com/job/ compiz- ci/320/ jenkins. qa.ubuntu. com/job/ compiz- ci/./build= pbuilder, distribution= quantal, flavor= amd64/320/ console
http://
Executed test runs:
SUCCESS: http://
Click here to trigger a rebuild: jenkins. qa.ubuntu. com/job/ compiz- ci/320/ /rebuild/?
http://