From 1bd966d16d87ed908547144c68850f2cdee05469 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Thu, 2 Jul 2015 12:21:41 -0700 Subject: [PATCH] glamor: Ignore picture formats when choosing color for core rendering. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Michel Dänzer Reviewed-by: Dave Airlie --- 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 a923b7a9d..81820069e 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