[PATCH 02/12] glamor: Ignore picture formats when choosing color for core rendering.

Eric Anholt eric at anholt.net
Wed Jul 8 12:45:08 PDT 2015


Attaching a picture to a pixmap doesn't change its GL format, so it
doesn't change how core rendering should be assigning colors to it.

(Imagine XCreatePixmap(), optional XCreatePicture(pixmap) with various
formats, XFillRectangle, XGetImage().  If the XGetImage results
changed, this would be wrong).

Fixes all failures in "rendercheck -t fill" and, as a result, the
remaining failures in "rendercheck -t blend -o src -f
a8r8g8b8,x2r10g10b10"

Signed-off-by: Eric Anholt <eric at anholt.net>
---
 glamor/glamor_utils.h | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h
index a923b7a..8182006 100644
--- a/glamor/glamor_utils.h
+++ b/glamor/glamor_utils.h
@@ -805,16 +805,7 @@ gl_iformat_for_pixmap(PixmapPtr pixmap)
 static inline CARD32
 format_for_pixmap(PixmapPtr pixmap)
 {
-    glamor_pixmap_private *pixmap_priv;
-    PictFormatShort pict_format;
-
-    pixmap_priv = glamor_get_pixmap_private(pixmap);
-    if (GLAMOR_PIXMAP_PRIV_IS_PICTURE(pixmap_priv))
-        pict_format = pixmap_priv->picture->format;
-    else
-        pict_format = format_for_depth((pixmap)->drawable.depth);
-
-    return pict_format;
+    return format_for_depth((pixmap)->drawable.depth);
 }
 
 #define REVERT_NONE       		0
-- 
2.1.4



More information about the xorg-devel mailing list