summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-02-21 09:29:41 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-02-21 09:31:24 +0000
commit27bc2acf0e6a0e5e071e0d187bdf71577e821af8 (patch)
tree4e042f72044efa718774204e44acd04d12a8f87d
parentd98b41ce4323b43d2359349a04a4a56559e341a2 (diff)
sna: Fix use of RegionInit() for singular regions
For a singular region, we want to use a value for nboxes of 0 not 1, fortunately if you pass in a box, it ignores the value of nboxes. RegionInit() is a most peculiar API! Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_glyphs.c2
-rw-r--r--src/sna/sna_video.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c
index bef17749..91273c92 100644
--- a/src/sna/sna_glyphs.c
+++ b/src/sna/sna_glyphs.c
@@ -1026,7 +1026,7 @@ glyphs_fallback(CARD8 op,
DBG(("%s: (%d, %d), (%d, %d)\n",
__FUNCTION__, box.x1, box.y1, box.x2, box.y2));
- RegionInit(&region, &box, 1);
+ RegionInit(&region, &box, 0);
RegionTranslate(&region, dst->pDrawable->x, dst->pDrawable->y);
if (dst->pCompositeClip)
RegionIntersect(&region, &region, dst->pCompositeClip);
diff --git a/src/sna/sna_video.c b/src/sna/sna_video.c
index cec04733..ebc3860f 100644
--- a/src/sna/sna_video.c
+++ b/src/sna/sna_video.c
@@ -157,7 +157,7 @@ sna_video_clip_helper(ScrnInfoPtr scrn,
/* For textured video, we don't actually want to clip at all. */
if (crtc && !video->textured) {
- RegionInit(&crtc_region_local, &crtc_box, 1);
+ RegionInit(&crtc_region_local, &crtc_box, 0);
crtc_region = &crtc_region_local;
RegionIntersect(crtc_region, crtc_region, reg);
}