[PATCH xserver 14/19] glamor: Drop extra conditionals for large pixmap handling.

2016-01-27 Thread Eric Anholt
For a small pixmap, it's got a box from 0,0 to width/height, so we can
always use that.

Signed-off-by: Eric Anholt 
---
 glamor/glamor_utils.h | 18 --
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h
index 5128a33..f20d520 100644
--- a/glamor/glamor_utils.h
+++ b/glamor/glamor_utils.h
@@ -56,13 +56,8 @@
 
 #define PIXMAP_PRIV_GET_ACTUAL_SIZE(pixmap, priv, w, h)  \
   do { \
-   if (_X_UNLIKELY(glamor_pixmap_priv_is_large(priv))) {   \
-   w = priv->box.x2 - priv->box.x1;\
-   h = priv->box.y2 - priv->box.y1;\
-   } else {\
-   w = (pixmap)->drawable.width;   \
-   h = (pixmap)->drawable.height;  \
-   }   \
+  w = priv->box.x2 - priv->box.x1;  \
+  h = priv->box.y2 - priv->box.y1;  \
   } while(0)
 
 #define glamor_pixmap_fbo_fix_wh_ratio(wh, pixmap, priv) \
@@ -77,13 +72,8 @@
 
 #define pixmap_priv_get_fbo_off(_priv_, _xoff_, _yoff_)\
do {\
-if (_X_UNLIKELY(_priv_ && glamor_pixmap_priv_is_large(_priv_))) { \
-   *(_xoff_) = - (_priv_)->box.x1; \
-   *(_yoff_) = - (_priv_)->box.y1; \
-   } else {\
-   *(_xoff_) = 0;  \
-   *(_yoff_) = 0;  \
-   }   \
+   *(_xoff_) = - (_priv_)->box.x1; \
+   *(_yoff_) = - (_priv_)->box.y1; \
} while(0)
 
 #define xFixedToFloat(_val_) ((float)xFixedToInt(_val_)
\
-- 
2.6.4

___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 14/19] glamor: Drop extra conditionals for large pixmap handling.

2016-01-29 Thread Eric Anholt
Eric Anholt  writes:

> For a small pixmap, it's got a box from 0,0 to width/height, so we can
> always use that.

This seemed so sensible, but it turns out that for MEMORY pixmaps we'll
attach an FBO to it in the glamor_picture.c code, without setting its
box (which is still zeroed).  This may be lunacy, but it means this
patch is busted for now.

I'm going to revisit this after landing the rest of the series.


signature.asc
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel