From: Chris Wilson Date: Mon, 25 Nov 2013 10:01:00 +0000 (+0000) Subject: sna/trapezoids: trapezoids_bounds() reports not-empty, so use it X-Git-Tag: 2.99.907~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4c4458e8a30920d065ca5db5d3ca3cc49454b869;p=platform%2Fupstream%2Fxf86-video-intel.git sna/trapezoids: trapezoids_bounds() reports not-empty, so use it Reported-by: Zdenek Kabelac Signed-off-by: Chris Wilson --- diff --git a/src/sna/sna_trapezoids.c b/src/sna/sna_trapezoids.c index 7d133d8..2dcb6d3 100644 --- a/src/sna/sna_trapezoids.c +++ b/src/sna/sna_trapezoids.c @@ -288,8 +288,7 @@ trapezoids_fallback(struct sna *sna, trapezoid_origin(&traps[0].left, &dst_x, &dst_y); - trapezoids_bounds(ntrap, traps, &bounds); - if (bounds.y1 >= bounds.y2 || bounds.x1 >= bounds.x2) + if (!trapezoids_bounds(ntrap, traps, &bounds)) return; DBG(("%s: bounds (%d, %d), (%d, %d)\n", __FUNCTION__, diff --git a/src/sna/sna_trapezoids_mono.c b/src/sna/sna_trapezoids_mono.c index dd629b6..641c6e3 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",