Revert "Call isEmpty() instead of constructing a new object to compare"
This reverts commit ff37ce9727daf09ff83eb0f96bc499a473bb7aa1.
Reason for revert: Breaks tests
The motivation for this CL was that patch set 1 of https://skia-review.googlesource.com/c/skia/+/573636 moved operator== out of
SkRect.h, and this file no longer had access to it.
isEmpty will return true for more values than {0, 0, 0, 0}, though,
which changes the behavior for AImageDecoder_setCrop. Instead of
returning ANDROID_IMAGE_DECODER_BAD_PARAMETER, the bad rect will be
ignored. Tests caught this change in behavior.
Restore the old behavior of returning an error. The final version of
the Skia change that landed restored an inline version of SkIRect::operator==, so the old behavior is fine with the new code.
Bug: b/243964535
Test: AImageDecoderTest
Change-Id: Iba267a14e7e0ba084384bb1bbb293eda2311b8de
1 file changed