summaryrefslogtreecommitdiff
path: root/src/sna/sna_trapezoids_mono.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-11-25 10:01:00 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-11-25 10:04:49 +0000
commit4c4458e8a30920d065ca5db5d3ca3cc49454b869 (patch)
tree9e9d38b2cc8b081131c6f45952db96ea8f6ac97f /src/sna/sna_trapezoids_mono.c
parentaf4995d74bd3ee3ed8f17c7c04c8d3acaaecebc6 (diff)
sna/trapezoids: trapezoids_bounds() reports not-empty, so use it
Reported-by: Zdenek Kabelac <zkabelac@redhat.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_trapezoids_mono.c')
-rw-r--r--src/sna/sna_trapezoids_mono.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/sna/sna_trapezoids_mono.c b/src/sna/sna_trapezoids_mono.c
index dd629b6b..641c6e36 100644
--- a/src/sna/sna_trapezoids_mono.c
+++ b/src/sna/sna_trapezoids_mono.c
@@ -769,8 +769,7 @@ mono_trapezoids_span_converter(struct sna *sna,
trapezoid_origin(&traps[0].left, &dst_x, &dst_y);
- trapezoids_bounds(ntrap, traps, &extents);
- if (extents.y1 >= extents.y2 || extents.x1 >= extents.x2)
+ if (!trapezoids_bounds(ntrap, traps, &extents))
return true;
DBG(("%s: extents (%d, %d), (%d, %d)\n",
@@ -1049,9 +1048,7 @@ mono_trapezoid_span_inplace(struct sna *sna,
int was_clear;
int x, y, n;
- trapezoids_bounds(ntrap, traps, &mono.clip.extents);
- if (mono.clip.extents.y1 >= mono.clip.extents.y2 ||
- mono.clip.extents.x1 >= mono.clip.extents.x2)
+ if (!trapezoids_bounds(ntrap, traps, &mono.clip.extents))
return true;
DBG(("%s: extents (%d, %d), (%d, %d)\n",