From f1457c1c59efdadbad25f01dce9433643d688844 Mon Sep 17 00:00:00 2001 From: Zhigang Gong Date: Tue, 13 Nov 2012 10:08:02 +0800 Subject: [PATCH] glamor_compositerects: Need to initialize region before fallback. As we need to call DamageRegionAppend even for fallback path, we must initialize the region before do that. Pointed by Igor Vagulin. https://bugs.freedesktop.org/show_bug.cgi?id=56940 Signed-off-by: Zhigang Gong --- src/glamor_compositerects.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/glamor_compositerects.c b/src/glamor_compositerects.c index 5fe1bbf..f1564a2 100644 --- a/src/glamor_compositerects.c +++ b/src/glamor_compositerects.c @@ -131,16 +131,6 @@ glamor_composite_rectangles(CARD8 op, return; } - pixmap = glamor_get_drawable_pixmap(dst->pDrawable); - priv = glamor_get_pixmap_private(pixmap); - - if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(priv)) - goto fallback; - if (dst->alphaMap) { - DEBUGF("%s: fallback, dst has an alpha-map\n", __FUNCTION__); - goto fallback; - } - if ((color->red|color->green|color->blue|color->alpha) <= 0x00ff) { switch (op) { case PictOpOver: @@ -204,6 +194,16 @@ glamor_composite_rectangles(CARD8 op, return; } + pixmap = glamor_get_drawable_pixmap(dst->pDrawable); + priv = glamor_get_pixmap_private(pixmap); + + if (!GLAMOR_PIXMAP_PRIV_HAS_FBO(priv)) + goto fallback; + if (dst->alphaMap) { + DEBUGF("%s: fallback, dst has an alpha-map\n", __FUNCTION__); + goto fallback; + } + need_free_region = TRUE; DEBUGF("%s: drawable extents (%d, %d),(%d, %d) x %d\n", -- 1.7.11.2