summaryrefslogtreecommitdiff
path: root/src/sna/sna_render.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-03-23 23:08:02 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2013-03-23 23:10:50 +0000
commit6b20924f22a14f69651dcf471c48f8a44d8ad42f (patch)
treea7e7208323894d6581cec7aaca164ae74dc437e7 /src/sna/sna_render.c
parentf6582387e7d601272a92c3aaeb656de5ce1ffe75 (diff)
sna: Convert out-of-bounds sample to CLEAR
If asked to perform pixelformat conversion of a sample that resides outside the valid area, we can simply substitute CLEAR. Bugzila: http://bugs.freedesktop.org/show_bug.cgi?id=62681 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_render.c')
-rw-r--r--src/sna/sna_render.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c
index 2e29d950..42418368 100644
--- a/src/sna/sna_render.c
+++ b/src/sna/sna_render.c
@@ -1734,7 +1734,7 @@ sna_render_picture_convert(struct sna *sna,
pixmap->drawable.width,
pixmap->drawable.height));
- if (w == 0 || h == 0) {
+ if (w <= 0 || h <= 0) {
DBG(("%s: sample extents lie outside of source, using clear\n",
__FUNCTION__));
return 0;