summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-02 22:02:51 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-03 12:02:52 +0000
commit73b2ef5a7de8d733fa1821e5010480ede305e25e (patch)
tree85dcc6bb02269e92e92b92f3535438e371842468
parent6fd0754e9c81164ca0fdcf96ba2bfb419568187f (diff)
sna: gc->pCompositeClip always exists after validate
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/sna/sna_accel.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/sna/sna_accel.c b/src/sna/sna_accel.c
index 9b9c7ccc..f88222f5 100644
--- a/src/sna/sna_accel.c
+++ b/src/sna/sna_accel.c
@@ -111,7 +111,7 @@ static inline void region_set(RegionRec *r, const BoxRec *b)
static inline void region_maybe_clip(RegionRec *r, RegionRec *clip)
{
- if (clip && clip->data)
+ if (clip->data)
RegionIntersect(r, r, clip);
}
@@ -1079,9 +1079,6 @@ static inline bool clip_box(BoxPtr box, GCPtr gc)
const BoxRec *clip;
bool clipped;
- if (!gc->pCompositeClip)
- return false;
-
clip = &gc->pCompositeClip->extents;
clipped = gc->pCompositeClip->data != NULL;
@@ -2202,8 +2199,7 @@ sna_copy_area(DrawablePtr src, DrawablePtr dst, GCPtr gc,
region.extents.x2 = region.extents.x1 + width;
region.extents.y2 = region.extents.y1 + height;
region.data = NULL;
- if (gc->pCompositeClip)
- RegionIntersect(&region, &region, gc->pCompositeClip);
+ RegionIntersect(&region, &region, gc->pCompositeClip);
if (!RegionNotEmpty(&region))
return NULL;