Merge lp:~mir-team/gtk/mir-release-0.14.0 into lp:~ubuntu-desktop/gtk/ubuntugtk3

Proposed by Andreas Pokorny on 2015-06-25
Status: Merged
Merge reported by: Iain Lane
Merged at revision: not available
Proposed branch: lp:~mir-team/gtk/mir-release-0.14.0
Merge into: lp:~ubuntu-desktop/gtk/ubuntugtk3
Diff against target: 405 lines (+84/-67)
3 files modified
debian/control (+2/-2)
debian/patches/0002-Unstable-mir-patches-from-git-wip-mir-unstable.patch (+81/-61)
debian/rules (+1/-4)
To merge this branch: bzr merge lp:~mir-team/gtk/mir-release-0.14.0
Reviewer Review Type Date Requested Status
Ubuntu Desktop 2015-06-25 Pending
Review via email: mp+263034@code.launchpad.net

Commit Message

mir release 0.14.0 changes

buffer swapping shall now be done through mir_buffer_stream instead of mir_surface.

Description of the Change

mir release 0.14.0 changes

This change updates the mir patch for mir release 0.14.0 and lifts the restriction for little endian targets.

To post a comment you must log in.
Martin Pitt (pitti) wrote :

This is blocked until we actually get mir 0.14 into wily.

Iain Lane (laney) wrote :

Also note that this backend is upstream, so we need to make sure that updates to the patch go there to. You can send them to Will Hua (attente).

William Hua (attente) wrote :

