1 |
commit: a898d3f2ba18dcc1461f5ba58ac3c1697467d817 |
2 |
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Nov 26 10:47:45 2015 +0000 |
4 |
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Nov 26 10:50:45 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a898d3f2 |
7 |
|
8 |
x11-wm/mutter: drop old revisions |
9 |
|
10 |
Package-Manager: portage-2.2.25 |
11 |
|
12 |
x11-wm/mutter/Manifest | 1 - |
13 |
x11-wm/mutter/files/mutter-3.14.2-automagic.patch | 90 --- |
14 |
.../mutter-3.16.3-GL_EXT_x11_sync_object.patch | 840 --------------------- |
15 |
.../mutter/files/mutter-3.16.3-crash-border.patch | 32 - |
16 |
x11-wm/mutter/files/mutter-3.16.3-fix-race.patch | 114 --- |
17 |
x11-wm/mutter/files/mutter-3.16.3-fix-return.patch | 32 - |
18 |
x11-wm/mutter/files/mutter-3.16.3-flickering.patch | 114 --- |
19 |
.../mutter-3.2.1-ignore-shadow-and-padding.patch | 91 --- |
20 |
x11-wm/mutter/mutter-3.16.3-r1.ebuild | 114 --- |
21 |
x11-wm/mutter/mutter-3.16.3.ebuild | 91 --- |
22 |
10 files changed, 1519 deletions(-) |
23 |
|
24 |
diff --git a/x11-wm/mutter/Manifest b/x11-wm/mutter/Manifest |
25 |
index a75354a..f16ae86 100644 |
26 |
--- a/x11-wm/mutter/Manifest |
27 |
+++ b/x11-wm/mutter/Manifest |
28 |
@@ -1,3 +1,2 @@ |
29 |
-DIST mutter-3.16.3.tar.xz 1550004 SHA256 ee0098487d1bfb8f28e3927fbb9df227d846555142d352f8693f56a08441c755 SHA512 31b6319c605d2576bf179e01534fe886a997677c63f19fa5d4a2d71e616a02de89d3edb069a444fb84c6fdf5a471afa2bda1d835c07e5d6dce712b2485e5937d WHIRLPOOL 23cc5161edb108137c9c983551b57659fc02c179bc7e08abebd5b26b98dcc1a17e00579a6b1e9f6fc544a92a877282fa1202a6390a14ef92ca6374dae1750112 |
30 |
DIST mutter-3.16.4.tar.xz 1535572 SHA256 23e8601a594a207fcfdf570e10710539176d41dd43304ef7b274a59d09e305da SHA512 b2d199ad883bb90adfbc96317f4ccc655ed6ff700307503551cb8a4d0a42b7dc9024d1b914935b57c6f50bed90e9ce592179b07a4061a3664443aa012e6b4fd9 WHIRLPOOL 8084e9e43643ce65947856fe81ce29619a2dae22866fb5c42d83563b10dfe55104f18cf8c7f06bce650681df94f658a5438be8fbcc8a0da8a2c2ceaa880f7ab2 |
31 |
DIST mutter-3.18.2.tar.xz 1468660 SHA256 8a69326f216c7575ed6cd53938b9cfc49b3b359cde95d3b6a7ed46c837261181 SHA512 99c138187e28a152d44421e240a9e644c56c74142ab125a0bf208ffaa3e711df9c319b37bbb9827ee3c79abce908aaf4ae6b6cb271b92d90add2642a39b74726 WHIRLPOOL 3c4f1e45a7306dedf8c9350ef130139f69a8d6a56c24ad4c1b52fd9120e72901b2898df0684fabb33a17ceec5261adfc340e09a65cbb1f90045aa34b9ec13342 |
32 |
|
33 |
diff --git a/x11-wm/mutter/files/mutter-3.14.2-automagic.patch b/x11-wm/mutter/files/mutter-3.14.2-automagic.patch |
34 |
deleted file mode 100644 |
35 |
index 3956004..0000000 |
36 |
--- a/x11-wm/mutter/files/mutter-3.14.2-automagic.patch |
37 |
+++ /dev/null |
38 |
@@ -1,90 +0,0 @@ |
39 |
-From d723a752982e12b7a7fb7998c3e28efd9082abd9 Mon Sep 17 00:00:00 2001 |
40 |
-From: Gilles Dartiguelongue <eva@g.o> |
41 |
-Date: Mon, 8 Dec 2014 22:00:32 +0100 |
42 |
-Subject: [PATCH] Make wayland support optional |
43 |
- |
44 |
---- |
45 |
- configure.ac | 58 +++++++++++++++++++++++++++++++++++++++++++--------------- |
46 |
- 1 file changed, 43 insertions(+), 15 deletions(-) |
47 |
- |
48 |
-diff --git a/configure.ac b/configure.ac |
49 |
-index 0870afa..251f909 100644 |
50 |
---- a/configure.ac |
51 |
-+++ b/configure.ac |
52 |
-@@ -200,23 +200,49 @@ AC_SUBST(XWAYLAND_PATH) |
53 |
- |
54 |
- PKG_CHECK_MODULES(MUTTER, $MUTTER_PC_MODULES) |
55 |
- |
56 |
--PKG_CHECK_MODULES(MUTTER_NATIVE_BACKEND, [clutter-egl-1.0 libdrm libsystemd libinput gbm >= 10.3], [have_native_backend=yes], [have_native_backend=no]) |
57 |
--if test $have_native_backend = yes; then |
58 |
-- AC_DEFINE([HAVE_NATIVE_BACKEND],[1],[Define if you want to enable the native (KMS) backend based on systemd]) |
59 |
--fi |
60 |
--AM_CONDITIONAL([HAVE_NATIVE_BACKEND],[test $have_native_backend = yes]) |
61 |
-- |
62 |
--PKG_CHECK_MODULES(MUTTER_WAYLAND, [clutter-wayland-1.0 clutter-wayland-compositor-1.0 wayland-server >= 1.5.90], [have_wayland=yes], [have_wayland=no]) |
63 |
--if test $have_wayland = yes; then |
64 |
-- AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no]) |
65 |
-- AS_IF([test $WAYLAND_SCANNER = "no"], |
66 |
-- AC_MSG_ERROR([Could not find wayland-scanner in your PATH, required for parsing wayland extension protocols])) |
67 |
-- AC_SUBST([WAYLAND_SCANNER]) |
68 |
-- |
69 |
-- AC_DEFINE([HAVE_WAYLAND],[1],[Define if you want to enable Wayland support]) |
70 |
--fi |
71 |
-+have_wayland=no |
72 |
-+AC_ARG_ENABLE( |
73 |
-+ [wayland], |
74 |
-+ AS_HELP_STRING([--disable-wayland], [disable mutter on wayland support]), |
75 |
-+ [], |
76 |
-+ enable_wayland=yes |
77 |
-+) |
78 |
-+AS_IF([test "$enable_wayland" != "no"], |
79 |
-+ [ |
80 |
-+ PKG_CHECK_MODULES([MUTTER_WAYLAND], |
81 |
-+ [clutter-wayland-1.0 clutter-wayland-compositor-1.0 wayland-server >= 1.5.90], |
82 |
-+ [ |
83 |
-+ have_wayland=yes |
84 |
-+ AC_PATH_PROG([WAYLAND_SCANNER],[wayland-scanner],[no]) |
85 |
-+ AS_IF([test $WAYLAND_SCANNER = "no"], |
86 |
-+ [AC_MSG_ERROR([Could not find wayland-scanner in your PATH, required for parsing wayland extension protocols])]) |
87 |
-+ AC_SUBST([WAYLAND_SCANNER]) |
88 |
-+ AC_DEFINE([HAVE_WAYLAND],[1],[Define if you want to enable Wayland support]) |
89 |
-+ ], |
90 |
-+ [have_wayland=no]) |
91 |
-+]) |
92 |
- AM_CONDITIONAL([HAVE_WAYLAND],[test $have_wayland = yes]) |
93 |
- |
94 |
-+have_native_backend=no |
95 |
-+AC_ARG_ENABLE( |
96 |
-+ [native-backend], |
97 |
-+ AS_HELP_STRING([--disable-native-backend], [disable mutter native (KMS) backend]), |
98 |
-+ [], |
99 |
-+ enable_native_backend=yes |
100 |
-+) |
101 |
-+AS_IF([test "$enable_native_backend" != "no"], |
102 |
-+ [ |
103 |
-+ PKG_CHECK_MODULES([MUTTER_NATIVE_BACKEND], |
104 |
-+ [clutter-egl-1.0 libdrm libsystemd libinput gudev-1.0 gbm >= 10.3], |
105 |
-+ [ |
106 |
-+ have_native_backend=yes |
107 |
-+ AC_DEFINE([HAVE_NATIVE_BACKEND],[1], |
108 |
-+ [Define if you want to enable the native (KMS) backend based on systemd]) |
109 |
-+ ], |
110 |
-+ [have_native_backend=no]) |
111 |
-+]) |
112 |
-+AM_CONDITIONAL([HAVE_NATIVE_BACKEND],[test $have_native_backend = yes]) |
113 |
-+ |
114 |
- PKG_CHECK_EXISTS([xi >= 1.6.99.1], |
115 |
- AC_DEFINE([HAVE_XI23],[1],[Define if you have support for XInput 2.3 or greater])) |
116 |
- |
117 |
-@@ -416,6 +442,8 @@ mutter-$VERSION |
118 |
- libcanberra: ${have_libcanberra} |
119 |
- Introspection: ${found_introspection} |
120 |
- Session management: ${found_sm} |
121 |
-+ Wayland: ${have_wayland} |
122 |
-+ Native (KMS) backend: ${have_native_backend} |
123 |
- " |
124 |
- |
125 |
- |
126 |
--- |
127 |
-2.2.0 |
128 |
- |
129 |
|
130 |
diff --git a/x11-wm/mutter/files/mutter-3.16.3-GL_EXT_x11_sync_object.patch b/x11-wm/mutter/files/mutter-3.16.3-GL_EXT_x11_sync_object.patch |
131 |
deleted file mode 100644 |
132 |
index 401c175..0000000 |
133 |
--- a/x11-wm/mutter/files/mutter-3.16.3-GL_EXT_x11_sync_object.patch |
134 |
+++ /dev/null |
135 |
@@ -1,840 +0,0 @@ |
136 |
-From 9cc80497a262edafc58062fd860ef7a9dcab688c Mon Sep 17 00:00:00 2001 |
137 |
-From: Rui Matos <tiagomatos@×××××.com> |
138 |
-Date: Fri, 18 Apr 2014 20:21:20 +0200 |
139 |
-Subject: compositor: Add support for GL_EXT_x11_sync_object |
140 |
- |
141 |
-If GL advertises this extension we'll use it to synchronize X with GL |
142 |
-rendering instead of relying on the XSync() behavior with open source |
143 |
-drivers. |
144 |
- |
145 |
-Some driver bugs were uncovered while working on this so if we have |
146 |
-had to reboot the ring a few times, something is probably wrong and |
147 |
-we're likely to just make things worse by continuing to try. Let's |
148 |
-err on the side of caution, disable ourselves and fallback to the |
149 |
-XSync() path in the compositor. |
150 |
- |
151 |
-https://bugzilla.gnome.org/show_bug.cgi?id=728464 |
152 |
- |
153 |
-diff --git a/configure.ac b/configure.ac |
154 |
-index 01d75cb..6eea6b2 100644 |
155 |
---- a/configure.ac |
156 |
-+++ b/configure.ac |
157 |
-@@ -332,6 +332,11 @@ fi |
158 |
- |
159 |
- GTK_DOC_CHECK([1.15], [--flavour no-tmpl]) |
160 |
- |
161 |
-+AC_CHECK_DECL([GL_EXT_x11_sync_object], |
162 |
-+ [], |
163 |
-+ [AC_MSG_ERROR([GL_EXT_x11_sync_object definition not found, please update your GL headers])], |
164 |
-+ [#include <GL/glx.h>]) |
165 |
-+ |
166 |
- #### Warnings (last since -Werror can disturb other tests) |
167 |
- |
168 |
- # Stay command-line compatible with the gnome-common configure option. Here |
169 |
-diff --git a/src/Makefile.am b/src/Makefile.am |
170 |
-index baadb41..a4e07a9 100644 |
171 |
---- a/src/Makefile.am |
172 |
-+++ b/src/Makefile.am |
173 |
-@@ -139,6 +139,8 @@ libmutter_la_SOURCES = \ |
174 |
- compositor/meta-surface-actor.h \ |
175 |
- compositor/meta-surface-actor-x11.c \ |
176 |
- compositor/meta-surface-actor-x11.h \ |
177 |
-+ compositor/meta-sync-ring.c \ |
178 |
-+ compositor/meta-sync-ring.h \ |
179 |
- compositor/meta-texture-rectangle.c \ |
180 |
- compositor/meta-texture-rectangle.h \ |
181 |
- compositor/meta-texture-tower.c \ |
182 |
-diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c |
183 |
-index 3ff8431..ac38ffc 100644 |
184 |
---- a/src/backends/x11/meta-backend-x11.c |
185 |
-+++ b/src/backends/x11/meta-backend-x11.c |
186 |
-@@ -45,6 +45,7 @@ |
187 |
- #include <meta/util.h> |
188 |
- #include "display-private.h" |
189 |
- #include "compositor/compositor-private.h" |
190 |
-+#include "compositor/meta-sync-ring.h" |
191 |
- |
192 |
- struct _MetaBackendX11Private |
193 |
- { |
194 |
-@@ -255,6 +256,8 @@ handle_host_xevent (MetaBackend *backend, |
195 |
- MetaCompositor *compositor = display->compositor; |
196 |
- if (meta_plugin_manager_xevent_filter (compositor->plugin_mgr, event)) |
197 |
- bypass_clutter = TRUE; |
198 |
-+ if (compositor->have_x11_sync_object) |
199 |
-+ meta_sync_ring_handle_event (event); |
200 |
- } |
201 |
- } |
202 |
- |
203 |
-diff --git a/src/compositor/compositor-private.h b/src/compositor/compositor-private.h |
204 |
-index 80fb4e2..9e3e73d 100644 |
205 |
---- a/src/compositor/compositor-private.h |
206 |
-+++ b/src/compositor/compositor-private.h |
207 |
-@@ -15,7 +15,8 @@ struct _MetaCompositor |
208 |
- { |
209 |
- MetaDisplay *display; |
210 |
- |
211 |
-- guint repaint_func_id; |
212 |
-+ guint pre_paint_func_id; |
213 |
-+ guint post_paint_func_id; |
214 |
- |
215 |
- gint64 server_time_query_time; |
216 |
- gint64 server_time_offset; |
217 |
-@@ -40,6 +41,7 @@ struct _MetaCompositor |
218 |
- MetaPluginManager *plugin_mgr; |
219 |
- |
220 |
- gboolean frame_has_updated_xsurfaces; |
221 |
-+ gboolean have_x11_sync_object; |
222 |
- }; |
223 |
- |
224 |
- /* Wait 2ms after vblank before starting to draw next frame */ |
225 |
-diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c |
226 |
-index 250d489..554faa1 100644 |
227 |
---- a/src/compositor/compositor.c |
228 |
-+++ b/src/compositor/compositor.c |
229 |
-@@ -79,6 +79,7 @@ |
230 |
- #include "frame.h" |
231 |
- #include <X11/extensions/shape.h> |
232 |
- #include <X11/extensions/Xcomposite.h> |
233 |
-+#include "meta-sync-ring.h" |
234 |
- |
235 |
- #include "backends/x11/meta-backend-x11.h" |
236 |
- |
237 |
-@@ -125,7 +126,11 @@ meta_switch_workspace_completed (MetaCompositor *compositor) |
238 |
- void |
239 |
- meta_compositor_destroy (MetaCompositor *compositor) |
240 |
- { |
241 |
-- clutter_threads_remove_repaint_func (compositor->repaint_func_id); |
242 |
-+ clutter_threads_remove_repaint_func (compositor->pre_paint_func_id); |
243 |
-+ clutter_threads_remove_repaint_func (compositor->post_paint_func_id); |
244 |
-+ |
245 |
-+ if (compositor->have_x11_sync_object) |
246 |
-+ meta_sync_ring_destroy (); |
247 |
- } |
248 |
- |
249 |
- static void |
250 |
-@@ -468,13 +473,11 @@ meta_compositor_manage (MetaCompositor *compositor) |
251 |
- MetaDisplay *display = compositor->display; |
252 |
- Display *xdisplay = display->xdisplay; |
253 |
- MetaScreen *screen = display->screen; |
254 |
-+ MetaBackend *backend = meta_get_backend (); |
255 |
- |
256 |
- meta_screen_set_cm_selection (display->screen); |
257 |
- |
258 |
-- { |
259 |
-- MetaBackend *backend = meta_get_backend (); |
260 |
-- compositor->stage = meta_backend_get_stage (backend); |
261 |
-- } |
262 |
-+ compositor->stage = meta_backend_get_stage (backend); |
263 |
- |
264 |
- /* We use connect_after() here to accomodate code in GNOME Shell that, |
265 |
- * when benchmarking drawing performance, connects to ::after-paint |
266 |
-@@ -510,7 +513,7 @@ meta_compositor_manage (MetaCompositor *compositor) |
267 |
- |
268 |
- compositor->output = screen->composite_overlay_window; |
269 |
- |
270 |
-- xwin = meta_backend_x11_get_xwindow (META_BACKEND_X11 (meta_get_backend ())); |
271 |
-+ xwin = meta_backend_x11_get_xwindow (META_BACKEND_X11 (backend)); |
272 |
- |
273 |
- XReparentWindow (xdisplay, xwin, compositor->output, 0, 0); |
274 |
- |
275 |
-@@ -530,6 +533,9 @@ meta_compositor_manage (MetaCompositor *compositor) |
276 |
- * contents until we show the stage. |
277 |
- */ |
278 |
- XMapWindow (xdisplay, compositor->output); |
279 |
-+ |
280 |
-+ compositor->have_x11_sync_object = |
281 |
-+ meta_sync_ring_init (meta_backend_x11_get_xdisplay (META_BACKEND_X11 (backend))); |
282 |
- } |
283 |
- |
284 |
- redirect_windows (display->screen); |
285 |
-@@ -1044,11 +1050,12 @@ frame_callback (CoglOnscreen *onscreen, |
286 |
- } |
287 |
- } |
288 |
- |
289 |
--static void |
290 |
--pre_paint_windows (MetaCompositor *compositor) |
291 |
-+static gboolean |
292 |
-+meta_pre_paint_func (gpointer data) |
293 |
- { |
294 |
- GList *l; |
295 |
- MetaWindowActor *top_window; |
296 |
-+ MetaCompositor *compositor = data; |
297 |
- |
298 |
- if (compositor->onscreen == NULL) |
299 |
- { |
300 |
-@@ -1060,7 +1067,7 @@ pre_paint_windows (MetaCompositor *compositor) |
301 |
- } |
302 |
- |
303 |
- if (compositor->windows == NULL) |
304 |
-- return; |
305 |
-+ return TRUE; |
306 |
- |
307 |
- top_window = g_list_last (compositor->windows)->data; |
308 |
- |
309 |
-@@ -1077,10 +1084,12 @@ pre_paint_windows (MetaCompositor *compositor) |
310 |
- { |
311 |
- /* We need to make sure that any X drawing that happens before |
312 |
- * the XDamageSubtract() for each window above is visible to |
313 |
-- * subsequent GL rendering; the only standardized way to do this |
314 |
-- * is EXT_x11_sync_object, which isn't yet widely available. For |
315 |
-- * now, we count on details of Xorg and the open source drivers, |
316 |
-- * and hope for the best otherwise. |
317 |
-+ * subsequent GL rendering; the standardized way to do this is |
318 |
-+ * GL_EXT_X11_sync_object. Since this isn't implemented yet in |
319 |
-+ * mesa, we also have a path that relies on the implementation |
320 |
-+ * of the open source drivers. |
321 |
-+ * |
322 |
-+ * Anything else, we just hope for the best. |
323 |
- * |
324 |
- * Xorg and open source driver specifics: |
325 |
- * |
326 |
-@@ -1095,17 +1104,28 @@ pre_paint_windows (MetaCompositor *compositor) |
327 |
- * round trip request at this point is sufficient to flush the |
328 |
- * GLX buffers. |
329 |
- */ |
330 |
-- XSync (compositor->display->xdisplay, False); |
331 |
-- |
332 |
-- compositor->frame_has_updated_xsurfaces = FALSE; |
333 |
-+ if (compositor->have_x11_sync_object) |
334 |
-+ compositor->have_x11_sync_object = meta_sync_ring_insert_wait (); |
335 |
-+ else |
336 |
-+ XSync (compositor->display->xdisplay, False); |
337 |
- } |
338 |
-+ |
339 |
-+ return TRUE; |
340 |
- } |
341 |
- |
342 |
- static gboolean |
343 |
--meta_repaint_func (gpointer data) |
344 |
-+meta_post_paint_func (gpointer data) |
345 |
- { |
346 |
- MetaCompositor *compositor = data; |
347 |
-- pre_paint_windows (compositor); |
348 |
-+ |
349 |
-+ if (compositor->frame_has_updated_xsurfaces) |
350 |
-+ { |
351 |
-+ if (compositor->have_x11_sync_object) |
352 |
-+ compositor->have_x11_sync_object = meta_sync_ring_after_frame (); |
353 |
-+ |
354 |
-+ compositor->frame_has_updated_xsurfaces = FALSE; |
355 |
-+ } |
356 |
-+ |
357 |
- return TRUE; |
358 |
- } |
359 |
- |
360 |
-@@ -1140,10 +1160,16 @@ meta_compositor_new (MetaDisplay *display) |
361 |
- G_CALLBACK (on_shadow_factory_changed), |
362 |
- compositor); |
363 |
- |
364 |
-- compositor->repaint_func_id = clutter_threads_add_repaint_func (meta_repaint_func, |
365 |
-- compositor, |
366 |
-- NULL); |
367 |
-- |
368 |
-+ compositor->pre_paint_func_id = |
369 |
-+ clutter_threads_add_repaint_func_full (CLUTTER_REPAINT_FLAGS_PRE_PAINT, |
370 |
-+ meta_pre_paint_func, |
371 |
-+ compositor, |
372 |
-+ NULL); |
373 |
-+ compositor->post_paint_func_id = |
374 |
-+ clutter_threads_add_repaint_func_full (CLUTTER_REPAINT_FLAGS_POST_PAINT, |
375 |
-+ meta_post_paint_func, |
376 |
-+ compositor, |
377 |
-+ NULL); |
378 |
- return compositor; |
379 |
- } |
380 |
- |
381 |
-diff --git a/src/compositor/meta-sync-ring.c b/src/compositor/meta-sync-ring.c |
382 |
-new file mode 100644 |
383 |
-index 0000000..4ee61f8 |
384 |
---- /dev/null |
385 |
-+++ b/src/compositor/meta-sync-ring.c |
386 |
-@@ -0,0 +1,566 @@ |
387 |
-+/* |
388 |
-+ * This is based on an original C++ implementation for compiz that |
389 |
-+ * carries the following copyright notice: |
390 |
-+ * |
391 |
-+ * |
392 |
-+ * Copyright © 2011 NVIDIA Corporation |
393 |
-+ * |
394 |
-+ * Permission to use, copy, modify, distribute, and sell this software |
395 |
-+ * and its documentation for any purpose is hereby granted without |
396 |
-+ * fee, provided that the above copyright notice appear in all copies |
397 |
-+ * and that both that copyright notice and this permission notice |
398 |
-+ * appear in supporting documentation, and that the name of NVIDIA |
399 |
-+ * Corporation not be used in advertising or publicity pertaining to |
400 |
-+ * distribution of the software without specific, written prior |
401 |
-+ * permission. NVIDIA Corporation makes no representations about the |
402 |
-+ * suitability of this software for any purpose. It is provided "as |
403 |
-+ * is" without express or implied warranty. |
404 |
-+ * |
405 |
-+ * NVIDIA CORPORATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS |
406 |
-+ * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND |
407 |
-+ * FITNESS, IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE FOR ANY |
408 |
-+ * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
409 |
-+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN |
410 |
-+ * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING |
411 |
-+ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS |
412 |
-+ * SOFTWARE. |
413 |
-+ * |
414 |
-+ * Authors: James Jones <jajones@××××××.com> |
415 |
-+ */ |
416 |
-+ |
417 |
-+#include <string.h> |
418 |
-+ |
419 |
-+#include <GL/gl.h> |
420 |
-+#include <GL/glx.h> |
421 |
-+#include <X11/extensions/sync.h> |
422 |
-+ |
423 |
-+#include <cogl/cogl.h> |
424 |
-+#include <clutter/clutter.h> |
425 |
-+ |
426 |
-+#include <meta/util.h> |
427 |
-+ |
428 |
-+#include "meta-sync-ring.h" |
429 |
-+ |
430 |
-+/* Theory of operation: |
431 |
-+ * |
432 |
-+ * We use a ring of NUM_SYNCS fence objects. On each frame we advance |
433 |
-+ * to the next fence in the ring. For each fence we do: |
434 |
-+ * |
435 |
-+ * 1. fence is XSyncTriggerFence()'d and glWaitSync()'d |
436 |
-+ * 2. NUM_SYNCS / 2 frames later, fence should be triggered |
437 |
-+ * 3. fence is XSyncResetFence()'d |
438 |
-+ * 4. NUM_SYNCS / 2 frames later, fence should be reset |
439 |
-+ * 5. go back to 1 and re-use fence |
440 |
-+ * |
441 |
-+ * glClientWaitSync() and XAlarms are used in steps 2 and 4, |
442 |
-+ * respectively, to double-check the expectections. |
443 |
-+ */ |
444 |
-+ |
445 |
-+#define NUM_SYNCS 10 |
446 |
-+#define MAX_SYNC_WAIT_TIME (1 * 1000 * 1000 * 1000) /* one sec */ |
447 |
-+#define MAX_REBOOT_ATTEMPTS 2 |
448 |
-+ |
449 |
-+typedef enum |
450 |
-+{ |
451 |
-+ META_SYNC_STATE_READY, |
452 |
-+ META_SYNC_STATE_WAITING, |
453 |
-+ META_SYNC_STATE_DONE, |
454 |
-+ META_SYNC_STATE_RESET_PENDING, |
455 |
-+} MetaSyncState; |
456 |
-+ |
457 |
-+typedef struct |
458 |
-+{ |
459 |
-+ Display *xdisplay; |
460 |
-+ |
461 |
-+ XSyncFence xfence; |
462 |
-+ GLsync glsync; |
463 |
-+ |
464 |
-+ XSyncCounter xcounter; |
465 |
-+ XSyncAlarm xalarm; |
466 |
-+ XSyncValue next_counter_value; |
467 |
-+ |
468 |
-+ MetaSyncState state; |
469 |
-+} MetaSync; |
470 |
-+ |
471 |
-+typedef struct |
472 |
-+{ |
473 |
-+ Display *xdisplay; |
474 |
-+ int xsync_event_base; |
475 |
-+ int xsync_error_base; |
476 |
-+ |
477 |
-+ GHashTable *alarm_to_sync; |
478 |
-+ |
479 |
-+ MetaSync *syncs_array[NUM_SYNCS]; |
480 |
-+ guint current_sync_idx; |
481 |
-+ MetaSync *current_sync; |
482 |
-+ guint warmup_syncs; |
483 |
-+ |
484 |
-+ guint reboots; |
485 |
-+} MetaSyncRing; |
486 |
-+ |
487 |
-+static MetaSyncRing meta_sync_ring = { 0 }; |
488 |
-+ |
489 |
-+static XSyncValue SYNC_VALUE_ZERO; |
490 |
-+static XSyncValue SYNC_VALUE_ONE; |
491 |
-+ |
492 |
-+static const char* (*meta_gl_get_string) (GLenum name); |
493 |
-+static void (*meta_gl_get_integerv) (GLenum pname, |
494 |
-+ GLint *params); |
495 |
-+static const char* (*meta_gl_get_stringi) (GLenum name, |
496 |
-+ GLuint index); |
497 |
-+static void (*meta_gl_delete_sync) (GLsync sync); |
498 |
-+static GLenum (*meta_gl_client_wait_sync) (GLsync sync, |
499 |
-+ GLbitfield flags, |
500 |
-+ GLuint64 timeout); |
501 |
-+static void (*meta_gl_wait_sync) (GLsync sync, |
502 |
-+ GLbitfield flags, |
503 |
-+ GLuint64 timeout); |
504 |
-+static GLsync (*meta_gl_import_sync) (GLenum external_sync_type, |
505 |
-+ GLintptr external_sync, |
506 |
-+ GLbitfield flags); |
507 |
-+ |
508 |
-+static MetaSyncRing * |
509 |
-+meta_sync_ring_get (void) |
510 |
-+{ |
511 |
-+ if (meta_sync_ring.reboots > MAX_REBOOT_ATTEMPTS) |
512 |
-+ return NULL; |
513 |
-+ |
514 |
-+ return &meta_sync_ring; |
515 |
-+} |
516 |
-+ |
517 |
-+static gboolean |
518 |
-+load_gl_symbol (const char *name, |
519 |
-+ void **func) |
520 |
-+{ |
521 |
-+ *func = cogl_get_proc_address (name); |
522 |
-+ if (!*func) |
523 |
-+ { |
524 |
-+ meta_verbose ("MetaSyncRing: failed to resolve required GL symbol \"%s\"\n", name); |
525 |
-+ return FALSE; |
526 |
-+ } |
527 |
-+ return TRUE; |
528 |
-+} |
529 |
-+ |
530 |
-+static gboolean |
531 |
-+check_gl_extensions (void) |
532 |
-+{ |
533 |
-+ ClutterBackend *backend; |
534 |
-+ CoglContext *cogl_context; |
535 |
-+ CoglDisplay *cogl_display; |
536 |
-+ CoglRenderer *cogl_renderer; |
537 |
-+ |
538 |
-+ backend = clutter_get_default_backend (); |
539 |
-+ cogl_context = clutter_backend_get_cogl_context (backend); |
540 |
-+ cogl_display = cogl_context_get_display (cogl_context); |
541 |
-+ cogl_renderer = cogl_display_get_renderer (cogl_display); |
542 |
-+ |
543 |
-+ switch (cogl_renderer_get_driver (cogl_renderer)) |
544 |
-+ { |
545 |
-+ case COGL_DRIVER_GL3: |
546 |
-+ { |
547 |
-+ int num_extensions, i; |
548 |
-+ gboolean arb_sync = FALSE; |
549 |
-+ gboolean x11_sync_object = FALSE; |
550 |
-+ |
551 |
-+ meta_gl_get_integerv (GL_NUM_EXTENSIONS, &num_extensions); |
552 |
-+ |
553 |
-+ for (i = 0; i < num_extensions; ++i) |
554 |
-+ { |
555 |
-+ const char *ext = meta_gl_get_stringi (GL_EXTENSIONS, i); |
556 |
-+ |
557 |
-+ if (g_strcmp0 ("GL_ARB_sync", ext) == 0) |
558 |
-+ arb_sync = TRUE; |
559 |
-+ else if (g_strcmp0 ("GL_EXT_x11_sync_object", ext) == 0) |
560 |
-+ x11_sync_object = TRUE; |
561 |
-+ } |
562 |
-+ |
563 |
-+ return arb_sync && x11_sync_object; |
564 |
-+ } |
565 |
-+ case COGL_DRIVER_GL: |
566 |
-+ { |
567 |
-+ const char *extensions = meta_gl_get_string (GL_EXTENSIONS); |
568 |
-+ return (extensions != NULL && |
569 |
-+ strstr (extensions, "GL_ARB_sync") != NULL && |
570 |
-+ strstr (extensions, "GL_EXT_x11_sync_object") != NULL); |
571 |
-+ } |
572 |
-+ default: |
573 |
-+ break; |
574 |
-+ } |
575 |
-+ |
576 |
-+ return FALSE; |
577 |
-+} |
578 |
-+ |
579 |
-+static gboolean |
580 |
-+load_required_symbols (void) |
581 |
-+{ |
582 |
-+ static gboolean success = FALSE; |
583 |
-+ |
584 |
-+ if (success) |
585 |
-+ return TRUE; |
586 |
-+ |
587 |
-+ /* We don't link against libGL directly because cogl may want to |
588 |
-+ * use something else. This assumes that cogl has been initialized |
589 |
-+ * and dynamically loaded libGL at this point. |
590 |
-+ */ |
591 |
-+ |
592 |
-+ if (!load_gl_symbol ("glGetString", (void **) &meta_gl_get_string)) |
593 |
-+ goto out; |
594 |
-+ if (!load_gl_symbol ("glGetIntegerv", (void **) &meta_gl_get_integerv)) |
595 |
-+ goto out; |
596 |
-+ if (!load_gl_symbol ("glGetStringi", (void **) &meta_gl_get_stringi)) |
597 |
-+ goto out; |
598 |
-+ |
599 |
-+ if (!check_gl_extensions ()) |
600 |
-+ { |
601 |
-+ meta_verbose ("MetaSyncRing: couldn't find required GL extensions\n"); |
602 |
-+ goto out; |
603 |
-+ } |
604 |
-+ |
605 |
-+ if (!load_gl_symbol ("glDeleteSync", (void **) &meta_gl_delete_sync)) |
606 |
-+ goto out; |
607 |
-+ if (!load_gl_symbol ("glClientWaitSync", (void **) &meta_gl_client_wait_sync)) |
608 |
-+ goto out; |
609 |
-+ if (!load_gl_symbol ("glWaitSync", (void **) &meta_gl_wait_sync)) |
610 |
-+ goto out; |
611 |
-+ if (!load_gl_symbol ("glImportSyncEXT", (void **) &meta_gl_import_sync)) |
612 |
-+ goto out; |
613 |
-+ |
614 |
-+ success = TRUE; |
615 |
-+ out: |
616 |
-+ return success; |
617 |
-+} |
618 |
-+ |
619 |
-+static void |
620 |
-+meta_sync_insert (MetaSync *self) |
621 |
-+{ |
622 |
-+ g_return_if_fail (self->state == META_SYNC_STATE_READY); |
623 |
-+ |
624 |
-+ XSyncTriggerFence (self->xdisplay, self->xfence); |
625 |
-+ XFlush (self->xdisplay); |
626 |
-+ |
627 |
-+ meta_gl_wait_sync (self->glsync, 0, GL_TIMEOUT_IGNORED); |
628 |
-+ |
629 |
-+ self->state = META_SYNC_STATE_WAITING; |
630 |
-+} |
631 |
-+ |
632 |
-+static GLenum |
633 |
-+meta_sync_check_update_finished (MetaSync *self, |
634 |
-+ GLuint64 timeout) |
635 |
-+{ |
636 |
-+ GLenum status = GL_WAIT_FAILED; |
637 |
-+ |
638 |
-+ switch (self->state) |
639 |
-+ { |
640 |
-+ case META_SYNC_STATE_DONE: |
641 |
-+ status = GL_ALREADY_SIGNALED; |
642 |
-+ break; |
643 |
-+ case META_SYNC_STATE_WAITING: |
644 |
-+ status = meta_gl_client_wait_sync (self->glsync, 0, timeout); |
645 |
-+ if (status == GL_ALREADY_SIGNALED || status == GL_CONDITION_SATISFIED) |
646 |
-+ self->state = META_SYNC_STATE_DONE; |
647 |
-+ break; |
648 |
-+ default: |
649 |
-+ break; |
650 |
-+ } |
651 |
-+ |
652 |
-+ g_warn_if_fail (status != GL_WAIT_FAILED); |
653 |
-+ |
654 |
-+ return status; |
655 |
-+} |
656 |
-+ |
657 |
-+static void |
658 |
-+meta_sync_reset (MetaSync *self) |
659 |
-+{ |
660 |
-+ XSyncAlarmAttributes attrs; |
661 |
-+ int overflow; |
662 |
-+ |
663 |
-+ g_return_if_fail (self->state == META_SYNC_STATE_DONE); |
664 |
-+ |
665 |
-+ XSyncResetFence (self->xdisplay, self->xfence); |
666 |
-+ |
667 |
-+ attrs.trigger.wait_value = self->next_counter_value; |
668 |
-+ |
669 |
-+ XSyncChangeAlarm (self->xdisplay, self->xalarm, XSyncCAValue, &attrs); |
670 |
-+ XSyncSetCounter (self->xdisplay, self->xcounter, self->next_counter_value); |
671 |
-+ |
672 |
-+ XSyncValueAdd (&self->next_counter_value, |
673 |
-+ self->next_counter_value, |
674 |
-+ SYNC_VALUE_ONE, |
675 |
-+ &overflow); |
676 |
-+ |
677 |
-+ self->state = META_SYNC_STATE_RESET_PENDING; |
678 |
-+} |
679 |
-+ |
680 |
-+static void |
681 |
-+meta_sync_handle_event (MetaSync *self, |
682 |
-+ XSyncAlarmNotifyEvent *event) |
683 |
-+{ |
684 |
-+ g_return_if_fail (event->alarm == self->xalarm); |
685 |
-+ g_return_if_fail (self->state == META_SYNC_STATE_RESET_PENDING); |
686 |
-+ |
687 |
-+ self->state = META_SYNC_STATE_READY; |
688 |
-+} |
689 |
-+ |
690 |
-+static MetaSync * |
691 |
-+meta_sync_new (Display *xdisplay) |
692 |
-+{ |
693 |
-+ MetaSync *self; |
694 |
-+ XSyncAlarmAttributes attrs; |
695 |
-+ |
696 |
-+ self = g_malloc0 (sizeof (MetaSync)); |
697 |
-+ |
698 |
-+ self->xdisplay = xdisplay; |
699 |
-+ |
700 |
-+ self->xfence = XSyncCreateFence (xdisplay, DefaultRootWindow (xdisplay), FALSE); |
701 |
-+ self->glsync = meta_gl_import_sync (GL_SYNC_X11_FENCE_EXT, self->xfence, 0); |
702 |
-+ |
703 |
-+ self->xcounter = XSyncCreateCounter (xdisplay, SYNC_VALUE_ZERO); |
704 |
-+ |
705 |
-+ attrs.trigger.counter = self->xcounter; |
706 |
-+ attrs.trigger.value_type = XSyncAbsolute; |
707 |
-+ attrs.trigger.wait_value = SYNC_VALUE_ONE; |
708 |
-+ attrs.trigger.test_type = XSyncPositiveTransition; |
709 |
-+ attrs.events = TRUE; |
710 |
-+ self->xalarm = XSyncCreateAlarm (xdisplay, |
711 |
-+ XSyncCACounter | |
712 |
-+ XSyncCAValueType | |
713 |
-+ XSyncCAValue | |
714 |
-+ XSyncCATestType | |
715 |
-+ XSyncCAEvents, |
716 |
-+ &attrs); |
717 |
-+ |
718 |
-+ XSyncIntToValue (&self->next_counter_value, 1); |
719 |
-+ |
720 |
-+ self->state = META_SYNC_STATE_READY; |
721 |
-+ |
722 |
-+ return self; |
723 |
-+} |
724 |
-+ |
725 |
-+static Bool |
726 |
-+alarm_event_predicate (Display *dpy, |
727 |
-+ XEvent *event, |
728 |
-+ XPointer data) |
729 |
-+{ |
730 |
-+ MetaSyncRing *ring = meta_sync_ring_get (); |
731 |
-+ |
732 |
-+ if (!ring) |
733 |
-+ return False; |
734 |
-+ |
735 |
-+ if (event->type == ring->xsync_event_base + XSyncAlarmNotify) |
736 |
-+ { |
737 |
-+ if (((MetaSync *) data)->xalarm == ((XSyncAlarmNotifyEvent *) event)->alarm) |
738 |
-+ return True; |
739 |
-+ } |
740 |
-+ return False; |
741 |
-+} |
742 |
-+ |
743 |
-+static void |
744 |
-+meta_sync_free (MetaSync *self) |
745 |
-+{ |
746 |
-+ /* When our assumptions don't hold, something has gone wrong but we |
747 |
-+ * don't know what, so we reboot the ring. While doing that, we |
748 |
-+ * trigger fences before deleting them to try to get ourselves out |
749 |
-+ * of a potentially stuck GPU state. |
750 |
-+ */ |
751 |
-+ switch (self->state) |
752 |
-+ { |
753 |
-+ case META_SYNC_STATE_WAITING: |
754 |
-+ case META_SYNC_STATE_DONE: |
755 |
-+ /* nothing to do */ |
756 |
-+ break; |
757 |
-+ case META_SYNC_STATE_RESET_PENDING: |
758 |
-+ { |
759 |
-+ XEvent event; |
760 |
-+ XIfEvent (self->xdisplay, &event, alarm_event_predicate, (XPointer) self); |
761 |
-+ meta_sync_handle_event (self, (XSyncAlarmNotifyEvent *) &event); |
762 |
-+ } |
763 |
-+ /* fall through */ |
764 |
-+ case META_SYNC_STATE_READY: |
765 |
-+ XSyncTriggerFence (self->xdisplay, self->xfence); |
766 |
-+ XFlush (self->xdisplay); |
767 |
-+ break; |
768 |
-+ default: |
769 |
-+ break; |
770 |
-+ } |
771 |
-+ |
772 |
-+ meta_gl_delete_sync (self->glsync); |
773 |
-+ XSyncDestroyFence (self->xdisplay, self->xfence); |
774 |
-+ XSyncDestroyCounter (self->xdisplay, self->xcounter); |
775 |
-+ XSyncDestroyAlarm (self->xdisplay, self->xalarm); |
776 |
-+ |
777 |
-+ g_free (self); |
778 |
-+} |
779 |
-+ |
780 |
-+gboolean |
781 |
-+meta_sync_ring_init (Display *xdisplay) |
782 |
-+{ |
783 |
-+ gint major, minor; |
784 |
-+ guint i; |
785 |
-+ MetaSyncRing *ring = meta_sync_ring_get (); |
786 |
-+ |
787 |
-+ if (!ring) |
788 |
-+ return FALSE; |
789 |
-+ |
790 |
-+ g_return_val_if_fail (xdisplay != NULL, FALSE); |
791 |
-+ g_return_val_if_fail (ring->xdisplay == NULL, FALSE); |
792 |
-+ |
793 |
-+ if (!load_required_symbols ()) |
794 |
-+ return FALSE; |
795 |
-+ |
796 |
-+ if (!XSyncQueryExtension (xdisplay, &ring->xsync_event_base, &ring->xsync_error_base) || |
797 |
-+ !XSyncInitialize (xdisplay, &major, &minor)) |
798 |
-+ return FALSE; |
799 |
-+ |
800 |
-+ XSyncIntToValue (&SYNC_VALUE_ZERO, 0); |
801 |
-+ XSyncIntToValue (&SYNC_VALUE_ONE, 1); |
802 |
-+ |
803 |
-+ ring->xdisplay = xdisplay; |
804 |
-+ |
805 |
-+ ring->alarm_to_sync = g_hash_table_new (NULL, NULL); |
806 |
-+ |
807 |
-+ for (i = 0; i < NUM_SYNCS; ++i) |
808 |
-+ { |
809 |
-+ MetaSync *sync = meta_sync_new (ring->xdisplay); |
810 |
-+ ring->syncs_array[i] = sync; |
811 |
-+ g_hash_table_replace (ring->alarm_to_sync, (gpointer) sync->xalarm, sync); |
812 |
-+ } |
813 |
-+ |
814 |
-+ ring->current_sync_idx = 0; |
815 |
-+ ring->current_sync = ring->syncs_array[0]; |
816 |
-+ ring->warmup_syncs = 0; |
817 |
-+ |
818 |
-+ return TRUE; |
819 |
-+} |
820 |
-+ |
821 |
-+void |
822 |
-+meta_sync_ring_destroy (void) |
823 |
-+{ |
824 |
-+ guint i; |
825 |
-+ MetaSyncRing *ring = meta_sync_ring_get (); |
826 |
-+ |
827 |
-+ if (!ring) |
828 |
-+ return; |
829 |
-+ |
830 |
-+ g_return_if_fail (ring->xdisplay != NULL); |
831 |
-+ |
832 |
-+ ring->current_sync_idx = 0; |
833 |
-+ ring->current_sync = NULL; |
834 |
-+ ring->warmup_syncs = 0; |
835 |
-+ |
836 |
-+ for (i = 0; i < NUM_SYNCS; ++i) |
837 |
-+ meta_sync_free (ring->syncs_array[i]); |
838 |
-+ |
839 |
-+ g_hash_table_destroy (ring->alarm_to_sync); |
840 |
-+ |
841 |
-+ ring->xsync_event_base = 0; |
842 |
-+ ring->xsync_error_base = 0; |
843 |
-+ ring->xdisplay = NULL; |
844 |
-+} |
845 |
-+ |
846 |
-+static gboolean |
847 |
-+meta_sync_ring_reboot (Display *xdisplay) |
848 |
-+{ |
849 |
-+ MetaSyncRing *ring = meta_sync_ring_get (); |
850 |
-+ |
851 |
-+ if (!ring) |
852 |
-+ return FALSE; |
853 |
-+ |
854 |
-+ meta_sync_ring_destroy (); |
855 |
-+ |
856 |
-+ ring->reboots += 1; |
857 |
-+ |
858 |
-+ if (!meta_sync_ring_get ()) |
859 |
-+ { |
860 |
-+ meta_warning ("MetaSyncRing: Too many reboots -- disabling\n"); |
861 |
-+ return FALSE; |
862 |
-+ } |
863 |
-+ |
864 |
-+ return meta_sync_ring_init (xdisplay); |
865 |
-+} |
866 |
-+ |
867 |
-+gboolean |
868 |
-+meta_sync_ring_after_frame (void) |
869 |
-+{ |
870 |
-+ MetaSyncRing *ring = meta_sync_ring_get (); |
871 |
-+ |
872 |
-+ if (!ring) |
873 |
-+ return FALSE; |
874 |
-+ |
875 |
-+ g_return_if_fail (ring->xdisplay != NULL); |
876 |
-+ |
877 |
-+ if (ring->warmup_syncs >= NUM_SYNCS / 2) |
878 |
-+ { |
879 |
-+ guint reset_sync_idx = (ring->current_sync_idx + NUM_SYNCS - (NUM_SYNCS / 2)) % NUM_SYNCS; |
880 |
-+ MetaSync *sync_to_reset = ring->syncs_array[reset_sync_idx]; |
881 |
-+ |
882 |
-+ GLenum status = meta_sync_check_update_finished (sync_to_reset, 0); |
883 |
-+ if (status == GL_TIMEOUT_EXPIRED) |
884 |
-+ { |
885 |
-+ meta_warning ("MetaSyncRing: We should never wait for a sync -- add more syncs?\n"); |
886 |
-+ status = meta_sync_check_update_finished (sync_to_reset, MAX_SYNC_WAIT_TIME); |
887 |
-+ } |
888 |
-+ |
889 |
-+ if (status != GL_ALREADY_SIGNALED && status != GL_CONDITION_SATISFIED) |
890 |
-+ { |
891 |
-+ meta_warning ("MetaSyncRing: Timed out waiting for sync object.\n"); |
892 |
-+ return meta_sync_ring_reboot (ring->xdisplay); |
893 |
-+ } |
894 |
-+ |
895 |
-+ meta_sync_reset (sync_to_reset); |
896 |
-+ } |
897 |
-+ else |
898 |
-+ { |
899 |
-+ ring->warmup_syncs += 1; |
900 |
-+ } |
901 |
-+ |
902 |
-+ ring->current_sync_idx += 1; |
903 |
-+ ring->current_sync_idx %= NUM_SYNCS; |
904 |
-+ |
905 |
-+ ring->current_sync = ring->syncs_array[ring->current_sync_idx]; |
906 |
-+ |
907 |
-+ return TRUE; |
908 |
-+} |
909 |
-+ |
910 |
-+gboolean |
911 |
-+meta_sync_ring_insert_wait (void) |
912 |
-+{ |
913 |
-+ MetaSyncRing *ring = meta_sync_ring_get (); |
914 |
-+ |
915 |
-+ if (!ring) |
916 |
-+ return FALSE; |
917 |
-+ |
918 |
-+ g_return_if_fail (ring->xdisplay != NULL); |
919 |
-+ |
920 |
-+ if (ring->current_sync->state != META_SYNC_STATE_READY) |
921 |
-+ { |
922 |
-+ meta_warning ("MetaSyncRing: Sync object is not ready -- were events handled properly?\n"); |
923 |
-+ if (!meta_sync_ring_reboot (ring->xdisplay)) |
924 |
-+ return FALSE; |
925 |
-+ } |
926 |
-+ |
927 |
-+ meta_sync_insert (ring->current_sync); |
928 |
-+ |
929 |
-+ return TRUE; |
930 |
-+} |
931 |
-+ |
932 |
-+void |
933 |
-+meta_sync_ring_handle_event (XEvent *xevent) |
934 |
-+{ |
935 |
-+ XSyncAlarmNotifyEvent *event; |
936 |
-+ MetaSync *sync; |
937 |
-+ MetaSyncRing *ring = meta_sync_ring_get (); |
938 |
-+ |
939 |
-+ if (!ring) |
940 |
-+ return; |
941 |
-+ |
942 |
-+ g_return_if_fail (ring->xdisplay != NULL); |
943 |
-+ |
944 |
-+ if (xevent->type != (ring->xsync_event_base + XSyncAlarmNotify)) |
945 |
-+ return; |
946 |
-+ |
947 |
-+ event = (XSyncAlarmNotifyEvent *) xevent; |
948 |
-+ |
949 |
-+ sync = g_hash_table_lookup (ring->alarm_to_sync, (gpointer) event->alarm); |
950 |
-+ if (sync) |
951 |
-+ meta_sync_handle_event (sync, event); |
952 |
-+} |
953 |
-diff --git a/src/compositor/meta-sync-ring.h b/src/compositor/meta-sync-ring.h |
954 |
-new file mode 100644 |
955 |
-index 0000000..6dca8ef |
956 |
---- /dev/null |
957 |
-+++ b/src/compositor/meta-sync-ring.h |
958 |
-@@ -0,0 +1,14 @@ |
959 |
-+#ifndef _META_SYNC_RING_H_ |
960 |
-+#define _META_SYNC_RING_H_ |
961 |
-+ |
962 |
-+#include <glib.h> |
963 |
-+ |
964 |
-+#include <X11/Xlib.h> |
965 |
-+ |
966 |
-+gboolean meta_sync_ring_init (Display *dpy); |
967 |
-+void meta_sync_ring_destroy (void); |
968 |
-+gboolean meta_sync_ring_after_frame (void); |
969 |
-+gboolean meta_sync_ring_insert_wait (void); |
970 |
-+void meta_sync_ring_handle_event (XEvent *event); |
971 |
-+ |
972 |
-+#endif /* _META_SYNC_RING_H_ */ |
973 |
--- |
974 |
-cgit v0.10.2 |
975 |
- |
976 |
|
977 |
diff --git a/x11-wm/mutter/files/mutter-3.16.3-crash-border.patch b/x11-wm/mutter/files/mutter-3.16.3-crash-border.patch |
978 |
deleted file mode 100644 |
979 |
index 9cbd0d0..0000000 |
980 |
--- a/x11-wm/mutter/files/mutter-3.16.3-crash-border.patch |
981 |
+++ /dev/null |
982 |
@@ -1,32 +0,0 @@ |
983 |
-From f60c33b5afc4b1dff0b31f17d7ae222db8aa789f Mon Sep 17 00:00:00 2001 |
984 |
-From: Marek Chalupa <mchqwerty@×××××.com> |
985 |
-Date: Fri, 3 Jul 2015 11:28:00 +0200 |
986 |
-Subject: frames: handle META_FRAME_CONTROL_NONE on left click |
987 |
- |
988 |
-We can get this operation in some cases, for example when |
989 |
-we're trying to resize window that cannot be resized. |
990 |
-This can occur with maximized windows that have a border |
991 |
-(without border we couldn't resize them by mouse in maximized state). |
992 |
-In this case we reached abort() beacuse we did not handle this op. |
993 |
- |
994 |
-https://bugzilla.gnome.org/show_bug.cgi?id=751884 |
995 |
- |
996 |
-diff --git a/src/ui/frames.c b/src/ui/frames.c |
997 |
-index 362d7b6..a2f7f45 100644 |
998 |
---- a/src/ui/frames.c |
999 |
-+++ b/src/ui/frames.c |
1000 |
-@@ -1053,6 +1053,11 @@ meta_frame_left_click_event (MetaUIFrame *frame, |
1001 |
- } |
1002 |
- |
1003 |
- return TRUE; |
1004 |
-+ case META_FRAME_CONTROL_NONE: |
1005 |
-+ /* We can get this for example when trying to resize window |
1006 |
-+ * that cannot be resized (e. g. it is maximized and the theme |
1007 |
-+ * currently used has borders for maximized windows), see #751884 */ |
1008 |
-+ return FALSE; |
1009 |
- default: |
1010 |
- g_assert_not_reached (); |
1011 |
- } |
1012 |
--- |
1013 |
-cgit v0.10.2 |
1014 |
- |
1015 |
|
1016 |
diff --git a/x11-wm/mutter/files/mutter-3.16.3-fix-race.patch b/x11-wm/mutter/files/mutter-3.16.3-fix-race.patch |
1017 |
deleted file mode 100644 |
1018 |
index a0b493b..0000000 |
1019 |
--- a/x11-wm/mutter/files/mutter-3.16.3-fix-race.patch |
1020 |
+++ /dev/null |
1021 |
@@ -1,114 +0,0 @@ |
1022 |
-From c77e482b60bea40a422691b16af02a429d9c2edc Mon Sep 17 00:00:00 2001 |
1023 |
-From: Aaron Plattner <aplattner@××××××.com> |
1024 |
-Date: Mon, 3 Aug 2015 21:15:15 -0700 |
1025 |
-Subject: compositor: Fix GL_EXT_x11_sync_object race condition |
1026 |
- |
1027 |
-The compositor maintains a ring of shared fences with the X server in order to |
1028 |
-properly synchronize rendering between the X server and the compositor's GPU |
1029 |
-channel. When all of the fences have been used, the compositor needs to reset |
1030 |
-one so that it can be reused. It does this by first waiting on the CPU for the |
1031 |
-fence to become triggered, and then sending a request to the X server to reset |
1032 |
-the fence. |
1033 |
- |
1034 |
-If the compositor's GPU channel is busy processing other work (e.g. the desktop |
1035 |
-switcher animation), then the X server may process the reset request before the |
1036 |
-GPU has consumed the fence. This causes the GPU channel to hang. |
1037 |
- |
1038 |
-Fix the problem by having the compositor's GPU channel trigger its own fence |
1039 |
-after waiting for the X server's fence. Wait for that fence on the CPU before |
1040 |
-sending the reset request to the X server. This ensures that the GPU has |
1041 |
-consumed the X11 fence before the server resets it. |
1042 |
- |
1043 |
-Signed-off-by: Aaron Plattner <aplattner@××××××.com> |
1044 |
- |
1045 |
-https://bugzilla.gnome.org/show_bug.cgi?id=728464 |
1046 |
- |
1047 |
-diff --git a/src/compositor/meta-sync-ring.c b/src/compositor/meta-sync-ring.c |
1048 |
-index 4ee61f8..44b1c41 100644 |
1049 |
---- a/src/compositor/meta-sync-ring.c |
1050 |
-+++ b/src/compositor/meta-sync-ring.c |
1051 |
-@@ -73,7 +73,8 @@ typedef struct |
1052 |
- Display *xdisplay; |
1053 |
- |
1054 |
- XSyncFence xfence; |
1055 |
-- GLsync glsync; |
1056 |
-+ GLsync gl_x11_sync; |
1057 |
-+ GLsync gpu_fence; |
1058 |
- |
1059 |
- XSyncCounter xcounter; |
1060 |
- XSyncAlarm xalarm; |
1061 |
-@@ -118,6 +119,8 @@ static void (*meta_gl_wait_sync) (GLsync sync, |
1062 |
- static GLsync (*meta_gl_import_sync) (GLenum external_sync_type, |
1063 |
- GLintptr external_sync, |
1064 |
- GLbitfield flags); |
1065 |
-+static GLsync (*meta_gl_fence_sync) (GLenum condition, |
1066 |
-+ GLbitfield flags); |
1067 |
- |
1068 |
- static MetaSyncRing * |
1069 |
- meta_sync_ring_get (void) |
1070 |
-@@ -224,6 +227,8 @@ load_required_symbols (void) |
1071 |
- goto out; |
1072 |
- if (!load_gl_symbol ("glImportSyncEXT", (void **) &meta_gl_import_sync)) |
1073 |
- goto out; |
1074 |
-+ if (!load_gl_symbol ("glFenceSync", (void **) &meta_gl_fence_sync)) |
1075 |
-+ goto out; |
1076 |
- |
1077 |
- success = TRUE; |
1078 |
- out: |
1079 |
-@@ -238,7 +243,8 @@ meta_sync_insert (MetaSync *self) |
1080 |
- XSyncTriggerFence (self->xdisplay, self->xfence); |
1081 |
- XFlush (self->xdisplay); |
1082 |
- |
1083 |
-- meta_gl_wait_sync (self->glsync, 0, GL_TIMEOUT_IGNORED); |
1084 |
-+ meta_gl_wait_sync (self->gl_x11_sync, 0, GL_TIMEOUT_IGNORED); |
1085 |
-+ self->gpu_fence = meta_gl_fence_sync (GL_SYNC_GPU_COMMANDS_COMPLETE, 0); |
1086 |
- |
1087 |
- self->state = META_SYNC_STATE_WAITING; |
1088 |
- } |
1089 |
-@@ -255,9 +261,13 @@ meta_sync_check_update_finished (MetaSync *self, |
1090 |
- status = GL_ALREADY_SIGNALED; |
1091 |
- break; |
1092 |
- case META_SYNC_STATE_WAITING: |
1093 |
-- status = meta_gl_client_wait_sync (self->glsync, 0, timeout); |
1094 |
-+ status = meta_gl_client_wait_sync (self->gpu_fence, 0, timeout); |
1095 |
- if (status == GL_ALREADY_SIGNALED || status == GL_CONDITION_SATISFIED) |
1096 |
-- self->state = META_SYNC_STATE_DONE; |
1097 |
-+ { |
1098 |
-+ self->state = META_SYNC_STATE_DONE; |
1099 |
-+ meta_gl_delete_sync (self->gpu_fence); |
1100 |
-+ self->gpu_fence = 0; |
1101 |
-+ } |
1102 |
- break; |
1103 |
- default: |
1104 |
- break; |
1105 |
-@@ -312,7 +322,8 @@ meta_sync_new (Display *xdisplay) |
1106 |
- self->xdisplay = xdisplay; |
1107 |
- |
1108 |
- self->xfence = XSyncCreateFence (xdisplay, DefaultRootWindow (xdisplay), FALSE); |
1109 |
-- self->glsync = meta_gl_import_sync (GL_SYNC_X11_FENCE_EXT, self->xfence, 0); |
1110 |
-+ self->gl_x11_sync = meta_gl_import_sync (GL_SYNC_X11_FENCE_EXT, self->xfence, 0); |
1111 |
-+ self->gpu_fence = 0; |
1112 |
- |
1113 |
- self->xcounter = XSyncCreateCounter (xdisplay, SYNC_VALUE_ZERO); |
1114 |
- |
1115 |
-@@ -365,6 +376,8 @@ meta_sync_free (MetaSync *self) |
1116 |
- switch (self->state) |
1117 |
- { |
1118 |
- case META_SYNC_STATE_WAITING: |
1119 |
-+ meta_gl_delete_sync (self->gpu_fence); |
1120 |
-+ break; |
1121 |
- case META_SYNC_STATE_DONE: |
1122 |
- /* nothing to do */ |
1123 |
- break; |
1124 |
-@@ -383,7 +396,7 @@ meta_sync_free (MetaSync *self) |
1125 |
- break; |
1126 |
- } |
1127 |
- |
1128 |
-- meta_gl_delete_sync (self->glsync); |
1129 |
-+ meta_gl_delete_sync (self->gl_x11_sync); |
1130 |
- XSyncDestroyFence (self->xdisplay, self->xfence); |
1131 |
- XSyncDestroyCounter (self->xdisplay, self->xcounter); |
1132 |
- XSyncDestroyAlarm (self->xdisplay, self->xalarm); |
1133 |
--- |
1134 |
-cgit v0.10.2 |
1135 |
- |
1136 |
|
1137 |
diff --git a/x11-wm/mutter/files/mutter-3.16.3-fix-return.patch b/x11-wm/mutter/files/mutter-3.16.3-fix-return.patch |
1138 |
deleted file mode 100644 |
1139 |
index 2898d52..0000000 |
1140 |
--- a/x11-wm/mutter/files/mutter-3.16.3-fix-return.patch |
1141 |
+++ /dev/null |
1142 |
@@ -1,32 +0,0 @@ |
1143 |
-From a54b1261d3ec5ccf7a8262c88557b6b952bc8a2e Mon Sep 17 00:00:00 2001 |
1144 |
-From: Ting-Wei Lan <lantw@×××××××××.org> |
1145 |
-Date: Sat, 8 Aug 2015 20:12:09 +0800 |
1146 |
-Subject: build: Fix return value in meta-sync-ring.c |
1147 |
- |
1148 |
-https://bugzilla.gnome.org/show_bug.cgi?id=753380 |
1149 |
- |
1150 |
-diff --git a/src/compositor/meta-sync-ring.c b/src/compositor/meta-sync-ring.c |
1151 |
-index 44b1c41..217ebe5 100644 |
1152 |
---- a/src/compositor/meta-sync-ring.c |
1153 |
-+++ b/src/compositor/meta-sync-ring.c |
1154 |
-@@ -499,7 +499,7 @@ meta_sync_ring_after_frame (void) |
1155 |
- if (!ring) |
1156 |
- return FALSE; |
1157 |
- |
1158 |
-- g_return_if_fail (ring->xdisplay != NULL); |
1159 |
-+ g_return_val_if_fail (ring->xdisplay != NULL, FALSE); |
1160 |
- |
1161 |
- if (ring->warmup_syncs >= NUM_SYNCS / 2) |
1162 |
- { |
1163 |
-@@ -542,7 +542,7 @@ meta_sync_ring_insert_wait (void) |
1164 |
- if (!ring) |
1165 |
- return FALSE; |
1166 |
- |
1167 |
-- g_return_if_fail (ring->xdisplay != NULL); |
1168 |
-+ g_return_val_if_fail (ring->xdisplay != NULL, FALSE); |
1169 |
- |
1170 |
- if (ring->current_sync->state != META_SYNC_STATE_READY) |
1171 |
- { |
1172 |
--- |
1173 |
-cgit v0.10.2 |
1174 |
- |
1175 |
|
1176 |
diff --git a/x11-wm/mutter/files/mutter-3.16.3-flickering.patch b/x11-wm/mutter/files/mutter-3.16.3-flickering.patch |
1177 |
deleted file mode 100644 |
1178 |
index 6267a4e..0000000 |
1179 |
--- a/x11-wm/mutter/files/mutter-3.16.3-flickering.patch |
1180 |
+++ /dev/null |
1181 |
@@ -1,114 +0,0 @@ |
1182 |
-From 916070cc7218cc80f4565ea265b0dd6e5e93cb98 Mon Sep 17 00:00:00 2001 |
1183 |
-From: Rui Matos <tiagomatos@×××××.com> |
1184 |
-Date: Wed, 12 Aug 2015 15:26:34 +0200 |
1185 |
-Subject: compositor: Handle fences in the frontend X connection |
1186 |
- |
1187 |
-Since mutter has two X connections and does damage handling on the |
1188 |
-frontend while fence triggering is done on the backend, we have a race |
1189 |
-between XDamageSubtract() and XSyncFenceTrigger() causing missed |
1190 |
-redraws in the GL_EXT_X11_sync_object path. |
1191 |
- |
1192 |
-If the fence trigger gets processed first by the server, any client |
1193 |
-drawing that happens between that and the damage subtract being |
1194 |
-processed and is completely contained in the last damage event box |
1195 |
-that mutter got, won't be included in the current frame nor will it |
1196 |
-cause a new damage event. |
1197 |
- |
1198 |
-A simple fix for this would be XSync()ing on the frontend connection |
1199 |
-after doing all the damage subtracts but that would add a round trip |
1200 |
-on every frame again which defeats the asynchronous design of X |
1201 |
-fences. |
1202 |
- |
1203 |
-Instead, if we move fence handling to the frontend we automatically |
1204 |
-get the right ordering between damage subtracts and fence triggers. |
1205 |
- |
1206 |
-https://bugzilla.gnome.org/show_bug.cgi?id=728464 |
1207 |
- |
1208 |
-diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c |
1209 |
-index ac38ffc..3ff8431 100644 |
1210 |
---- a/src/backends/x11/meta-backend-x11.c |
1211 |
-+++ b/src/backends/x11/meta-backend-x11.c |
1212 |
-@@ -45,7 +45,6 @@ |
1213 |
- #include <meta/util.h> |
1214 |
- #include "display-private.h" |
1215 |
- #include "compositor/compositor-private.h" |
1216 |
--#include "compositor/meta-sync-ring.h" |
1217 |
- |
1218 |
- struct _MetaBackendX11Private |
1219 |
- { |
1220 |
-@@ -256,8 +255,6 @@ handle_host_xevent (MetaBackend *backend, |
1221 |
- MetaCompositor *compositor = display->compositor; |
1222 |
- if (meta_plugin_manager_xevent_filter (compositor->plugin_mgr, event)) |
1223 |
- bypass_clutter = TRUE; |
1224 |
-- if (compositor->have_x11_sync_object) |
1225 |
-- meta_sync_ring_handle_event (event); |
1226 |
- } |
1227 |
- } |
1228 |
- |
1229 |
-diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c |
1230 |
-index 554faa1..2e182c2 100644 |
1231 |
---- a/src/compositor/compositor.c |
1232 |
-+++ b/src/compositor/compositor.c |
1233 |
-@@ -534,8 +534,7 @@ meta_compositor_manage (MetaCompositor *compositor) |
1234 |
- */ |
1235 |
- XMapWindow (xdisplay, compositor->output); |
1236 |
- |
1237 |
-- compositor->have_x11_sync_object = |
1238 |
-- meta_sync_ring_init (meta_backend_x11_get_xdisplay (META_BACKEND_X11 (backend))); |
1239 |
-+ compositor->have_x11_sync_object = meta_sync_ring_init (xdisplay); |
1240 |
- } |
1241 |
- |
1242 |
- redirect_windows (display->screen); |
1243 |
-@@ -737,6 +736,9 @@ meta_compositor_process_event (MetaCompositor *compositor, |
1244 |
- process_damage (compositor, (XDamageNotifyEvent *) event, window); |
1245 |
- } |
1246 |
- |
1247 |
-+ if (compositor->have_x11_sync_object) |
1248 |
-+ meta_sync_ring_handle_event (event); |
1249 |
-+ |
1250 |
- /* Clutter needs to know about MapNotify events otherwise it will |
1251 |
- think the stage is invisible */ |
1252 |
- if (!meta_is_wayland_compositor () && event->type == MapNotify) |
1253 |
-diff --git a/src/compositor/meta-sync-ring.c b/src/compositor/meta-sync-ring.c |
1254 |
-index 217ebe5..336ccd4 100644 |
1255 |
---- a/src/compositor/meta-sync-ring.c |
1256 |
-+++ b/src/compositor/meta-sync-ring.c |
1257 |
-@@ -322,7 +322,7 @@ meta_sync_new (Display *xdisplay) |
1258 |
- self->xdisplay = xdisplay; |
1259 |
- |
1260 |
- self->xfence = XSyncCreateFence (xdisplay, DefaultRootWindow (xdisplay), FALSE); |
1261 |
-- self->gl_x11_sync = meta_gl_import_sync (GL_SYNC_X11_FENCE_EXT, self->xfence, 0); |
1262 |
-+ self->gl_x11_sync = 0; |
1263 |
- self->gpu_fence = 0; |
1264 |
- |
1265 |
- self->xcounter = XSyncCreateCounter (xdisplay, SYNC_VALUE_ZERO); |
1266 |
-@@ -347,6 +347,13 @@ meta_sync_new (Display *xdisplay) |
1267 |
- return self; |
1268 |
- } |
1269 |
- |
1270 |
-+static void |
1271 |
-+meta_sync_import (MetaSync *self) |
1272 |
-+{ |
1273 |
-+ g_return_if_fail (self->gl_x11_sync == 0); |
1274 |
-+ self->gl_x11_sync = meta_gl_import_sync (GL_SYNC_X11_FENCE_EXT, self->xfence, 0); |
1275 |
-+} |
1276 |
-+ |
1277 |
- static Bool |
1278 |
- alarm_event_predicate (Display *dpy, |
1279 |
- XEvent *event, |
1280 |
-@@ -437,6 +444,12 @@ meta_sync_ring_init (Display *xdisplay) |
1281 |
- ring->syncs_array[i] = sync; |
1282 |
- g_hash_table_replace (ring->alarm_to_sync, (gpointer) sync->xalarm, sync); |
1283 |
- } |
1284 |
-+ /* Since the connection we create the X fences on isn't the same as |
1285 |
-+ * the one used for the GLX context, we need to XSync() here to |
1286 |
-+ * ensure glImportSync() succeeds. */ |
1287 |
-+ XSync (xdisplay, False); |
1288 |
-+ for (i = 0; i < NUM_SYNCS; ++i) |
1289 |
-+ meta_sync_import (ring->syncs_array[i]); |
1290 |
- |
1291 |
- ring->current_sync_idx = 0; |
1292 |
- ring->current_sync = ring->syncs_array[0]; |
1293 |
--- |
1294 |
-cgit v0.10.2 |
1295 |
- |
1296 |
|
1297 |
diff --git a/x11-wm/mutter/files/mutter-3.2.1-ignore-shadow-and-padding.patch b/x11-wm/mutter/files/mutter-3.2.1-ignore-shadow-and-padding.patch |
1298 |
deleted file mode 100644 |
1299 |
index bf4649e..0000000 |
1300 |
--- a/x11-wm/mutter/files/mutter-3.2.1-ignore-shadow-and-padding.patch |
1301 |
+++ /dev/null |
1302 |
@@ -1,91 +0,0 @@ |
1303 |
-Patch author: Timo Kluck <tkluck@×××××.nl> Wed, 21 Sep 2011 17:51:28 +0200 |
1304 |
- |
1305 |
-Patch to silently ignore padding and shadow tags in Ubuntu metacity themes. |
1306 |
- |
1307 |
-https://bugs.launchpad.net/bugs/800315 |
1308 |
-https://bugs.gentoo.org/show_bug.cgi?id=396673 |
1309 |
- |
1310 |
-diff --git a/src/ui/theme-parser.c b/src/ui/theme-parser.c |
1311 |
-index 9063541..63a881f 100644 |
1312 |
---- a/src/ui/theme-parser.c |
1313 |
-+++ b/src/ui/theme-parser.c |
1314 |
-@@ -90,7 +90,9 @@ typedef enum |
1315 |
- STATE_WINDOW, |
1316 |
- /* things we don't use any more but we can still parse: */ |
1317 |
- STATE_MENU_ICON, |
1318 |
-- STATE_FALLBACK |
1319 |
-+ STATE_FALLBACK, |
1320 |
-+ /* an ubuntu specific ignore-this-element state */ |
1321 |
-+ UBUNTU_STATE_IGNORE |
1322 |
- } ParseState; |
1323 |
- |
1324 |
- typedef struct |
1325 |
-@@ -1306,7 +1308,19 @@ parse_toplevel_element (GMarkupParseContext *context, |
1326 |
- */ |
1327 |
- push_state (info, STATE_FALLBACK); |
1328 |
- } |
1329 |
-- else |
1330 |
-+ else if (ELEMENT_IS ("shadow")) |
1331 |
-+ { |
1332 |
-+ /* ubuntu specific, workaround for light-themes: silently ignore shadow tag. |
1333 |
-+ */ |
1334 |
-+ push_state (info, UBUNTU_STATE_IGNORE); |
1335 |
-+ } |
1336 |
-+ else if (ELEMENT_IS ("padding")) |
1337 |
-+ { |
1338 |
-+ /* ubuntu specific, workaround for light-themes: silently ignore padding tag. |
1339 |
-+ */ |
1340 |
-+ push_state (info, UBUNTU_STATE_IGNORE); |
1341 |
-+ } |
1342 |
-+ else |
1343 |
- { |
1344 |
- set_error (error, context, |
1345 |
- G_MARKUP_ERROR, G_MARKUP_ERROR_PARSE, |
1346 |
-@@ -3027,6 +3041,18 @@ parse_style_element (GMarkupParseContext *context, |
1347 |
- |
1348 |
- push_state (info, STATE_BUTTON); |
1349 |
- } |
1350 |
-+ else if (ELEMENT_IS ("shadow")) |
1351 |
-+ { |
1352 |
-+ /* ubuntu specific, workaround for light-themes: silently ignore shadow tag. |
1353 |
-+ */ |
1354 |
-+ push_state (info, UBUNTU_STATE_IGNORE); |
1355 |
-+ } |
1356 |
-+ else if (ELEMENT_IS ("padding")) |
1357 |
-+ { |
1358 |
-+ /* ubuntu specific, workaround for light-themes: silently ignore padding tag. |
1359 |
-+ */ |
1360 |
-+ push_state (info, UBUNTU_STATE_IGNORE); |
1361 |
-+ } |
1362 |
- else |
1363 |
- { |
1364 |
- set_error (error, context, |
1365 |
-@@ -3671,6 +3697,8 @@ start_element_handler (GMarkupParseContext *context, |
1366 |
- _("Element <%s> is not allowed inside a <%s> element"), |
1367 |
- element_name, "fallback"); |
1368 |
- break; |
1369 |
-+ case UBUNTU_STATE_IGNORE: |
1370 |
-+ break; |
1371 |
- } |
1372 |
- } |
1373 |
- |
1374 |
-@@ -3960,6 +3988,9 @@ end_element_handler (GMarkupParseContext *context, |
1375 |
- pop_state (info); |
1376 |
- g_assert (peek_state (info) == STATE_THEME); |
1377 |
- break; |
1378 |
-+ case UBUNTU_STATE_IGNORE: |
1379 |
-+ pop_state (info); |
1380 |
-+ break; |
1381 |
- } |
1382 |
- |
1383 |
- pop_required_version (info); |
1384 |
-@@ -4165,6 +4196,9 @@ text_handler (GMarkupParseContext *context, |
1385 |
- case STATE_FALLBACK: |
1386 |
- NO_TEXT ("fallback"); |
1387 |
- break; |
1388 |
-+ case UBUNTU_STATE_IGNORE: |
1389 |
-+ NO_TEXT ("ignored_element"); |
1390 |
-+ break; |
1391 |
- } |
1392 |
- } |
1393 |
- |
1394 |
|
1395 |
diff --git a/x11-wm/mutter/mutter-3.16.3-r1.ebuild b/x11-wm/mutter/mutter-3.16.3-r1.ebuild |
1396 |
deleted file mode 100644 |
1397 |
index 76f8ab6..0000000 |
1398 |
--- a/x11-wm/mutter/mutter-3.16.3-r1.ebuild |
1399 |
+++ /dev/null |
1400 |
@@ -1,114 +0,0 @@ |
1401 |
-# Copyright 1999-2015 Gentoo Foundation |
1402 |
-# Distributed under the terms of the GNU General Public License v2 |
1403 |
-# $Id$ |
1404 |
- |
1405 |
-EAPI="5" |
1406 |
-GCONF_DEBUG="yes" |
1407 |
- |
1408 |
-inherit autotools eutils gnome2 |
1409 |
- |
1410 |
-DESCRIPTION="GNOME 3 compositing window manager based on Clutter" |
1411 |
-HOMEPAGE="https://git.gnome.org/browse/mutter/" |
1412 |
- |
1413 |
-LICENSE="GPL-2+" |
1414 |
-SLOT="0" |
1415 |
-IUSE="+introspection +kms test wayland" |
1416 |
-KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
1417 |
- |
1418 |
-# libXi-1.7.4 or newer needed per: |
1419 |
-# https://bugzilla.gnome.org/show_bug.cgi?id=738944 |
1420 |
-COMMON_DEPEND=" |
1421 |
- >=x11-libs/pango-1.2[X,introspection?] |
1422 |
- >=x11-libs/cairo-1.10[X] |
1423 |
- >=x11-libs/gtk+-3.9.11:3[X,introspection?] |
1424 |
- >=dev-libs/glib-2.36.0:2[dbus] |
1425 |
- >=media-libs/clutter-1.21.3:1.0[introspection?] |
1426 |
- >=media-libs/cogl-1.17.1:1.0=[introspection?] |
1427 |
- >=media-libs/libcanberra-0.26[gtk3] |
1428 |
- >=x11-libs/startup-notification-0.7 |
1429 |
- >=x11-libs/libXcomposite-0.2 |
1430 |
- >=gnome-base/gsettings-desktop-schemas-3.15.92[introspection?] |
1431 |
- gnome-base/gnome-desktop:3= |
1432 |
- >sys-power/upower-0.99:= |
1433 |
- |
1434 |
- x11-libs/libICE |
1435 |
- x11-libs/libSM |
1436 |
- x11-libs/libX11 |
1437 |
- >=x11-libs/libXcomposite-0.2 |
1438 |
- x11-libs/libXcursor |
1439 |
- x11-libs/libXdamage |
1440 |
- x11-libs/libXext |
1441 |
- x11-libs/libXfixes |
1442 |
- >=x11-libs/libXi-1.7.4 |
1443 |
- x11-libs/libXinerama |
1444 |
- x11-libs/libXrandr |
1445 |
- x11-libs/libXrender |
1446 |
- x11-libs/libxcb |
1447 |
- x11-libs/libxkbfile |
1448 |
- >=x11-libs/libxkbcommon-0.4.3[X] |
1449 |
- x11-misc/xkeyboard-config |
1450 |
- |
1451 |
- gnome-extra/zenity |
1452 |
- |
1453 |
- introspection? ( >=dev-libs/gobject-introspection-1.42:= ) |
1454 |
- kms? ( |
1455 |
- dev-libs/libinput |
1456 |
- >=media-libs/clutter-1.20[egl] |
1457 |
- media-libs/cogl:1.0=[kms] |
1458 |
- >=media-libs/mesa-10.3[gbm] |
1459 |
- sys-apps/systemd |
1460 |
- virtual/libgudev |
1461 |
- x11-libs/libdrm:= ) |
1462 |
- wayland? ( |
1463 |
- >=dev-libs/wayland-1.6.90 |
1464 |
- >=media-libs/clutter-1.20[wayland] |
1465 |
- x11-base/xorg-server[wayland] ) |
1466 |
-" |
1467 |
-DEPEND="${COMMON_DEPEND} |
1468 |
- >=dev-util/gtk-doc-am-1.15 |
1469 |
- >=dev-util/intltool-0.41 |
1470 |
- sys-devel/gettext |
1471 |
- virtual/pkgconfig |
1472 |
- x11-proto/xextproto |
1473 |
- x11-proto/xineramaproto |
1474 |
- x11-proto/xproto |
1475 |
- test? ( app-text/docbook-xml-dtd:4.5 ) |
1476 |
-" |
1477 |
-RDEPEND="${COMMON_DEPEND} |
1478 |
- !x11-misc/expocity |
1479 |
-" |
1480 |
- |
1481 |
-src_prepare() { |
1482 |
- # Fallback to a default keymap if getting it from X fails (from 'master') |
1483 |
- epatch "${FILESDIR}"/${PN}-3.16.3-fallback-keymap.patch |
1484 |
- |
1485 |
- # frames: handle META_FRAME_CONTROL_NONE on left click (from '3.16') |
1486 |
- epatch "${FILESDIR}"/${P}-crash-border.patch |
1487 |
- |
1488 |
- # compositor: Add support for GL_EXT_x11_sync_object (from '3.16') |
1489 |
- epatch "${FILESDIR}"/${P}-GL_EXT_x11_sync_object.patch |
1490 |
- |
1491 |
- # compositor: Fix GL_EXT_x11_sync_object race condition (from '3.16') |
1492 |
- epatch "${FILESDIR}"/${P}-fix-race.patch |
1493 |
- |
1494 |
- # build: Fix return value in meta-sync-ring.c (from '3.16') |
1495 |
- epatch "${FILESDIR}"/${P}-fix-return.patch |
1496 |
- |
1497 |
- # compositor: Handle fences in the frontend X connection (from '3.16') |
1498 |
- epatch "${FILESDIR}"/${P}-flickering.patch |
1499 |
- |
1500 |
- eautoreconf |
1501 |
- gnome2_src_prepare |
1502 |
-} |
1503 |
- |
1504 |
-src_configure() { |
1505 |
- gnome2_src_configure \ |
1506 |
- --disable-static \ |
1507 |
- --enable-sm \ |
1508 |
- --enable-startup-notification \ |
1509 |
- --enable-verbose-mode \ |
1510 |
- --with-libcanberra \ |
1511 |
- $(use_enable introspection) \ |
1512 |
- $(use_enable kms native-backend) \ |
1513 |
- $(use_enable wayland) |
1514 |
-} |
1515 |
|
1516 |
diff --git a/x11-wm/mutter/mutter-3.16.3.ebuild b/x11-wm/mutter/mutter-3.16.3.ebuild |
1517 |
deleted file mode 100644 |
1518 |
index c27f933..0000000 |
1519 |
--- a/x11-wm/mutter/mutter-3.16.3.ebuild |
1520 |
+++ /dev/null |
1521 |
@@ -1,91 +0,0 @@ |
1522 |
-# Copyright 1999-2015 Gentoo Foundation |
1523 |
-# Distributed under the terms of the GNU General Public License v2 |
1524 |
-# $Id$ |
1525 |
- |
1526 |
-EAPI="5" |
1527 |
-GCONF_DEBUG="yes" |
1528 |
- |
1529 |
-inherit eutils gnome2 |
1530 |
- |
1531 |
-DESCRIPTION="GNOME 3 compositing window manager based on Clutter" |
1532 |
-HOMEPAGE="https://git.gnome.org/browse/mutter/" |
1533 |
- |
1534 |
-LICENSE="GPL-2+" |
1535 |
-SLOT="0" |
1536 |
-IUSE="+introspection +kms test wayland" |
1537 |
-KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc x86" |
1538 |
- |
1539 |
-# libXi-1.7.4 or newer needed per: |
1540 |
-# https://bugzilla.gnome.org/show_bug.cgi?id=738944 |
1541 |
-COMMON_DEPEND=" |
1542 |
- >=x11-libs/pango-1.2[X,introspection?] |
1543 |
- >=x11-libs/cairo-1.10[X] |
1544 |
- >=x11-libs/gtk+-3.9.11:3[X,introspection?] |
1545 |
- >=dev-libs/glib-2.36.0:2[dbus] |
1546 |
- >=media-libs/clutter-1.21.3:1.0[introspection?] |
1547 |
- >=media-libs/cogl-1.17.1:1.0=[introspection?] |
1548 |
- >=media-libs/libcanberra-0.26[gtk3] |
1549 |
- >=x11-libs/startup-notification-0.7 |
1550 |
- >=x11-libs/libXcomposite-0.2 |
1551 |
- >=gnome-base/gsettings-desktop-schemas-3.15.92[introspection?] |
1552 |
- gnome-base/gnome-desktop:3= |
1553 |
- >sys-power/upower-0.99:= |
1554 |
- |
1555 |
- x11-libs/libICE |
1556 |
- x11-libs/libSM |
1557 |
- x11-libs/libX11 |
1558 |
- >=x11-libs/libXcomposite-0.2 |
1559 |
- x11-libs/libXcursor |
1560 |
- x11-libs/libXdamage |
1561 |
- x11-libs/libXext |
1562 |
- x11-libs/libXfixes |
1563 |
- >=x11-libs/libXi-1.7.4 |
1564 |
- x11-libs/libXinerama |
1565 |
- x11-libs/libXrandr |
1566 |
- x11-libs/libXrender |
1567 |
- x11-libs/libxcb |
1568 |
- x11-libs/libxkbfile |
1569 |
- >=x11-libs/libxkbcommon-0.4.3[X] |
1570 |
- x11-misc/xkeyboard-config |
1571 |
- |
1572 |
- gnome-extra/zenity |
1573 |
- |
1574 |
- introspection? ( >=dev-libs/gobject-introspection-1.42:= ) |
1575 |
- kms? ( |
1576 |
- dev-libs/libinput |
1577 |
- >=media-libs/clutter-1.20[egl] |
1578 |
- media-libs/cogl:1.0=[kms] |
1579 |
- >=media-libs/mesa-10.3[gbm] |
1580 |
- sys-apps/systemd |
1581 |
- virtual/libgudev |
1582 |
- x11-libs/libdrm:= ) |
1583 |
- wayland? ( |
1584 |
- >=dev-libs/wayland-1.6.90 |
1585 |
- >=media-libs/clutter-1.20[wayland] |
1586 |
- x11-base/xorg-server[wayland] ) |
1587 |
-" |
1588 |
-DEPEND="${COMMON_DEPEND} |
1589 |
- >=dev-util/gtk-doc-am-1.15 |
1590 |
- >=dev-util/intltool-0.41 |
1591 |
- sys-devel/gettext |
1592 |
- virtual/pkgconfig |
1593 |
- x11-proto/xextproto |
1594 |
- x11-proto/xineramaproto |
1595 |
- x11-proto/xproto |
1596 |
- test? ( app-text/docbook-xml-dtd:4.5 ) |
1597 |
-" |
1598 |
-RDEPEND="${COMMON_DEPEND} |
1599 |
- !x11-misc/expocity |
1600 |
-" |
1601 |
- |
1602 |
-src_configure() { |
1603 |
- gnome2_src_configure \ |
1604 |
- --disable-static \ |
1605 |
- --enable-sm \ |
1606 |
- --enable-startup-notification \ |
1607 |
- --enable-verbose-mode \ |
1608 |
- --with-libcanberra \ |
1609 |
- $(use_enable introspection) \ |
1610 |
- $(use_enable kms native-backend) \ |
1611 |
- $(use_enable wayland) |
1612 |
-} |