[skif] Use isEmpty64() instead of isEmpty() for layerspace irects

For excessively large crop rects, isEmpty() was returning true when
the width or height overflowed. isEmpty64() just checks left < right
and top < bottom, which makes it consistent with SkRect::isEmpty().

The large crop rects are now allowed through, and when they are
intersected with the desired output, become reasonable and usable.
Previously they were causing the entire operation to be dropped.

In the event that somehow we try to create a backing image for a
layer irect that is this large, but was previously being rejected with
the 32-bit isEmpty(), the width and height will still be negative and
image allocation will fail, which is still guarded.

Bug: chromium:1466359
Change-Id: I3045773e111bbb779826e155ea26da13212481bf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/728676
Reviewed-by: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
1 file changed