Hi, we already added something upstream to fix this (https://git.gnome.org/browse/gtk+/commit/?id=9800d83a721fd21b34df6dd36684d3e0e2a9fd7b) as well as backporting other commits (https://code.launchpad.net/~attente/gtk/refresh-mir/+merge/262776). Can we take that branch instead? I can update it with your changes to debian/control and debian/rules though.

William Hua (attente) :
Andreas Pokorny (andreas-pokorny) wrote :

@hua: ok even better.. will update the silo and switch to your MP

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2015-06-19 18:07:33 +0000
3+++ debian/control 2015-06-25 20:51:12 +0000
4@@ -48,7 +48,7 @@
5 gobject-introspection (>= 1.41.3),
6 libgirepository1.0-dev (>= 1.39.0),
7 xvfb,
8- libmirclient-dev (>= 0.11.0) [amd64 arm64 armhf i386],
9+ libmirclient-dev (>= 0.14.0),
10 Build-Depends-Indep: docbook-xml,
11 docbook-utils,
12 libglib2.0-doc,
13@@ -167,7 +167,7 @@
14 libegl1-mesa-dev [linux-any],
15 libwayland-dev (>= 1.5.91) [linux-any],
16 libxkbcommon-dev,
17- libmirclient-dev [amd64 arm64 armhf i386],
18+ libmirclient-dev (>= 0.14.0),
19 Suggests: libgtk-3-doc
20 Description: development files for the GTK+ library
21 GTK+ is a multi-platform toolkit for creating graphical user
22
23=== modified file 'debian/patches/0002-Unstable-mir-patches-from-git-wip-mir-unstable.patch'
24--- debian/patches/0002-Unstable-mir-patches-from-git-wip-mir-unstable.patch 2015-06-02 11:18:47 +0000
25+++ debian/patches/0002-Unstable-mir-patches-from-git-wip-mir-unstable.patch 2015-06-25 20:51:12 +0000
26@@ -10,11 +10,9 @@
27 gdk/mir/gdkmirwindowimpl.c | 319 ++++++++++++--------------------------------
28 4 files changed, 116 insertions(+), 330 deletions(-)
29
30-diff --git a/gdk/mir/gdkmir-debug.c b/gdk/mir/gdkmir-debug.c
31-index 9bfdfe7..a135f1b 100644
32 --- a/gdk/mir/gdkmir-debug.c
33 +++ b/gdk/mir/gdkmir-debug.c
34-@@ -184,8 +184,26 @@ _gdk_mir_print_close_event (const MirCloseSurfaceEvent *event)
35+@@ -184,8 +184,26 @@
36 void
37 _gdk_mir_print_event (const MirEvent *event)
38 {
39@@ -41,11 +39,9 @@
40 case mir_event_type_key:
41 _gdk_mir_print_key_event (mir_event_get_input_event (event));
42 break;
43-diff --git a/gdk/mir/gdkmir-private.h b/gdk/mir/gdkmir-private.h
44-index 847720b..2464434 100644
45 --- a/gdk/mir/gdkmir-private.h
46 +++ b/gdk/mir/gdkmir-private.h
47-@@ -133,16 +133,4 @@ void _gdk_mir_print_resize_event (const MirResizeEvent *event);
48+@@ -133,16 +133,4 @@
49
50 void _gdk_mir_print_event (const MirEvent *event);
51
52@@ -62,11 +58,9 @@
53 - gpointer user_data);
54 -
55 #endif /* __GDK_PRIVATE_MIR_H__ */
56-diff --git a/gdk/mir/gdkmireventsource.c b/gdk/mir/gdkmireventsource.c
57-index aed881c..41a4422 100644
58 --- a/gdk/mir/gdkmireventsource.c
59 +++ b/gdk/mir/gdkmireventsource.c
60-@@ -148,6 +148,8 @@ generate_button_event (GdkWindow *window, GdkEventType type, gdouble x, gdouble
61+@@ -148,6 +148,8 @@
62 {
63 GdkEvent *event;
64
65@@ -75,7 +69,7 @@
66 event = gdk_event_new (type);
67 event->button.x = x;
68 event->button.y = y;
69-@@ -308,47 +310,6 @@ handle_key_event (GdkWindow *window, const MirInputEvent *event)
70+@@ -308,47 +310,6 @@
71 }
72 }
73
74@@ -123,7 +117,7 @@
75 static guint
76 mir_pointer_event_get_button_state (const MirPointerEvent *event)
77 {
78-@@ -388,49 +349,6 @@ handle_motion_event (GdkWindow *window, const MirInputEvent *event)
79+@@ -388,49 +349,6 @@
80 modifier_state = get_modifier_state (mir_pointer_event_modifiers (pointer_event), mir_pointer_event_get_button_state (pointer_event));
81 event_time = NANO_TO_MILLI (mir_input_event_get_event_time (event));
82
83@@ -173,7 +167,7 @@
84 if (window)
85 {
86 gdouble new_x;
87-@@ -444,6 +362,8 @@ handle_motion_event (GdkWindow *window, const MirInputEvent *event)
88+@@ -444,6 +362,8 @@
89 {
90 case mir_pointer_action_button_up:
91 case mir_pointer_action_button_down:
92@@ -182,7 +176,7 @@
93 event_type = mir_pointer_event_action (pointer_event) == mir_pointer_action_button_down ? GDK_BUTTON_PRESS : GDK_BUTTON_RELEASE;
94 changed_button_state = button_state ^ mir_pointer_event_get_button_state (pointer_event);
95 if (changed_button_state == 0 || (changed_button_state & mir_pointer_button_primary) != 0)
96-@@ -463,7 +383,11 @@ handle_motion_event (GdkWindow *window, const MirInputEvent *event)
97+@@ -463,7 +383,11 @@
98 if (hscroll > 0.5 || vscroll > 0.5)
99 generate_scroll_event (window, x, y, hscroll, vscroll, modifier_state, event_time);
100 if (ABS (new_x - x) > 0.5 || ABS (new_y - y) > 0.5)
101@@ -195,7 +189,7 @@
102
103 break;
104 case mir_pointer_action_leave:
105-@@ -616,6 +540,7 @@ static void
106+@@ -616,6 +540,7 @@
107 gdk_mir_queued_event_free (GdkMirQueuedEvent *event)
108 {
109 _gdk_mir_window_reference_unref (event->window_ref);
110@@ -203,7 +197,7 @@
111 g_slice_free (GdkMirQueuedEvent, event);
112 }
113
114-@@ -800,7 +725,7 @@ _gdk_mir_event_source_queue (GdkMirWindowReference *window_ref,
115+@@ -800,7 +725,7 @@
116 queued_event = g_slice_new (GdkMirQueuedEvent);
117 g_atomic_int_inc (&window_ref->ref_count);
118 queued_event->window_ref = window_ref;
119@@ -212,11 +206,9 @@
120
121 g_mutex_lock (&source->mir_event_lock);
122 g_queue_push_tail (&source->mir_events, queued_event);
123-diff --git a/gdk/mir/gdkmirwindowimpl.c b/gdk/mir/gdkmirwindowimpl.c
124-index 9cafcc9..d150d3e 100644
125 --- a/gdk/mir/gdkmirwindowimpl.c
126 +++ b/gdk/mir/gdkmirwindowimpl.c
127-@@ -46,11 +46,8 @@ struct _GdkMirWindowImpl
128+@@ -46,11 +46,8 @@
129 gint transient_x;
130 gint transient_y;
131
132@@ -229,7 +221,7 @@
133 MirSurfaceState surface_state;
134
135 /* Pattern for background */
136-@@ -103,9 +100,9 @@ _gdk_mir_window_impl_set_surface_state (GdkMirWindowImpl *impl, MirSurfaceState
137+@@ -103,9 +100,9 @@
138 }
139
140 void
141@@ -241,7 +233,7 @@
142 }
143
144 void
145-@@ -141,7 +138,7 @@ _gdk_mir_window_impl_get_cursor_state (GdkMirWindowImpl *impl,
146+@@ -141,7 +138,7 @@
147 static void
148 gdk_mir_window_impl_init (GdkMirWindowImpl *impl)
149 {
150@@ -250,7 +242,7 @@
151 impl->surface_state = mir_surface_state_unknown;
152 }
153
154-@@ -158,18 +155,6 @@ set_surface_state (GdkMirWindowImpl *impl,
155+@@ -158,18 +155,6 @@
156 }
157
158 static void
159@@ -269,7 +261,7 @@
160 event_cb (MirSurface *surface,
161 const MirEvent *event,
162 void *context)
163-@@ -179,18 +164,87 @@ event_cb (MirSurface *surface,
164+@@ -179,18 +164,87 @@
165
166 static MirSurface *
167 create_mir_surface (GdkDisplay *display,
168@@ -358,7 +350,7 @@
169 mir_surface_spec_set_name (spec, g_get_prgname ());
170 mir_surface_spec_set_buffer_usage (spec, buffer_usage);
171 surface = mir_surface_create_sync (spec);
172-@@ -199,15 +253,6 @@ create_mir_surface (GdkDisplay *display,
173+@@ -199,15 +253,6 @@
174 return surface;
175 }
176
177@@ -374,7 +366,7 @@
178 static void
179 ensure_surface_full (GdkWindow *window,
180 MirBufferUsage buffer_usage)
181-@@ -215,7 +260,7 @@ ensure_surface_full (GdkWindow *window,
182+@@ -215,7 +260,7 @@
183 GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
184 GdkMirWindowReference *window_ref;
185
186@@ -383,7 +375,7 @@
187 return;
188
189 /* no destroy notify -- we must leak for now
190-@@ -223,8 +268,10 @@ ensure_surface_full (GdkWindow *window,
191+@@ -223,8 +268,10 @@
192 */
193 window_ref = _gdk_mir_event_source_get_window_reference (window);
194
195@@ -395,7 +387,7 @@
196 buffer_usage);
197
198 /* FIXME: can't make an initial resize event */
199-@@ -242,8 +289,6 @@ ensure_surface_full (GdkWindow *window,
200+@@ -242,8 +289,6 @@
201 */
202
203 mir_surface_set_event_handler (impl->surface, event_cb, window_ref); // FIXME: Ignore some events until shown
204@@ -404,7 +396,7 @@
205 }
206
207 static void
208-@@ -289,56 +334,10 @@ ensure_no_surface (GdkWindow *window)
209+@@ -289,58 +334,14 @@
210 }
211
212 static void
213@@ -459,9 +451,14 @@
214 - }
215 -
216 /* Send the completed buffer to Mir */
217- mir_surface_swap_buffers_sync (impl->surface);
218+- mir_surface_swap_buffers_sync (impl->surface);
219++ mir_buffer_stream_swap_buffers_sync(
220++ mir_surface_get_buffer_stream (impl->surface)
221++ );
222
223-@@ -363,7 +362,7 @@ gdk_mir_window_impl_ref_cairo_surface (GdkWindow *window)
224+ /* The Cairo context is no longer valid */
225+ g_clear_pointer (&impl->cairo_surface, cairo_surface_destroy);
226+@@ -363,7 +364,7 @@
227 }
228
229 /* Transient windows get rendered into a buffer and copied onto their parent */
230@@ -470,7 +467,17 @@
231 {
232 cairo_surface = cairo_image_surface_create (pixel_format, window->width, window->height);
233 }
234-@@ -409,13 +408,6 @@ static void
235+@@ -371,7 +372,8 @@
236+ {
237+ ensure_surface (window);
238+
239+- mir_surface_get_graphics_region (impl->surface, &region);
240++ mir_buffer_stream_get_graphics_region (mir_surface_get_buffer_stream (impl->surface),
241++ &region);
242+ g_assert (region.pixel_format == mir_pixel_format_argb_8888);
243+
244+ cairo_surface = cairo_image_surface_create_for_data ((unsigned char *) region.vaddr,
245+@@ -409,13 +411,6 @@
246 gdk_mir_window_impl_finalize (GObject *object)
247 {
248 GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (object);
249@@ -484,7 +491,7 @@
250
251 if (impl->background)
252 cairo_pattern_destroy (impl->background);
253-@@ -423,7 +415,6 @@ gdk_mir_window_impl_finalize (GObject *object)
254+@@ -423,7 +418,6 @@
255 mir_surface_release_sync (impl->surface);
256 if (impl->cairo_surface)
257 cairo_surface_destroy (impl->cairo_surface);
258@@ -492,27 +499,27 @@
259
260 G_OBJECT_CLASS (gdk_mir_window_impl_parent_class)->finalize (object);
261 }
262-@@ -460,9 +451,6 @@ gdk_mir_window_impl_hide (GdkWindow *window)
263- impl->cursor_inside = FALSE;
264- impl->visible = FALSE;
265- ensure_no_surface (window);
266--
267-- if (should_render_in_parent (window))
268-- redraw_transient (window);
269- }
270-
271- static void
272-@@ -474,9 +462,6 @@ gdk_mir_window_impl_withdraw (GdkWindow *window)
273- impl->cursor_inside = FALSE;
274- impl->visible = FALSE;
275- ensure_no_surface (window);
276--
277-- if (should_render_in_parent (window))
278-- redraw_transient (window);
279- }
280-
281- static void
282-@@ -530,19 +515,10 @@ gdk_mir_window_impl_move_resize (GdkWindow *window,
283+@@ -460,9 +454,6 @@
284+ impl->cursor_inside = FALSE;
285+ impl->visible = FALSE;
286+ ensure_no_surface (window);
287+-
288+- if (should_render_in_parent (window))
289+- redraw_transient (window);
290+ }
291+
292+ static void
293+@@ -474,9 +465,6 @@
294+ impl->cursor_inside = FALSE;
295+ impl->visible = FALSE;
296+ ensure_no_surface (window);
297+-
298+- if (should_render_in_parent (window))
299+- redraw_transient (window);
300+ }
301+
302+ static void
303+@@ -530,19 +518,10 @@
304 GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
305 gboolean recreate_surface = FALSE;
306
307@@ -533,7 +540,7 @@
308 {
309 impl->transient_x = x;
310 impl->transient_y = y;
311-@@ -564,10 +540,6 @@ gdk_mir_window_impl_move_resize (GdkWindow *window,
312+@@ -564,10 +543,6 @@
313 ensure_no_surface (window);
314 ensure_surface (window);
315 }
316@@ -544,7 +551,7 @@
317 }
318
319 static void
320-@@ -742,16 +714,6 @@ gdk_mir_window_impl_destroy (GdkWindow *window,
321+@@ -742,16 +717,6 @@
322
323 impl->visible = FALSE;
324 ensure_no_surface (window);
325@@ -561,7 +568,7 @@
326 }
327
328 static void
329-@@ -771,41 +733,13 @@ static void
330+@@ -771,41 +736,13 @@
331 gdk_mir_window_impl_set_type_hint (GdkWindow *window,
332 GdkWindowTypeHint hint)
333 {
334@@ -607,7 +614,7 @@
335 }
336
337 static GdkWindowTypeHint
338-@@ -813,29 +747,7 @@ gdk_mir_window_impl_get_type_hint (GdkWindow *window)
339+@@ -813,29 +750,7 @@
340 {
341 GdkMirWindowImpl *impl = GDK_MIR_WINDOW_IMPL (window->impl);
342
343@@ -638,7 +645,7 @@
344 }
345
346 void
347-@@ -911,64 +823,6 @@ gdk_mir_window_impl_set_transient_for (GdkWindow *window,
348+@@ -911,64 +826,6 @@
349
350 /* Link this window to the parent */
351 impl->transient_for = parent;
352@@ -703,7 +710,17 @@
353 }
354
355 static void
356-@@ -1533,7 +1387,8 @@ _gdk_mir_window_get_dummy_egl_surface (GdkWindow *window,
357+@@ -1509,7 +1366,8 @@
358+ ensure_surface_full (window, mir_buffer_usage_hardware);
359+
360+ egl_display = _gdk_mir_display_get_egl_display (gdk_window_get_display (window));
361+- egl_window = (EGLNativeWindowType) mir_surface_get_egl_native_window (impl->surface);
362++ egl_window = (EGLNativeWindowType) mir_buffer_stream_get_egl_native_window (
363++ mir_surface_get_buffer_stream (impl->surface));
364+
365+ impl->egl_surface =
366+ eglCreateWindowSurface (egl_display, config, egl_window, NULL);
367+@@ -1533,11 +1391,13 @@
368 EGLNativeWindowType egl_window;
369
370 display = gdk_window_get_display (window);
371@@ -713,6 +730,9 @@
372 mir_buffer_usage_hardware);
373
374 egl_display = _gdk_mir_display_get_egl_display (display);
375---
376-2.1.4
377-
378+- egl_window = (EGLNativeWindowType) mir_surface_get_egl_native_window (impl->surface);
379++ egl_window = (EGLNativeWindowType) mir_buffer_stream_get_egl_native_window (
380++ mir_surface_get_buffer_stream (impl->surface));
381+
382+ impl->dummy_egl_surface =
383+ eglCreateWindowSurface (egl_display, config, egl_window, NULL);
384
385=== modified file 'debian/rules'
386--- debian/rules 2015-04-30 15:23:46 +0000
387+++ debian/rules 2015-06-25 20:51:12 +0000
388@@ -74,16 +74,13 @@
389 DEB_CONFIGURE_FLAGS_shared = \
390 --enable-broadway-backend \
391 --enable-x11-backend \
392+ --enable-mir-backend \
393 --enable-gtk-doc \
394 --enable-shared \
395 --enable-introspection \
396 --enable-cloudprint \
397 --disable-static
398
399-ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armhf i386))
400- DEB_CONFIGURE_FLAGS_shared += --enable-mir-backend
401-endif
402-
403 ifeq (,$(filter stage1,$(DEB_BUILD_PROFILES)))
404 DEB_CONFIGURE_FLAGS_shared += --enable-colord
405 else

Subscribers

People subscribed via source and target branches