diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-13 14:46:45 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-10-13 14:46:45 +0100 |
commit | 0cd2c43fa8f3a66d612589ad1163a90e427668ac (patch) | |
tree | fcf290b3aef621a9addc22c299c2c8da48147491 /src/sna/sna_trapezoids.c | |
parent | 87d675061e324934a95412f9fe87a67c219d3fb9 (diff) |
sna/trapezoids: Use the aligned fast path for fallbacks
Route the fallback methods through the force_fallback aligned fast
paths.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_trapezoids.c')
-rw-r--r-- | src/sna/sna_trapezoids.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c index f14a67c9..96916896 100644 --- a/src/sna/sna_trapezoids.c +++ b/src/sna/sna_trapezoids.c @@ -560,26 +560,29 @@ sna_composite_trapezoids(CARD8 op, return; if (NO_ACCEL) - goto fallback; + goto force_fallback; + + if (FORCE_FALLBACK > 0) + goto force_fallback; if (wedged(sna)) { DBG(("%s: fallback -- wedged\n", __FUNCTION__)); - goto fallback; + goto force_fallback; } if (dst->alphaMap) { DBG(("%s: fallback -- dst alpha map\n", __FUNCTION__)); - goto fallback; + goto force_fallback; } priv = sna_pixmap(pixmap); if (priv == NULL) { DBG(("%s: fallback -- dst is unattached\n", __FUNCTION__)); - goto fallback; + goto force_fallback; } - force_fallback = FORCE_FALLBACK > 0; - if ((too_small(priv) || DAMAGE_IS_ALL(priv->cpu_damage)) && + if (FORCE_FALLBACK == 0 && + (too_small(priv) || DAMAGE_IS_ALL(priv->cpu_damage)) && !picture_is_gpu(sna, src) && untransformed(src)) { DBG(("%s: force fallbacks --too small, %dx%d? %d, all-cpu? %d, src-is-cpu? %d\n", __FUNCTION__, @@ -588,10 +591,10 @@ sna_composite_trapezoids(CARD8 op, too_small(priv), (int)DAMAGE_IS_ALL(priv->cpu_damage), !picture_is_gpu(sna, src))); + +force_fallback: force_fallback = true; } - if (FORCE_FALLBACK < 0) - force_fallback = false; /* scan through for fast rectangles */ rectilinear = pixel_aligned = true; @@ -630,6 +633,7 @@ sna_composite_trapezoids(CARD8 op, DBG(("%s: rectilinear? %d, pixel-aligned? %d\n", __FUNCTION__, rectilinear, pixel_aligned)); + flags = 0; if (rectilinear) { if (pixel_aligned) { |