diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-13 20:30:25 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-06-13 21:45:22 +0100 |
commit | 15485602d8451bcf6c2e979ccbd9cdc11111bcce (patch) | |
tree | 8ffbf4ed706ec203907b4977959e779ca2db60b4 | |
parent | b082a07a69ba5490fba47766c4f608b1cdf2427e (diff) |
sna: Use the right is-clipped hint
The region here has yet to be clipped, and so the only valid is-clipped
hint is from the flags computed from the PolyRect extents. Make sure we
use those when determining whether it is valid to discard damage.
Fixes regression from
commit ad0390068832ad4727371902fe41a85a53de1894 [2.99.903]
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue Sep 24 10:00:03 2013 +0100
sna: Separate out copy preferrence from operating in place decision
Reported-by: Nick Bowler <nbowler@draconx.ca>
Tested-by: Nick Bowler <nbowler@draconx.ca>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79992
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_accel.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c index 13fe6ed6..ce04ca0d 100644 --- a/src/sna/sna_accel.c +++ b/src/sna/sna_accel.c @@ -14382,16 +14382,15 @@ sna_poly_fill_rect(DrawablePtr draw, GCPtr gc, int n, xRectangle *rect) RegionTranslate(®ion, dx, dy); } - if (region_subsumes_drawable(®ion, &pixmap->drawable)) { - discard_cpu_damage(sna, priv); - hint |= IGNORE_CPU | REPLACES; - } else { - if ((flags & 2) == 0) - hint |= IGNORE_CPU; - if (priv->cpu_damage && - region_subsumes_damage(®ion, priv->cpu_damage)) { + if ((flags & 2) == 0) { + hint |= IGNORE_CPU; + if (region_subsumes_drawable(®ion, &pixmap->drawable)) { discard_cpu_damage(sna, priv); - hint |= IGNORE_CPU; + hint |= REPLACES; + } else { + if (priv->cpu_damage && + region_subsumes_damage(®ion, priv->cpu_damage)) + discard_cpu_damage(sna, priv); } } if (priv->cpu_damage == NULL) { |