[PATCH xserver 2/4] glamor: Stop tracking the screen_fbo.

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


This means we no longer get "s" for on-screen drawing in glamor_debug,
and there's only "m" (CPU memory) or "f" (Any GPU memory, aka FBOs).
That seems fine to me.

Signed-off-by: Eric Anholt <eric at anholt.net>
---
 glamor/glamor.c      | 1 -
 glamor/glamor_core.c | 5 +----
 glamor/glamor_priv.h | 1 -
 3 files changed, 1 insertion(+), 6 deletions(-)

diff --git a/glamor/glamor.c b/glamor/glamor.c
index 2467443e03af..1cdc23e0b919 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -122,7 +122,6 @@ glamor_set_screen_pixmap(PixmapPtr screen_pixmap, PixmapPtr *back_pixmap)
 
     glamor_priv = glamor_get_screen_private(screen_pixmap->drawable.pScreen);
     pixmap_priv = glamor_get_pixmap_private(screen_pixmap);
-    glamor_priv->screen_fbo = pixmap_priv->fbo->fb;
 
     pixmap_priv->fbo->width = screen_pixmap->drawable.width;
     pixmap_priv->fbo->height = screen_pixmap->drawable.height;
diff --git a/glamor/glamor_core.c b/glamor/glamor_core.c
index 610ae71f310b..cb315e2d1b90 100644
--- a/glamor/glamor_core.c
+++ b/glamor/glamor_core.c
@@ -40,12 +40,9 @@ glamor_get_drawable_location(const DrawablePtr drawable)
 {
     PixmapPtr pixmap = glamor_get_drawable_pixmap(drawable);
     glamor_pixmap_private *pixmap_priv = glamor_get_pixmap_private(pixmap);
-    glamor_screen_private *glamor_priv =
-        glamor_get_screen_private(drawable->pScreen);
+
     if (pixmap_priv->gl_fbo == GLAMOR_FBO_UNATTACHED)
         return 'm';
-    if (pixmap_priv->fbo->fb == glamor_priv->screen_fbo)
-        return 's';
     else
         return 'f';
 }
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index a90879a7bbfd..79962a5c1972 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -281,7 +281,6 @@ typedef struct glamor_screen_private {
     int linear_max_nstops;
     int radial_max_nstops;
 
-    int screen_fbo;
     struct glamor_saved_procs saved_procs;
     char delayed_fallback_string[GLAMOR_DELAYED_STRING_MAX + 1];
     int delayed_fallback_pending;
-- 
2.11.0



More information about the xorg-devel mailing list