[PATCH 14/15] glamor: Remove an extra copy of RegionNil().

Eric Anholt eric at anholt.net
Thu Jan 9 17:26:28 PST 2014


Signed-off-by: Eric Anholt <eric at anholt.net>
---
 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 967e228..3b6b2ed 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(&region, &region, dst->pCompositeClip) ||
-         region_is_empty(&region))) {
+         RegionNil(&region))) {
         DEBUGF("%s: zero-intersection between rectangles and clip\n",
                __FUNCTION__);
         pixman_region_fini(&region);
diff --git a/glamor/glamor_utils.h b/glamor/glamor_utils.h
index 151a65e..ea827df 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
-- 
1.8.5.1



More information about the xorg-devel mailing list