diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-06 14:16:36 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-07-06 14:16:36 +0100 |
commit | 24b59a8955eb15522ad334a541530aca937fcf07 (patch) | |
tree | dfe5fe29378c5867ea9b2aa59ed1ca69aa444d32 /src/sna/sna_dri.c | |
parent | 68b357454af705f1ed3a9599435a402f2611a180 (diff) |
sna: Refactor a common function: is_clipped()
Had I done this earlier, I would not have the bug in the open-coded
version. Le sigh.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_dri.c')
-rw-r--r-- | src/sna/sna_dri.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/sna/sna_dri.c b/src/sna/sna_dri.c index 36b40a74..e1b5de67 100644 --- a/src/sna/sna_dri.c +++ b/src/sna/sna_dri.c @@ -522,9 +522,7 @@ sna_dri_copy_to_front(struct sna *sna, DrawablePtr draw, RegionPtr region, if (draw->type != DRAWABLE_PIXMAP) { WindowPtr win = (WindowPtr)draw; - if (win->clipList.data || - win->clipList.extents.x2 - win->clipList.extents.x1 != draw->width || - win->clipList.extents.y2 - win->clipList.extents.y1 != draw->height) { + if (is_clipped(&win->clipList, draw)) { DBG(("%s: draw=(%d, %d), delta=(%d, %d), clip.extents=(%d, %d), (%d, %d)\n", __FUNCTION__, draw->x, draw->y, get_drawable_dx(draw), get_drawable_dy(draw), |