From: Keith Packard Date: Fri, 14 Mar 2014 06:11:40 +0000 (-0700) Subject: glamor: Add bounding box to one-fbo pixmaps X-Git-Tag: upstream/1.15.99.902~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=209d004469391420130262059af43a813b2c07d7;p=platform%2Fupstream%2Fxorg-server.git glamor: Add bounding box to one-fbo pixmaps This lets code treat the one-fbo pixmaps more symmetrically with the tiled pixmaps. Signed-off-by: Keith Packard Reviewed-by: Eric Anholt Signed-off-by: Eric Anholt --- diff --git a/glamor/glamor.c b/glamor/glamor.c index 22a79e8..3094432 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -76,6 +76,10 @@ glamor_set_pixmap_type(PixmapPtr pixmap, glamor_pixmap_type_t type) pixmap_priv->base.glamor_priv = glamor_priv; } pixmap_priv->type = type; + pixmap_priv->base.box.x1 = 0; + pixmap_priv->base.box.x2 = pixmap->drawable.width; + pixmap_priv->base.box.y1 = 0; + pixmap_priv->base.box.y2 = pixmap->drawable.height; } _X_EXPORT void @@ -182,6 +186,10 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth, glamor_check_fbo_size(glamor_priv, w, h)) { pixmap_priv->type = type; + pixmap_priv->base.box.x1 = 0; + pixmap_priv->base.box.y1 = 0; + pixmap_priv->base.box.x2 = w; + pixmap_priv->base.box.y2 = h; fbo = glamor_create_fbo(glamor_priv, w, h, format, usage); } else { diff --git a/glamor/glamor_priv.h b/glamor/glamor_priv.h index 833450e..22b561d 100644 --- a/glamor/glamor_priv.h +++ b/glamor/glamor_priv.h @@ -415,6 +415,7 @@ typedef struct glamor_pixmap_private_base { unsigned char gl_tex:1; glamor_pixmap_fbo *fbo; PixmapPtr pixmap; + BoxRec box; int drm_stride; glamor_screen_private *glamor_priv; PicturePtr picture;