Compare drawBounds with MakeLargest instead of isFinite
In some cases, transformedBounds is finite but its rounded out
IRect is empty so we can't do that.
TBR: reed@google.com
Bug: skia:
Change-Id: Ife78e91a494964042fa09b8cbe86cabbd2572fb9
Reviewed-on: https://skia-review.googlesource.com/92625
Reviewed-by: Yuqian Li <liyuqian@google.com>
Commit-Queue: Yuqian Li <liyuqian@google.com>
diff --git a/src/core/SkThreadedBMPDevice.cpp b/src/core/SkThreadedBMPDevice.cpp
index 8c201f3..bdb5f95 100644
--- a/src/core/SkThreadedBMPDevice.cpp
+++ b/src/core/SkThreadedBMPDevice.cpp
@@ -73,11 +73,11 @@
}
SkIRect SkThreadedBMPDevice::transformDrawBounds(const SkRect& drawBounds) const {
+ if (drawBounds == SkRectPriv::MakeLargest()) {
+ return SkRectPriv::MakeILargest();
+ }
SkRect transformedBounds;
this->ctm().mapRect(&transformedBounds, drawBounds);
- if (!transformedBounds.isFinite()) {
- transformedBounds = SkRectPriv::MakeLargestS32();
- }
return transformedBounds.roundOut();
}