[PATCH xserver 3/4] glamor: Drop glamor_set_screen_pixmap().

Eric Anholt eric at anholt.net
Thu Jun 1 18:14:45 UTC 2017


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 <eric at anholt.net>
---
 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 1cdc23e0b919..91236e29ce67 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 b4fd76a6a46d..4ad28df17480 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 193a04409ee8..b0d3e9efe2ee 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 850888c94cf3..aa6baae09871 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 63f230369df5..87622839eaf5 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);
-- 
2.11.0



More information about the xorg-devel mailing list