diff options
author | Zhigang Gong <zhigang.gong@linux.intel.com> | 2012-11-13 10:08:02 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@linux.intel.com> | 2012-11-13 10:13:04 +0800 |
commit | f1457c1c59efdadbad25f01dce9433643d688844 (patch) | |
tree | 61916fe8bc98c72c32ca901dd5417cd7392ed407 | |
parent | beeddaae1da253d1a442228a75f80ef40a0204ac (diff) |
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 <zhigang.gong@linux.intel.com>
-rw-r--r-- | src/glamor_compositerects.c | 20 |
1 files 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", |