[PATCH] Improve PIXREGION_NIL to return true on degenerated regions.
Matthias Hopf
mhopf at suse.de
Wed Mar 24 04:00:21 PDT 2010
Fixes Novell bug 568811.
---
pixman/pixman-region.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c
index a6a4005..179241d 100644
--- a/pixman/pixman-region.c
+++ b/pixman/pixman-region.c
@@ -69,7 +69,11 @@
#include <stdio.h>
#include "pixman-private.h"
-#define PIXREGION_NIL(reg) ((reg)->data && !(reg)->data->numRects)
+#define PIXREGION_NIL(reg) (((reg)->data && !(reg)->data->numRects) || \
+ (! (reg)->data && \
+ (reg)->extents.x1 == (reg)->extents.x2 && \
+ (reg)->extents.y1 == (reg)->extents.y2))
+
/* not a region */
#define PIXREGION_NAR(reg) ((reg)->data == pixman_broken_data)
#define PIXREGION_NUMRECTS(reg) ((reg)->data ? (reg)->data->numRects : 1)
--
1.6.0.2
--k+w/mQv8wyuph6w0--
--wRRV7LY7NUeQGEoC--
More information about the xorg-devel
mailing list