pixman: Branch 'master'
Benjamin Otte
company at kemper.freedesktop.org
Thu Jul 23 00:55:18 PDT 2009
pixman/pixman-region.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 84b7df09394ac7237fb42fe25c0fbde77e065a16
Author: Benjamin Otte <otte at gnome.org>
Date: Thu Jul 23 09:54:49 2009 +0200
Don't warn for empty rectangles, only degenerate ones
diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c
index 708ac7c..db23be3 100644
--- a/pixman/pixman-region.c
+++ b/pixman/pixman-region.c
@@ -64,6 +64,7 @@
#define PIXREGION_END(reg) PIXREGION_BOX (reg, (reg)->data->numRects - 1)
#define GOOD_RECT(rect) ((rect)->x1 < (rect)->x2 && (rect)->y1 < (rect)->y2)
+#define BAD_RECT(rect) ((rect)->x1 > (rect)->x2 || (rect)->y1 > (rect)->y2)
#define PIXMAN_REGION_LOG_FAILURES
@@ -385,7 +386,8 @@ PREFIX (_init_rect) (region_type_t * region,
if (!GOOD_RECT (®ion->extents))
{
- log_region_error (FUNC, "Invalid rectangle passed");
+ if (BAD_RECT (®ion->extents))
+ log_region_error (FUNC, "Invalid rectangle passed");
PREFIX (_init) (region);
return;
}
@@ -398,7 +400,8 @@ PREFIX (_init_with_extents) (region_type_t *region, box_type_t *extents)
{
if (!GOOD_RECT (extents))
{
- log_region_error (FUNC, "Invalid rectangle passed");
+ if (BAD_RECT (extents))
+ log_region_error (FUNC, "Invalid rectangle passed");
PREFIX (_init) (region);
return;
}
@@ -1351,7 +1354,8 @@ PREFIX (_union_rect) (region_type_t *dest,
if (!GOOD_RECT (®ion.extents))
{
- log_region_error (FUNC, "Invalid rectangle passed");
+ if (BAD_RECT (®ion.extents))
+ log_region_error (FUNC, "Invalid rectangle passed");
return PREFIX (_copy) (dest, source);
}
More information about the xorg-commit
mailing list