From: Søren Sandmann Pedersen <[email protected]>
The same binary search from the previous commit can be used in this
function too.
---
pixman/pixman-region.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/pixman/pixman-region.c b/pixman/pixman-region.c
index a199405..35fefc4 100644
--- a/pixman/pixman-region.c
+++ b/pixman/pixman-region.c
@@ -2376,9 +2376,12 @@ PREFIX (_contains_point) (region_type_t * region,
return(TRUE);
}
- for (pbox = PIXREGION_BOXPTR (region), pbox_end = pbox + numRects;
- pbox != pbox_end;
- pbox++)
+ pbox = PIXREGION_BOXPTR (region);
+ pbox_end = pbox + numRects;
+
+ pbox = find_box_for_y (pbox, pbox_end, y);
+
+ for (;pbox != pbox_end; pbox++)
{
if (y >= pbox->y2)
continue; /* not there yet */
--
1.7.4
_______________________________________________
Pixman mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pixman