On 08.07.2016 12:25, Huw Davies wrote:
Signed-off-by: Huw Davies huw@codeweavers.com
dlls/gdi32/region.c | 5 ----- 1 file changed, 5 deletions(-)
diff --git a/dlls/gdi32/region.c b/dlls/gdi32/region.c index 0b0ff47..1e10221 100644 --- a/dlls/gdi32/region.c +++ b/dlls/gdi32/region.c @@ -149,11 +149,6 @@ static inline void empty_region( WINEREGION *reg ) reg->extents.left = reg->extents.top = reg->extents.right = reg->extents.bottom = 0; }
-static inline BOOL is_in_rect( const RECT *rect, int x, int y ) -{
- return (rect->right > x && rect->left <= x && rect->bottom > y && rect->top <= y);
-}
/*
- number of points to buffer before sending them off
- to scanlines() : Must be an even number
I assume it was intentional to remove the is_in_rect() check from PtInRegion, but is it really such a good idea? For points outside of the extents rectangle it increased runtime from O(1) to O(log N), which could still matter in practice.
On Fri, Jul 08, 2016 at 03:58:04PM +0200, Sebastian Lackner wrote:
I assume it was intentional to remove the is_in_rect() check from PtInRegion, but is it really such a good idea? For points outside of the extents rectangle it increased runtime from O(1) to O(log N), which could still matter in practice.
Good catch. I hadn't meant to remove the extents test which is why I didn't remove is_in_rect() in the original patch.
Thanks, Huw.