can't cheat on contains due to underflow
Bug: skia: Change-Id: Ic7fc4e1b843f885a2d52cd54861679f6c500eff4 Reviewed-on: https://skia-review.googlesource.com/106267 Reviewed-by: Mike Klein <mtklein@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
parent
c43611c02c
commit
0a5f99ccdf
@ -456,8 +456,7 @@ struct SK_API SkIRect {
|
||||
@return true if (x, y) is inside SkIRect
|
||||
*/
|
||||
bool contains(int32_t x, int32_t y) const {
|
||||
return (unsigned)(x - fLeft) < (unsigned)(fRight - fLeft) &&
|
||||
(unsigned)(y - fTop) < (unsigned)(fBottom - fTop);
|
||||
return x >= fLeft && x < fRight && y >= fTop && y < fBottom;
|
||||
}
|
||||
|
||||
/** Constructs SkRect to intersect from (left, top, right, bottom). Does not sort
|
||||
|
Loading…
Reference in New Issue
Block a user