From 72ddad7a97fa062bf9967d221c9a5520ebe33352 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Wed, 17 May 2017 11:36:07 -0700 Subject: [PATCH] glamor: Drop glamor_set_screen_pixmap(). All that was left here was updating the FBO's size. However, the FBO size was always set correctly already through glamor_set_pixmap_texture() from whoever had attached a new BO to the pixmap. Signed-off-by: Eric Anholt Reviewed-by: Keith Packard --- glamor/glamor.c | 13 ------------- glamor/glamor.h | 6 ------ glamor/glamor_egl.c | 1 - hw/xfree86/drivers/modesetting/drmmode_display.c | 5 ----- hw/xwayland/xwayland-glamor.c | 2 -- 5 files changed, 27 deletions(-) diff --git a/glamor/glamor.c b/glamor/glamor.c index 1cdc23e0b..91236e29c 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -114,19 +114,6 @@ glamor_set_pixmap_texture(PixmapPtr pixmap, unsigned int tex) glamor_pixmap_attach_fbo(pixmap, fbo); } -void -glamor_set_screen_pixmap(PixmapPtr screen_pixmap, PixmapPtr *back_pixmap) -{ - glamor_pixmap_private *pixmap_priv; - glamor_screen_private *glamor_priv; - - glamor_priv = glamor_get_screen_private(screen_pixmap->drawable.pScreen); - pixmap_priv = glamor_get_pixmap_private(screen_pixmap); - - pixmap_priv->fbo->width = screen_pixmap->drawable.width; - pixmap_priv->fbo->height = screen_pixmap->drawable.height; -} - uint32_t glamor_get_pixmap_texture(PixmapPtr pixmap) { diff --git a/glamor/glamor.h b/glamor/glamor.h index b4fd76a6a..4ad28df17 100644 --- a/glamor/glamor.h +++ b/glamor/glamor.h @@ -103,12 +103,6 @@ extern _X_EXPORT void glamor_fini(ScreenPtr screen); * Otherwise, the glamor internal structure will not be freed.*/ extern _X_EXPORT Bool glamor_close_screen(ScreenPtr screen); -/* Let glamor to know the screen's fbo. The low level - * driver should already assign a tex - * to this pixmap through the set_pixmap_texture. */ -extern _X_EXPORT void glamor_set_screen_pixmap(PixmapPtr screen_pixmap, - PixmapPtr *back_pixmap); - extern _X_EXPORT uint32_t glamor_get_pixmap_texture(PixmapPtr pixmap); extern _X_EXPORT void glamor_set_pixmap_texture(PixmapPtr pixmap, diff --git a/glamor/glamor_egl.c b/glamor/glamor_egl.c index 193a04409..b0d3e9efe 100644 --- a/glamor/glamor_egl.c +++ b/glamor/glamor_egl.c @@ -144,7 +144,6 @@ glamor_egl_create_textured_screen(ScreenPtr screen, int handle, int stride) "Failed to create textured screen."); return FALSE; } - glamor_set_screen_pixmap(screen_pixmap, NULL); return TRUE; } diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c index 850888c94..aa6baae09 100644 --- a/hw/xfree86/drivers/modesetting/drmmode_display.c +++ b/hw/xfree86/drivers/modesetting/drmmode_display.c @@ -1919,11 +1919,6 @@ drmmode_glamor_handle_new_screen_pixmap(drmmode_ptr drmmode) if (!drmmode_set_pixmap_bo(drmmode, screen_pixmap, &drmmode->front_bo)) return FALSE; -#ifdef GLAMOR_HAS_GBM - if (drmmode->glamor) - glamor_set_screen_pixmap(screen_pixmap, NULL); -#endif - return TRUE; } diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c index 63f230369..87622839e 100644 --- a/hw/xwayland/xwayland-glamor.c +++ b/hw/xwayland/xwayland-glamor.c @@ -243,8 +243,6 @@ xwl_glamor_create_screen_resources(ScreenPtr screen) xwl_glamor_create_pixmap(screen, screen->width, screen->height, screen->rootDepth, CREATE_PIXMAP_USAGE_BACKING_PIXMAP); - if (screen->devPrivate) - glamor_set_screen_pixmap(screen->devPrivate, NULL); } SetRootClip(screen, xwl_screen->root_clip_mode);