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 @@ -1256,7 +1256,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); @@ -368,7 +368,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 +404,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 +607,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 +1016,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 +1144,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: {