diff options
| author | 2022-08-29 18:41:16 +0000 | |
|---|---|---|
| committer | 2022-08-29 18:41:16 +0000 | |
| commit | f81f6ae64f73742743c86c29e25a4bdd40bae1cc (patch) | |
| tree | c5ca563634b714d301b5d882c612af175875c5e0 | |
| parent | 1a798641146e6937a8816311b8ba026b8295e31d (diff) | |
| parent | ad70c8a7f8344bcefdb3ba842241c16dd265c4f9 (diff) | |
Merge "Revert "Call isEmpty() instead of constructing a new object to compare""
| -rw-r--r-- | native/graphics/jni/imagedecoder.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/native/graphics/jni/imagedecoder.cpp b/native/graphics/jni/imagedecoder.cpp index 7fe2735c9ad6..cd6ed2391608 100644 --- a/native/graphics/jni/imagedecoder.cpp +++ b/native/graphics/jni/imagedecoder.cpp @@ -381,7 +381,7 @@ int AImageDecoder_setCrop(AImageDecoder* decoder, ARect crop) { SkIRect cropIRect; cropIRect.setLTRB(crop.left, crop.top, crop.right, crop.bottom); - SkIRect* cropPtr = cropIRect.isEmpty() ? nullptr : &cropIRect; + SkIRect* cropPtr = cropIRect == SkIRect::MakeEmpty() ? nullptr : &cropIRect; return imageDecoder->setCropRect(cropPtr) ? ANDROID_IMAGE_DECODER_SUCCESS : ANDROID_IMAGE_DECODER_BAD_PARAMETER; } |