[PATCH xserver 03/12] glamor: Drop dead fbo handling from GLAMORY_MEMORY pict uploads.

Eric Anholt eric at anholt.net
Mon Feb 1 22:58:06 CET 2016


The previous commit asserts that we don't have one.

Signed-off-by: Eric Anholt <eric at anholt.net>
---
 glamor/glamor_picture.c | 25 ++-----------------------
 1 file changed, 2 insertions(+), 23 deletions(-)

diff --git a/glamor/glamor_picture.c b/glamor/glamor_picture.c
index 9bb2c74..a032ed0 100644
--- a/glamor/glamor_picture.c
+++ b/glamor/glamor_picture.c
@@ -734,27 +734,10 @@ glamor_pixmap_upload_prepare(PixmapPtr pixmap, GLenum format, int no_alpha,
                              int revert, int swap_rb)
 {
     int flag = 0;
-    glamor_pixmap_private *pixmap_priv;
-    glamor_screen_private *glamor_priv;
-    glamor_pixmap_fbo *fbo;
+    glamor_screen_private *glamor_priv =
+        glamor_get_screen_private(pixmap->drawable.pScreen);
     GLenum iformat;
 
-    pixmap_priv = glamor_get_pixmap_private(pixmap);
-    glamor_priv = glamor_get_screen_private(pixmap->drawable.pScreen);
-
-    if (pixmap_priv->gl_fbo != GLAMOR_FBO_UNATTACHED)
-        return 0;
-
-    if (pixmap_priv->fbo
-        && (pixmap_priv->fbo->width < pixmap->drawable.width
-            || pixmap_priv->fbo->height < pixmap->drawable.height)) {
-        fbo = glamor_pixmap_detach_fbo(pixmap_priv);
-        glamor_destroy_fbo(glamor_priv, fbo);
-    }
-
-    if (pixmap_priv->fbo && pixmap_priv->fbo->fb)
-        return 0;
-
     if (!(no_alpha || (revert == REVERT_NORMAL)
           || (swap_rb != SWAP_NONE_UPLOADING))) {
         /* We don't need a fbo, a simple texture uploading should work. */
@@ -762,10 +745,6 @@ glamor_pixmap_upload_prepare(PixmapPtr pixmap, GLenum format, int no_alpha,
         flag = GLAMOR_CREATE_FBO_NO_FBO;
     }
 
-    if ((flag == GLAMOR_CREATE_FBO_NO_FBO
-         && pixmap_priv->fbo && pixmap_priv->fbo->tex))
-        return 0;
-
     if (glamor_priv->gl_flavor == GLAMOR_GL_DESKTOP)
         iformat = gl_iformat_for_pixmap(pixmap);
     else
-- 
2.7.0



More information about the xorg-devel mailing list