[PATCH 1/7] glamor: Propagate the fact that pbo_valid is never set.

Eric Anholt eric at anholt.net
Tue Mar 24 13:25:50 PDT 2015


The code to set it was deleted in keithp's big rewrite.

Signed-off-by: Eric Anholt <eric at anholt.net>
---
 glamor/glamor_pixmap.c | 18 ++----------------
 glamor/glamor_priv.h   |  2 --
 2 files changed, 2 insertions(+), 18 deletions(-)

diff --git a/glamor/glamor_pixmap.c b/glamor/glamor_pixmap.c
index 89b4c36..a946a6b 100644
--- a/glamor/glamor_pixmap.c
+++ b/glamor/glamor_pixmap.c
@@ -1047,27 +1047,13 @@ glamor_upload_sub_pixmap_to_texture(PixmapPtr pixmap, int x, int y, int w,
 enum glamor_pixmap_status
 glamor_upload_pixmap_to_texture(PixmapPtr pixmap)
 {
-    glamor_pixmap_private *pixmap_priv;
-    void *data;
-    int pbo;
     int ret;
 
-    pixmap_priv = glamor_get_pixmap_private(pixmap);
-
-    if ((pixmap_priv->fbo)
-        && (pixmap_priv->fbo->pbo_valid)) {
-        data = NULL;
-        pbo = pixmap_priv->fbo->pbo;
-    }
-    else {
-        data = pixmap->devPrivate.ptr;
-        pbo = 0;
-    }
-
     if (glamor_upload_sub_pixmap_to_texture(pixmap, 0, 0,
                                             pixmap->drawable.width,
                                             pixmap->drawable.height,
-                                            pixmap->devKind, data, pbo))
+                                            pixmap->devKind,
+                                            pixmap->devPrivate.ptr, 0))
         ret = GLAMOR_UPLOAD_DONE;
     else
         ret = GLAMOR_UPLOAD_FAILED;
diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h
index 898a934..03529c7 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -346,7 +346,6 @@ enum glamor_fbo_state {
  * @expire:  when push to cache pool list, set a expire count.
  * 	     will be freed when glamor_priv->tick is equal or
  * 	     larger than this expire count in block handler.
- * @pbo_valid: The pbo has a valid copy of the pixmap's data.
  * @tex:     attached texture.
  * @fb:      attached fbo.
  * @pbo:     attached pbo.
@@ -360,7 +359,6 @@ enum glamor_fbo_state {
 typedef struct glamor_pixmap_fbo {
     struct xorg_list list;
     unsigned int expire;
-    unsigned char pbo_valid;
     GLuint tex;
     GLuint fb;
     GLuint pbo;
-- 
2.1.4



More information about the xorg-devel mailing list