diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-03 17:07:48 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-03 17:07:48 +0000 |
commit | 31c5eb8e906bf8e59743372edb2d703b50cd311e (patch) | |
tree | 53e1dce53b75ab916d8964f32ad710092d102e92 | |
parent | fa0fefd638d148d48760c95fe05520cddd96e5a4 (diff) |
sna: Clean up the fallback code for glyphs
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 43 |
1 files changed, 14 insertions, 29 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index a2e9dc24..555cbc67 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -7548,19 +7548,19 @@ sna_image_glyph(DrawablePtr drawable, GCPtr gc, region.extents.x1, region.extents.y1, region.extents.x2, region.extents.y2)); + region.data = NULL; + region_maybe_clip(®ion, gc->pCompositeClip); + if (!RegionNotEmpty(®ion)) + return; + if (FORCE_FALLBACK) - goto fallback_clip; + goto fallback; if (wedged(sna)) { DBG(("%s: fallback -- wedged\n", __FUNCTION__)); - goto fallback_clip; + goto fallback; } - region.data = NULL; - region_maybe_clip(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) - return; - if (sna_drawable_use_gpu_bo(drawable, ®ion.extents, &damage) && sna_reversed_glyph_blt(drawable, gc, x, y, n, info, base, damage, ®ion, 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(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) - 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)); + region.data = NULL; + region_maybe_clip(®ion, gc->pCompositeClip); + if (!RegionNotEmpty(®ion)) + return; + if (FORCE_FALLBACK) - goto fallback_clip; + goto fallback; if (wedged(sna)) { DBG(("%s: fallback -- wedged\n", __FUNCTION__)); - goto fallback_clip; + goto fallback; } - region.data = NULL; - region_maybe_clip(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) - return; - if (sna_drawable_use_gpu_bo(drawable, ®ion.extents, &damage) && sna_reversed_glyph_blt(drawable, gc, x, y, n, info, base, damage, ®ion, 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(®ion, gc->pCompositeClip); - if (!RegionNotEmpty(®ion)) - return; - goto fallback; - } static bool |