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>
This commit is contained in:
Zhigang Gong 2012-11-13 10:08:02 +08:00 committed by Eric Anholt
parent 14e02f5132
commit 80f5e21dae

View File

@ -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",