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 <[email protected]> --- 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 _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
