sna: Clean up the fallback code for glyphs

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-11-03 17:07:48 +00:00
parent fa0fefd638
commit 31c5eb8e90
1 changed files with 16 additions and 31 deletions

View File

@ -7548,19 +7548,19 @@ sna_image_glyph(DrawablePtr drawable, GCPtr gc,
region.extents.x1, region.extents.y1,
region.extents.x2, region.extents.y2));
if (FORCE_FALLBACK)
goto fallback_clip;
if (wedged(sna)) {
DBG(("%s: fallback -- wedged\n", __FUNCTION__));
goto fallback_clip;
}
region.data = NULL;
region_maybe_clip(&region, gc->pCompositeClip);
if (!RegionNotEmpty(&region))
return;
if (FORCE_FALLBACK)
goto fallback;
if (wedged(sna)) {
DBG(("%s: fallback -- wedged\n", __FUNCTION__));
goto fallback;
}
if (sna_drawable_use_gpu_bo(drawable, &region.extents, &damage) &&
sna_reversed_glyph_blt(drawable, gc, x, y, n, info, base,
damage, &region, false)) {
@ -7577,14 +7577,6 @@ fallback:
DBG(("%s: fallback -- fbImageGlyphBlt\n", __FUNCTION__));
fbImageGlyphBlt(drawable, gc, x, y, n, info, base);
return;
fallback_clip:
region.data = NULL;
region_maybe_clip(&region, gc->pCompositeClip);
if (!RegionNotEmpty(&region))
return;
goto fallback;
}
static void
@ -7615,19 +7607,19 @@ sna_poly_glyph(DrawablePtr drawable, GCPtr gc,
region.extents.x1, region.extents.y1,
region.extents.x2, region.extents.y2));
if (FORCE_FALLBACK)
goto fallback_clip;
if (wedged(sna)) {
DBG(("%s: fallback -- wedged\n", __FUNCTION__));
goto fallback_clip;
}
region.data = NULL;
region_maybe_clip(&region, gc->pCompositeClip);
if (!RegionNotEmpty(&region))
return;
if (FORCE_FALLBACK)
goto fallback;
if (wedged(sna)) {
DBG(("%s: fallback -- wedged\n", __FUNCTION__));
goto fallback;
}
if (sna_drawable_use_gpu_bo(drawable, &region.extents, &damage) &&
sna_reversed_glyph_blt(drawable, gc, x, y, n, info, base,
damage, &region, true)) {
@ -7644,13 +7636,6 @@ fallback:
DBG(("%s: fallback -- fbPolyGlyphBlt\n", __FUNCTION__));
fbPolyGlyphBlt(drawable, gc, x, y, n, info, base);
fallback_clip:
region.data = NULL;
region_maybe_clip(&region, gc->pCompositeClip);
if (!RegionNotEmpty(&region))
return;
goto fallback;
}
static bool