xorg-server: Changes to 'ubuntu-xenial'
debian/changelog | 9 +
debian/patches/series | 1
debian/patches/xmir-fixes.diff | 149 ----------------------------
debian/patches/xmir.patch | 216 +++++++++++++++++++++--------------------
4 files changed, 122 insertions(+), 253 deletions(-)
New commits:
commit 328cfba3ee6c5dbc17e68957ebb45cf0e3d82309
Author: Robert Ancell <robert.ancell@canonical.com>
Date: Wed May 4 12:28:26 2016 +1200
* debian/patches/xmir.patch:
- Fix recently added keymap code
* debian/patches/xmir-fixes.diff:
- Merged into xmir.patch
diff --git a/debian/changelog b/debian/changelog
index 8517549..b31bc7c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+xorg-server (2:1.18.3-1ubuntu2.2) xenial; urgency=medium
+
+ * debian/patches/xmir.patch:
+ - Fix recently added keymap code
+ * debian/patches/xmir-fixes.diff:
+ - Merged into xmir.patch
+
+ -- Robert Ancell <robert.ancell@canonical.com> Wed, 04 May 2016 12:19:14 +1200
+
xorg-server (2:1.18.3-1ubuntu2.1) xenial; urgency=medium
* debian/patches/xmir.patch:
diff --git a/debian/patches/series b/debian/patches/series
index 80c0c56..891be0f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -50,4 +50,3 @@ xmir.patch
xmir-desktop-file-hint-flag.patch
drm_device_keep_trying.patch
xi2-resize-touch.patch
-xmir-fixes.diff
diff --git a/debian/patches/xmir-fixes.diff b/debian/patches/xmir-fixes.diff
deleted file mode 100644
index 1f95270..0000000
--- a/debian/patches/xmir-fixes.diff
+++ /dev/null
@@ -1,149 +0,0 @@
-Description: port xmir to 1.18
-
---- a/hw/xmir/xmir-output.c
-+++ b/hw/xmir/xmir-output.c
-@@ -327,10 +327,10 @@ xmir_output_handle_resize(struct xmir_wi
-
- if (xmir_screen->glamor) {
- glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap);
-- glBindFramebuffer(GL_FRAMEBUFFER, pixmap_priv->base.fbo->fb);
-+ glBindFramebuffer(GL_FRAMEBUFFER, pixmap_priv->fbo->fb);
- glClearColor(0., 0., 0., 1.);
- glClear(GL_COLOR_BUFFER_BIT);
-- glamor_copy_n_to_n_nf(&screen->root->drawable, &pixmap->drawable,
-+ glamor_copy(&screen->root->drawable, &pixmap->drawable,
- NULL, ©_box, 1, 0, 0, FALSE, FALSE, 0, NULL);
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
- } else {
---- a/hw/xmir/xmir.c
-+++ b/hw/xmir/xmir.c
-@@ -1246,7 +1246,7 @@ xmir_create_screen_resources(ScreenPtr s
- if (xmir_screen->glamor && !xmir_screen->rootless) {
- glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(screen->devPrivate);
-
-- glBindFramebuffer(GL_FRAMEBUFFER, pixmap_priv->base.fbo->fb);
-+ glBindFramebuffer(GL_FRAMEBUFFER, pixmap_priv->fbo->fb);
- glClear(GL_COLOR_BUFFER_BIT);
- glBindFramebuffer(GL_FRAMEBUFFER, 0);
-
---- a/hw/xmir/xmir-glamor.c
-+++ b/hw/xmir/xmir-glamor.c
-@@ -220,7 +220,7 @@ xmir_glamor_copy_egl_tex(int fbo, Drawab
-
- pixmap_priv_get_scale(src_pixmap_priv, &src_xscale, &src_yscale);
-
-- if (src_pixmap_priv->base.gl_fbo == GLAMOR_FBO_UNATTACHED)
-+ if (src_pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED)
- FatalError("aeiou\n");
-
- glViewport(dx, dy, width + dx, height + dy);
-@@ -231,7 +231,7 @@ xmir_glamor_copy_egl_tex(int fbo, Drawab
-
- if (!fbo) {
- glActiveTexture(GL_TEXTURE0);
-- glBindTexture(GL_TEXTURE_2D, src_pixmap_priv->base.fbo->tex);
-+ glBindTexture(GL_TEXTURE_2D, src_pixmap_priv->fbo->tex);
-
- if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
-@@ -272,13 +272,8 @@ xmir_glamor_copy_egl_tex(int fbo, Drawab
- _tx1 = v_from_x_coord_x(dst_xscale, dbox.x1);
- _tx2 = v_from_x_coord_x(dst_xscale, dbox.x2);
-
-- if (xmir_screen->gbm) {
-- _ty1 = v_from_x_coord_y_inverted(dst_yscale, dbox.y1);
-- _ty2 = v_from_x_coord_y_inverted(dst_yscale, dbox.y2);
-- } else {
-- _ty1 = v_from_x_coord_y(dst_yscale, dbox.y1);
-- _ty2 = v_from_x_coord_y(dst_yscale, dbox.y2);
-- }
-+ _ty1 = v_from_x_coord_y(dst_yscale, dbox.y1);
-+ _ty2 = v_from_x_coord_y(dst_yscale, dbox.y2);
-
- /* upper left */
- vertices[0] = _tx1;
-@@ -317,13 +312,8 @@ xmir_glamor_copy_egl_tex(int fbo, Drawab
- _tx1 = v_from_x_coord_x(dst_xscale, dbox.x1);
- _tx2 = v_from_x_coord_x(dst_xscale, dbox.x2);
-
-- if (xmir_screen->gbm) {
-- _ty1 = v_from_x_coord_y_inverted(dst_yscale, dbox.y1);
-- _ty2 = v_from_x_coord_y_inverted(dst_yscale, dbox.y2);
-- } else {
-- _ty1 = v_from_x_coord_y(dst_yscale, dbox.y1);
-- _ty2 = v_from_x_coord_y(dst_yscale, dbox.y2);
-- }
-+ _ty1 = v_from_x_coord_y(dst_yscale, dbox.y1);
-+ _ty2 = v_from_x_coord_y(dst_yscale, dbox.y2);
-
- /* upper right */
- vertices[0] = _tx2;
-@@ -368,7 +358,7 @@ xmir_glamor_copy_egl_common(DrawablePtr
- DebugF("Box: (%i,%i)->(%i,%i)\n", ext->x1, ext->y1, ext->x2, ext->y2);
-
- if (epoxy_has_gl_extension("GL_EXT_framebuffer_blit") && !xmir_screen->doubled && !orientation) {
-- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, src_pixmap_priv->base.fbo->fb);
-+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, src_pixmap_priv->fbo->fb);
-
- glBlitFramebuffer(ext->x1, ext->y2, ext->x2, ext->y1,
- ext->x1 + dx, ext->y2 + dy, ext->x2 + dx, ext->y1 + dy,
-@@ -404,7 +394,7 @@ xmir_glamor_copy_gbm(struct xmir_screen
- PixmapPtr from = screen->GetWindowPixmap(window);
- glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(back);
-
-- glBindFramebuffer(GL_FRAMEBUFFER, pixmap_priv->base.fbo->fb);
-+ glBindFramebuffer(GL_FRAMEBUFFER, pixmap_priv->fbo->fb);
- xmir_glamor_copy_egl_common(&window->drawable, from, glamor_get_pixmap_private(from),
- RegionExtents(dirty),
- back->drawable.width, back->drawable.height, 0, 0, xmir_win->orientation);
-@@ -607,9 +597,9 @@ xmir_glamor_copy_egl_queue(struct xmir_s
- * rotating back and forth.
- */
- glamor_set_pixmap_type(src_pixmap, GLAMOR_TEXTURE_DRM);
-- src_pixmap_priv->base.fbo->external = TRUE;
-+ src_pixmap_priv->fbo->external = TRUE;
-
-- xmir_win->image = eglCreateImageKHR(xmir_screen->egl_display, xmir_screen->egl_context, EGL_GL_TEXTURE_2D_KHR, (EGLClientBuffer)(intptr_t)src_pixmap_priv->base.fbo->tex, attribs);
-+ xmir_win->image = eglCreateImageKHR(xmir_screen->egl_display, xmir_screen->egl_context, EGL_GL_TEXTURE_2D_KHR, (EGLClientBuffer)(intptr_t)src_pixmap_priv->fbo->tex, attribs);
- if (!xmir_win->image) {
- GLint error;
- ErrorF("eglCreateImageKHR failed with %x\n", eglGetError());
-@@ -1016,7 +1006,7 @@ glamor_egl_dri3_fd_name_from_tex(ScreenP
- }
-
- unsigned int
--glamor_egl_create_argb8888_based_texture(ScreenPtr screen, int w, int h)
-+glamor_egl_create_argb8888_based_texture(ScreenPtr screen, int w, int h, Bool linear)
- {
- return 0;
- }
-@@ -1144,10 +1134,7 @@ xmir_glamor_init(struct xmir_screen *xmi
- }
-
- if (!glamor_init(screen,
-- GLAMOR_INVERTED_Y_AXIS |
- GLAMOR_USE_EGL_SCREEN |
-- GLAMOR_USE_SCREEN |
-- GLAMOR_USE_PICTURE_SCREEN |
- GLAMOR_NO_DRI3)) {
- ErrorF("Failed to initialize glamor\n");
- return FALSE;
---- a/hw/xmir/xmir-input.c
-+++ b/hw/xmir/xmir-input.c
-@@ -378,15 +378,13 @@ xmir_window_handle_input_event(struct xm
- case mir_input_event_type_key: {
- MirKeyboardEvent const *kev;
- MirKeyboardAction action;
-- ValuatorMask mask;
-
- kev = mir_input_event_get_keyboard_event(ev);
- action = mir_keyboard_event_action(kev);
-
-- valuator_mask_zero(&mask);
- QueueKeyboardEvents(xmir_input->keyboard,
- action == mir_keyboard_action_up ? KeyRelease : KeyPress,
-- mir_keyboard_event_scan_code(kev) + 8, &mask);
-+ mir_keyboard_event_scan_code(kev) + 8);
- break;
- }
- case mir_input_event_type_touch: {
diff --git a/debian/patches/xmir.patch b/debian/patches/xmir.patch
index 8d0d8ae..3af0c45 100644
--- a/debian/patches/xmir.patch
+++ b/debian/patches/xmir.patch
@@ -1,7 +1,7 @@
-From efc26decfbefc45cdb36110c019272fbaf41284f Mon Sep 17 00:00:00 2001
+From d1786a76da403e240abd98f65c95a2d0a242b495 Mon Sep 17 00:00:00 2001
From: Robert Ancell <robert.ancell@canonical.com>
-Date: Fri, 15 May 2015 14:58:59 +1200
-Subject: [PATCH 1/3] XMir DDX
+Date: Fri, 29 Apr 2016 14:57:53 +0200
+Subject: [PATCH xserver 1/3] XMir DDX
Contributions from:
Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
@@ -9,6 +9,7 @@ Contributions from:
Robert Ancell <robert.ancell@canonical.com>
Andreas Pokorny <andreas.pokorny@canonical.com>
Daniel van Vugt <daniel.van.vugt@canonical.com>
+ Chris Townsend <christopher.townsend@canonical.com>
---
configure.ac | 25 +
hw/Makefile.am | 9 +-
@@ -22,13 +23,13 @@ Contributions from:
hw/xmir/xmir-cursor.c | 210 ++++++
hw/xmir/xmir-cvt.c | 304 +++++++++
hw/xmir/xmir-dri2.c | 545 +++++++++++++++
- hw/xmir/xmir-glamor.c | 1173 ++++++++++++++++++++++++++++++++
- hw/xmir/xmir-input.c | 566 ++++++++++++++++
+ hw/xmir/xmir-glamor.c | 1160 ++++++++++++++++++++++++++++++++
+ hw/xmir/xmir-input.c | 592 ++++++++++++++++
hw/xmir/xmir-output.c | 449 +++++++++++++
hw/xmir/xmir-thread-proxy.c | 109 +++
- hw/xmir/xmir.c | 1564 +++++++++++++++++++++++++++++++++++++++++++
+ hw/xmir/xmir.c | 1571 +++++++++++++++++++++++++++++++++++++++++++
hw/xmir/xmir.h | 226 +++++++
- 18 files changed, 7725 insertions(+), 2 deletions(-)
+ 18 files changed, 7745 insertions(+), 2 deletions(-)
create mode 100644 hw/xmir/.gitignore
create mode 100644 hw/xmir/Makefile.am
create mode 100644 hw/xmir/dri2/Makefile.am
@@ -46,11 +47,11 @@ Contributions from:
create mode 100644 hw/xmir/xmir.c
create mode 100644 hw/xmir/xmir.h
-Index: xorg-server-1.18.3/configure.ac
-===================================================================
---- xorg-server-1.18.3.orig/configure.ac
-+++ xorg-server-1.18.3/configure.ac
-@@ -633,6 +633,7 @@ AC_ARG_ENABLE(xvfb, AS_HELP_ST
+diff --git a/configure.ac b/configure.ac
+index 77cf234..8bf62a0 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -628,6 +628,7 @@ AC_ARG_ENABLE(xvfb, AS_HELP_STRING([--enable-xvfb], [Build Xvfb server
AC_ARG_ENABLE(xnest, AS_HELP_STRING([--enable-xnest], [Build Xnest server (default: auto)]), [XNEST=$enableval], [XNEST=auto])
AC_ARG_ENABLE(xquartz, AS_HELP_STRING([--enable-xquartz], [Build Xquartz server for OS-X (default: auto)]), [XQUARTZ=$enableval], [XQUARTZ=auto])
AC_ARG_ENABLE(xwayland, AS_HELP_STRING([--enable-xwayland], [Build Xwayland server (default: auto)]), [XWAYLAND=$enableval], [XWAYLAND=auto])
@@ -58,7 +59,7 @@ Index: xorg-server-1.18.3/configure.ac
AC_ARG_ENABLE(standalone-xpbproxy, AS_HELP_STRING([--enable-standalone-xpbproxy], [Build a standalone xpbproxy (in addition to the one integrated into Xquartz as a separate thread) (default: no)]), [STANDALONE_XPBPROXY=$enableval], [STANDALONE_XPBPROXY=no])
AC_ARG_ENABLE(xwin, AS_HELP_STRING([--enable-xwin], [Build XWin server (default: auto)]), [XWIN=$enableval], [XWIN=auto])
AC_ARG_ENABLE(glamor, AS_HELP_STRING([--enable-glamor], [Build glamor dix module (default: no)]), [GLAMOR=$enableval], [GLAMOR=no])
-@@ -751,6 +752,7 @@ case $host_os in
+@@ -746,6 +747,7 @@ case $host_os in
XVFB=no
XNEST=no
XWAYLAND=no
@@ -66,7 +67,7 @@ Index: xorg-server-1.18.3/configure.ac
COMPOSITE=no
DGA=no
-@@ -2503,6 +2505,27 @@ if test "x$XWAYLAND" = xyes; then
+@@ -2482,6 +2484,27 @@ if test "x$XWAYLAND" = xyes; then
[${WAYLAND_PREFIX}/bin$PATH_SEPARATOR$PATH])
fi
@@ -94,7 +95,7 @@ Index: xorg-server-1.18.3/configure.ac
dnl and the rest of these are generic, so they're in config.h
dnl
-@@ -2651,6 +2674,8 @@ hw/kdrive/fbdev/Makefile
+@@ -2630,6 +2653,8 @@ hw/kdrive/fbdev/Makefile
hw/kdrive/linux/Makefile
hw/kdrive/src/Makefile
hw/xwayland/Makefile
@@ -103,10 +104,10 @@ Index: xorg-server-1.18.3/configure.ac
test/Makefile
test/xi1/Makefile
test/xi2/Makefile
-Index: xorg-server-1.18.3/hw/Makefile.am
-===================================================================
---- xorg-server-1.18.3.orig/hw/Makefile.am
-+++ xorg-server-1.18.3/hw/Makefile.am
+diff --git a/hw/Makefile.am b/hw/Makefile.am
+index 19895dc..b7b958c 100644
+--- a/hw/Makefile.am
++++ b/hw/Makefile.am
@@ -30,6 +30,10 @@ if XWAYLAND
XWAYLAND_SUBDIRS = xwayland
endif
@@ -131,16 +132,18 @@ Index: xorg-server-1.18.3/hw/Makefile.am
relink:
$(AM_V_at)for i in $(SUBDIRS) ; do $(MAKE) -C $$i relink || exit 1 ; done
-Index: xorg-server-1.18.3/hw/xmir/.gitignore
-===================================================================
+diff --git a/hw/xmir/.gitignore b/hw/xmir/.gitignore
+new file mode 100644
+index 0000000..b6a16d4
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/.gitignore
++++ b/hw/xmir/.gitignore
@@ -0,0 +1 @@
+Xmir
-Index: xorg-server-1.18.3/hw/xmir/Makefile.am
-===================================================================
+diff --git a/hw/xmir/Makefile.am b/hw/xmir/Makefile.am
+new file mode 100644
+index 0000000..be5225e
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/Makefile.am
++++ b/hw/xmir/Makefile.am
@@ -0,0 +1,61 @@
+bin_PROGRAMS = Xmir
+
@@ -203,10 +206,11 @@ Index: xorg-server-1.18.3/hw/xmir/Makefile.am
+
+relink:
+ $(AM_V_at)rm -f Xmir$(EXEEXT) && $(MAKE) Xmir$(EXEEXT)
-Index: xorg-server-1.18.3/hw/xmir/dri2/Makefile.am
-===================================================================
+diff --git a/hw/xmir/dri2/Makefile.am b/hw/xmir/dri2/Makefile.am
+new file mode 100644
+index 0000000..696240c
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/dri2/Makefile.am
++++ b/hw/xmir/dri2/Makefile.am
@@ -0,0 +1,14 @@
+noinst_LTLIBRARIES = libdri2.la
+
@@ -222,10 +226,11 @@ Index: xorg-server-1.18.3/hw/xmir/dri2/Makefile.am
+ dri2ext.c \
+ dri2int.h
+
-Index: xorg-server-1.18.3/hw/xmir/dri2/dri2.c
-===================================================================
+diff --git a/hw/xmir/dri2/dri2.c b/hw/xmir/dri2/dri2.c
+new file mode 100644
+index 0000000..6aa19ba
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/dri2/dri2.c
++++ b/hw/xmir/dri2/dri2.c
@@ -0,0 +1,1398 @@
+/*
+ * Copyright © 2007, 2008 Red Hat, Inc.
@@ -1625,10 +1630,11 @@ Index: xorg-server-1.18.3/hw/xmir/dri2/dri2.c
+ *is_param_recognized = FALSE;
+ return Success;
+}
-Index: xorg-server-1.18.3/hw/xmir/dri2/dri2.h
-===================================================================
+diff --git a/hw/xmir/dri2/dri2.h b/hw/xmir/dri2/dri2.h
+new file mode 100644
+index 0000000..318898b
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/dri2/dri2.h
++++ b/hw/xmir/dri2/dri2.h
@@ -0,0 +1,364 @@
+/*
+ * Copyright © 2007 Red Hat, Inc.
@@ -1994,10 +2000,11 @@ Index: xorg-server-1.18.3/hw/xmir/dri2/dri2.h
+extern Bool noDRI2Extension;
+
+#endif
-Index: xorg-server-1.18.3/hw/xmir/dri2/dri2ext.c
-===================================================================
+diff --git a/hw/xmir/dri2/dri2ext.c b/hw/xmir/dri2/dri2ext.c
+new file mode 100644
+index 0000000..befbb82
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/dri2/dri2ext.c
++++ b/hw/xmir/dri2/dri2ext.c
@@ -0,0 +1,683 @@
+/*
+ * Copyright © 2008 Red Hat, Inc.
@@ -2682,10 +2689,11 @@ Index: xorg-server-1.18.3/hw/xmir/dri2/dri2ext.c
+
+ DRI2ModuleSetup();
+}
-Index: xorg-server-1.18.3/hw/xmir/dri2/dri2int.h
-===================================================================
+diff --git a/hw/xmir/dri2/dri2int.h b/hw/xmir/dri2/dri2int.h
+new file mode 100644
+index 0000000..7f53eba
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/dri2/dri2int.h
++++ b/hw/xmir/dri2/dri2int.h
@@ -0,0 +1,26 @@
+/*
+ * Copyright © 2011 Daniel Stone
@@ -2713,10 +2721,11 @@ Index: xorg-server-1.18.3/hw/xmir/dri2/dri2int.h
+ */
+
+extern Bool DRI2ModuleSetup(void);
-Index: xorg-server-1.18.3/hw/xmir/xmir-cursor.c
-===================================================================
+diff --git a/hw/xmir/xmir-cursor.c b/hw/xmir/xmir-cursor.c
+new file mode 100644
+index 0000000..81873a4
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/xmir-cursor.c
++++ b/hw/xmir/xmir-cursor.c
@@ -0,0 +1,210 @@
+/*
+ * Copyright © 2015 Canonical Ltd
@@ -2928,10 +2937,11 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-cursor.c
+ &xmir_pointer_sprite_funcs,
+ &xmir_pointer_screen_funcs, TRUE);
+}
-Index: xorg-server-1.18.3/hw/xmir/xmir-cvt.c
-===================================================================
+diff --git a/hw/xmir/xmir-cvt.c b/hw/xmir/xmir-cvt.c
+new file mode 100644
+index 0000000..6070d77
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/xmir-cvt.c
++++ b/hw/xmir/xmir-cvt.c
@@ -0,0 +1,304 @@
+/* Copied from hw/xfree86/modes/xf86cvt.c into xmir DDX and
+ * changed to generate an RRMode */
@@ -3237,10 +3247,11 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-cvt.c
+
+ return RRModeGet(&modeinfo, name);
+}
-Index: xorg-server-1.18.3/hw/xmir/xmir-dri2.c
-===================================================================
+diff --git a/hw/xmir/xmir-dri2.c b/hw/xmir/xmir-dri2.c
+new file mode 100644
+index 0000000..b24d4b9
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/xmir-dri2.c
++++ b/hw/xmir/xmir-dri2.c
@@ -0,0 +1,545 @@
+/*
+ * Copyright © 2015 Canonical Ltd
@@ -3787,11 +3798,12 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-dri2.c
+ ret = DRI2ScreenInit(xmir_screen->screen, &xmir_screen->dri2);
+ return ret;
+}
-Index: xorg-server-1.18.3/hw/xmir/xmir-glamor.c
-===================================================================
+diff --git a/hw/xmir/xmir-glamor.c b/hw/xmir/xmir-glamor.c
+new file mode 100644
+index 0000000..7ad0245
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/xmir-glamor.c
-@@ -0,0 +1,1173 @@
++++ b/hw/xmir/xmir-glamor.c
+@@ -0,0 +1,1160 @@
+/*
+ * Copyright © 2015 Canonical Ltd
+ *
@@ -4014,7 +4026,7 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-glamor.c
+
+ pixmap_priv_get_scale(src_pixmap_priv, &src_xscale, &src_yscale);
+
-+ if (src_pixmap_priv->base.gl_fbo == GLAMOR_FBO_UNATTACHED)
++ if (src_pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED)
+ FatalError("aeiou\n");
+
+ glViewport(dx, dy, width + dx, height + dy);
@@ -4025,7 +4037,7 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-glamor.c
+
+ if (!fbo) {
+ glActiveTexture(GL_TEXTURE0);
-+ glBindTexture(GL_TEXTURE_2D, src_pixmap_priv->base.fbo->tex);
++ glBindTexture(GL_TEXTURE_2D, src_pixmap_priv->fbo->tex);
+
+ if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP) {
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
@@ -4066,13 +4078,8 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-glamor.c
+ _tx1 = v_from_x_coord_x(dst_xscale, dbox.x1);
+ _tx2 = v_from_x_coord_x(dst_xscale, dbox.x2);
+
-+ if (xmir_screen->gbm) {
-+ _ty1 = v_from_x_coord_y_inverted(dst_yscale, dbox.y1);
-+ _ty2 = v_from_x_coord_y_inverted(dst_yscale, dbox.y2);
-+ } else {
-+ _ty1 = v_from_x_coord_y(dst_yscale, dbox.y1);
-+ _ty2 = v_from_x_coord_y(dst_yscale, dbox.y2);
-+ }
++ _ty1 = v_from_x_coord_y(dst_yscale, dbox.y1);
++ _ty2 = v_from_x_coord_y(dst_yscale, dbox.y2);
+
+ /* upper left */
+ vertices[0] = _tx1;
@@ -4111,13 +4118,8 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-glamor.c
+ _tx1 = v_from_x_coord_x(dst_xscale, dbox.x1);
+ _tx2 = v_from_x_coord_x(dst_xscale, dbox.x2);
+
-+ if (xmir_screen->gbm) {
-+ _ty1 = v_from_x_coord_y_inverted(dst_yscale, dbox.y1);
-+ _ty2 = v_from_x_coord_y_inverted(dst_yscale, dbox.y2);
-+ } else {
-+ _ty1 = v_from_x_coord_y(dst_yscale, dbox.y1);
-+ _ty2 = v_from_x_coord_y(dst_yscale, dbox.y2);
-+ }
++ _ty1 = v_from_x_coord_y(dst_yscale, dbox.y1);
++ _ty2 = v_from_x_coord_y(dst_yscale, dbox.y2);
+
+ /* upper right */
+ vertices[0] = _tx2;
@@ -4162,7 +4164,7 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-glamor.c
+ DebugF("Box: (%i,%i)->(%i,%i)\n", ext->x1, ext->y1, ext->x2, ext->y2);
+
+ if (epoxy_has_gl_extension("GL_EXT_framebuffer_blit") && !xmir_screen->doubled && !orientation) {
-+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, src_pixmap_priv->base.fbo->fb);
++ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, src_pixmap_priv->fbo->fb);
+
+ glBlitFramebuffer(ext->x1, ext->y2, ext->x2, ext->y1,
+ ext->x1 + dx, ext->y2 + dy, ext->x2 + dx, ext->y1 + dy,
@@ -4198,7 +4200,7 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-glamor.c
+ PixmapPtr from = screen->GetWindowPixmap(window);
+ glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(back);
+
-+ glBindFramebuffer(GL_FRAMEBUFFER, pixmap_priv->base.fbo->fb);
++ glBindFramebuffer(GL_FRAMEBUFFER, pixmap_priv->fbo->fb);
+ xmir_glamor_copy_egl_common(&window->drawable, from, glamor_get_pixmap_private(from),
+ RegionExtents(dirty),
+ back->drawable.width, back->drawable.height, 0, 0, xmir_win->orientation);
@@ -4401,9 +4403,9 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-glamor.c
+ * rotating back and forth.
+ */
+ glamor_set_pixmap_type(src_pixmap, GLAMOR_TEXTURE_DRM);
-+ src_pixmap_priv->base.fbo->external = TRUE;
++ src_pixmap_priv->fbo->external = TRUE;
+
-+ xmir_win->image = eglCreateImageKHR(xmir_screen->egl_display, xmir_screen->egl_context, EGL_GL_TEXTURE_2D_KHR, (EGLClientBuffer)(intptr_t)src_pixmap_priv->base.fbo->tex, attribs);
++ xmir_win->image = eglCreateImageKHR(xmir_screen->egl_display, xmir_screen->egl_context, EGL_GL_TEXTURE_2D_KHR, (EGLClientBuffer)(intptr_t)src_pixmap_priv->fbo->tex, attribs);
+ if (!xmir_win->image) {
+ GLint error;
+ ErrorF("eglCreateImageKHR failed with %x\n", eglGetError());
@@ -4810,7 +4812,7 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-glamor.c
+}
+
+unsigned int
-+glamor_egl_create_argb8888_based_texture(ScreenPtr screen, int w, int h)
++glamor_egl_create_argb8888_based_texture(ScreenPtr screen, int w, int h, Bool linear)
+{
+ return 0;
+}
@@ -4938,10 +4940,7 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-glamor.c
+ }
+
+ if (!glamor_init(screen,
-+ GLAMOR_INVERTED_Y_AXIS |
+ GLAMOR_USE_EGL_SCREEN |
-+ GLAMOR_USE_SCREEN |
-+ GLAMOR_USE_PICTURE_SCREEN |
+ GLAMOR_NO_DRI3)) {
+ ErrorF("Failed to initialize glamor\n");
+ return FALSE;
@@ -4965,11 +4964,12 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-glamor.c
+
+ return TRUE;
+}
-Index: xorg-server-1.18.3/hw/xmir/xmir-input.c
-===================================================================
+diff --git a/hw/xmir/xmir-input.c b/hw/xmir/xmir-input.c
+new file mode 100644
+index 0000000..14c4709
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/xmir-input.c
-@@ -0,0 +1,596 @@
++++ b/hw/xmir/xmir-input.c
+@@ -0,0 +1,592 @@
+/*
+ * Copyright © 2015 Canonical Ltd
+ *
@@ -5350,15 +5350,13 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-input.c
+ case mir_input_event_type_key: {
+ MirKeyboardEvent const *kev;
+ MirKeyboardAction action;
-+ ValuatorMask mask;
+
+ kev = mir_input_event_get_keyboard_event(ev);
+ action = mir_keyboard_event_action(kev);
+
-+ valuator_mask_zero(&mask);
+ QueueKeyboardEvents(xmir_input->keyboard,
+ action == mir_keyboard_action_up ? KeyRelease : KeyPress,
-+ mir_keyboard_event_scan_code(kev) + 8, &mask);
++ mir_keyboard_event_scan_code(kev) + 8);
+ break;
+ }
+ case mir_input_event_type_touch: {
@@ -5449,8 +5447,6 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-input.c
+ XkbChangesRec changes = { 0 };
+
+ mir_keymap_event_get_keymap_buffer(ev, (char const **)&buffer, &length);
-+
-+ buffer[length] = '\0';
+
+ xkb = XkbCompileKeymapFromString(xmir_input->keyboard, buffer, length);
+
@@ -5566,10 +5562,11 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-input.c
+
+ mieqFini();
+}
-Index: xorg-server-1.18.3/hw/xmir/xmir-output.c
-===================================================================
+diff --git a/hw/xmir/xmir-output.c b/hw/xmir/xmir-output.c
+new file mode 100644
+index 0000000..f538749
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/xmir-output.c
++++ b/hw/xmir/xmir-output.c
@@ -0,0 +1,449 @@
+/*
+ * Copyright © 2015 Canonical Ltd
@@ -5900,10 +5897,10 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-output.c
+
+ if (xmir_screen->glamor) {
+ glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap);
-+ glBindFramebuffer(GL_FRAMEBUFFER, pixmap_priv->base.fbo->fb);
++ glBindFramebuffer(GL_FRAMEBUFFER, pixmap_priv->fbo->fb);
+ glClearColor(0., 0., 0., 1.);
+ glClear(GL_COLOR_BUFFER_BIT);
-+ glamor_copy_n_to_n_nf(&screen->root->drawable, &pixmap->drawable,
++ glamor_copy(&screen->root->drawable, &pixmap->drawable,
+ NULL, ©_box, 1, 0, 0, FALSE, FALSE, 0, NULL);
+ glBindFramebuffer(GL_FRAMEBUFFER, 0);
+ } else {
@@ -6020,10 +6017,11 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-output.c
+
+ return TRUE;
+}
-Index: xorg-server-1.18.3/hw/xmir/xmir-thread-proxy.c
-===================================================================
+diff --git a/hw/xmir/xmir-thread-proxy.c b/hw/xmir/xmir-thread-proxy.c
+new file mode 100644
+index 0000000..dbb187f
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/xmir-thread-proxy.c
++++ b/hw/xmir/xmir-thread-proxy.c
@@ -0,0 +1,109 @@
+/*
+ * Copyright © 2012-2015 Canonical Ltd
@@ -6134,11 +6132,12 @@ Index: xorg-server-1.18.3/hw/xmir/xmir-thread-proxy.c
+ msg.callback(msg.xmir_screen, msg.xmir_window, msg.arg);
+ }
+}
-Index: xorg-server-1.18.3/hw/xmir/xmir.c
-===================================================================
+diff --git a/hw/xmir/xmir.c b/hw/xmir/xmir.c
+new file mode 100644
+index 0000000..34f78c9
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/xmir.c
-@@ -0,0 +1,1564 @@
++++ b/hw/xmir/xmir.c
+@@ -0,0 +1,1571 @@
+/*
+ * Copyright © 2015 Canonical Ltd
+ *
@@ -6593,7 +6592,7 @@ Index: xorg-server-1.18.3/hw/xmir/xmir.c
+ top_normal = top;
+ if (xmir_get_window_name(top, wm_name, sizeof wm_name))
+ top_named = top;
-+
++
+ top = top->firstChild;
+ }
+ if (!named)
@@ -7384,7 +7383,7 @@ Index: xorg-server-1.18.3/hw/xmir/xmir.c
+ if (xmir_screen->glamor && !xmir_screen->rootless) {
+ glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(screen->devPrivate);
+
-+ glBindFramebuffer(GL_FRAMEBUFFER, pixmap_priv->base.fbo->fb);
++ glBindFramebuffer(GL_FRAMEBUFFER, pixmap_priv->fbo->fb);
+ glClear(GL_COLOR_BUFFER_BIT);
+ glBindFramebuffer(GL_FRAMEBUFFER, 0);
+
@@ -7541,6 +7540,13 @@ Index: xorg-server-1.18.3/hw/xmir/xmir.c
+
+ mir_connection_get_available_surface_formats(xmir_screen->conn,
+ format, sizeof(format)/sizeof(format[0]), &formats);
++
++#if 0 /* Emulate the Mir Android graphics platform for LP: #1573470 */
++ format[0] = mir_pixel_format_abgr_8888;
++ format[1] = mir_pixel_format_xbgr_8888;
++ formats = 2;
++#endif
++
+ for (f = 0; f < formats; ++f) {
+ switch (format[f]) {
+ case mir_pixel_format_argb_8888:
@@ -7703,10 +7709,11 @@ Index: xorg-server-1.18.3/hw/xmir/xmir.c
+ FatalError("Couldn't add screen\n");
+ }
+}
-Index: xorg-server-1.18.3/hw/xmir/xmir.h
-===================================================================
+diff --git a/hw/xmir/xmir.h b/hw/xmir/xmir.h
+new file mode 100644
+index 0000000..0bb4b1d
--- /dev/null
-+++ xorg-server-1.18.3/hw/xmir/xmir.h
++++ b/hw/xmir/xmir.h
@@ -0,0 +1,226 @@
+/*
+ * Copyright © 2015 Canonical Ltd
@@ -7934,3 +7941,6 @@ Index: xorg-server-1.18.3/hw/xmir/xmir.h
+ (((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap)
+
+#endif
+--
+2.7.4
+
Reply to: