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>
This commit is contained in:
parent
d26f533515
commit
40a8186f0f
|
@ -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);
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user