summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2013-12-27 12:22:08 -0800
committerEric Anholt <eric@anholt.net>2014-01-27 09:30:47 -0800
commit40a8186f0f78b7c36ef7e3d902c53bdc9bb7c650 (patch)
treeef5e4a1a52cfc103c6fa399aaf55c588cf31c7ce
parentd26f5335151a9e962afa4bbf29ca5b94660a33ca (diff)
glamor: Remove an extra copy of RegionNil().
Signed-off-by: Eric Anholt <eric@anholt.net> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com> Reviewed-by: Keith Packard <keithp@keithp.com>
-rw-r--r--glamor/glamor_compositerects.c4
-rw-r--r--glamor/glamor_utils.h6
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(&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 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