summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-03 17:07:48 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-03 17:07:48 +0000
commit31c5eb8e906bf8e59743372edb2d703b50cd311e (patch)
tree53e1dce53b75ab916d8964f32ad710092d102e92
parentfa0fefd638d148d48760c95fe05520cddd96e5a4 (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.c43
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(&region, gc->pCompositeClip);
+ if (!RegionNotEmpty(&region))
+ 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(&region, gc->pCompositeClip);
- if (!RegionNotEmpty(&region))
- return;
-
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));
+ region.data = NULL;
+ region_maybe_clip(&region, gc->pCompositeClip);
+ if (!RegionNotEmpty(&region))
+ 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(&region, gc->pCompositeClip);
- if (!RegionNotEmpty(&region))
- return;
-
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