From 93193aaf7d0fc4e3a3b9be1632bfd36331b47d2e Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 4 Nov 2013 22:14:05 +0000 Subject: [PATCH] test diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c index 5830d9b..f2c1788 100644 --- a/src/sna/sna_glyphs.c +++ b/src/sna/sna_glyphs.c @@ -519,21 +519,8 @@ static void apply_damage_clipped_to_dst(struct sna_composite_op *op, static inline bool clipped_glyphs(PicturePtr dst, int nlist, GlyphListPtr list, GlyphPtr *glyphs) { - PixmapPtr pixmap; BoxRec box; - if (dst->pCompositeClip->data) { - DBG(("%s: yes, has complex region\n", __FUNCTION__)); - return true; - } - - pixmap = get_drawable_pixmap(dst->pDrawable); - if (dst->pCompositeClip->extents.x2 - dst->pCompositeClip->extents.x1 >= pixmap->drawable.width && - dst->pCompositeClip->extents.y2 - dst->pCompositeClip->extents.y1 >= pixmap->drawable.height) { - DBG(("%s: no, region matches drawable\n", __FUNCTION__)); - return false; - } - glyph_extents(nlist, list, glyphs, &box); DBG(("%s? glyph extents (%d, %d), (%d, %d), region (%d, %d), (%d, %d): %s\n", __FUNCTION__, box.x1, box.y1, box.x2, box.y2, @@ -542,10 +529,9 @@ static inline bool clipped_glyphs(PicturePtr dst, int nlist, GlyphListPtr list, box.y1 < dst->pCompositeClip->extents.y1 || box.x2 > dst->pCompositeClip->extents.x2 || box.y2 > dst->pCompositeClip->extents.y2) ? "yes" : "no")); - return (box.x1 < dst->pCompositeClip->extents.x1 || - box.y1 < dst->pCompositeClip->extents.y1 || - box.x2 > dst->pCompositeClip->extents.x2 || - box.y2 > dst->pCompositeClip->extents.y2); + + return pixman_region_contains_rectangle(dst->pCompositeClip, + &box) != PIXMAN_REGION_IN; } flatten static bool -- 1.8.4.2