From 40a8186f0f78b7c36ef7e3d902c53bdc9bb7c650 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 27 Dec 2013 12:22:08 -0800 Subject: [PATCH] glamor: Remove an extra copy of RegionNil(). Signed-off-by: Eric Anholt Reviewed-by: Zhigang Gong Reviewed-by: Keith Packard --- glamor/glamor_compositerects.c | 4 ++-- glamor/glamor_utils.h | 6 ------ 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/glamor/glamor_compositerects.c b/glamor/glamor_compositerects.c index 967e22846..3b6b2ed07 100644 --- a/glamor/glamor_compositerects.c +++ b/glamor/glamor_compositerects.c @@ -123,7 +123,7 @@ glamor_composite_rectangles(CARD8 op, if (!num_rects) return; - if (region_is_empty(dst->pCompositeClip)) { + if (RegionNil(dst->pCompositeClip)) { DEBUGF("%s: empty clip, skipping\n", __FUNCTION__); return; } @@ -212,7 +212,7 @@ glamor_composite_rectangles(CARD8 op, if (dst->pCompositeClip->data && (!pixman_region_intersect(®ion, ®ion, dst->pCompositeClip) || - region_is_empty(®ion))) { + RegionNil(®ion))) { DEBUGF("%s: zero-intersection between rectangles and clip\n", __FUNCTION__); pixman_region_fini(®ion); diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h index 151a65e05..ea827df3b 100644 --- a/glamor/glamor_utils.h +++ b/glamor/glamor_utils.h @@ -815,12 +815,6 @@ glamor_translate_boxes(BoxPtr boxes, int nbox, int dx, int dy) } } -static inline Bool -region_is_empty(pixman_region16_t * region) -{ - return region->data && region->data->numRects == 0; -} - #ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof(x[0])) #endif