[PATCH 04/10] glamor: Add bounding box to one-fbo pixmaps

Keith Packard keithp at keithp.com
Thu Mar 13 23:29:57 PDT 2014


This lets code treat the one-fbo pixmaps more symmetrically with the
tiled pixmaps.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 glamor/glamor.c      | 4 ++++
 glamor/glamor_priv.h | 1 +
 2 files changed, 5 insertions(+)

diff --git a/glamor/glamor.c b/glamor/glamor.c
index 2d756e2..c5b6e8c 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -209,6 +209,10 @@ glamor_create_pixmap(ScreenPtr screen, int w, int h, int depth,
 
     if (type == GLAMOR_MEMORY_MAP || 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 9b4bb2d..0b36a46 100644
--- a/glamor/glamor_priv.h
+++ b/glamor/glamor_priv.h
@@ -421,6 +421,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;
-- 
1.9.0



More information about the xorg-devel mailing list