aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapDevice.cpp
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2018-04-17 11:06:31 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-04-17 15:42:44 +0000
commit963781a985a777c21987f432dc4a1b766d1db23b (patch)
tree2c20558815d1cded57bc68239fb618f972ac93d0 /src/core/SkBitmapDevice.cpp
parent77d085ef9f917e095f0fc55b114323eaffe0187e (diff)
only recheck fNeedsTiling if we computed fSrcBounds
Bug: oss-fuzz:7363 Change-Id: I64cc83d31e8aaf8221e78c3b5301ffcce45449c1 Reviewed-on: https://skia-review.googlesource.com/121795 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'src/core/SkBitmapDevice.cpp')
-rw-r--r--src/core/SkBitmapDevice.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp
index f6433afb7e..7c0e0ab540 100644
--- a/src/core/SkBitmapDevice.cpp
+++ b/src/core/SkBitmapDevice.cpp
@@ -81,12 +81,12 @@ public:
dev->ctm().mapRect(&devBounds, *bounds);
if (devBounds.intersect(SkRect::Make(clipR))) {
fSrcBounds = devBounds.roundOut();
+ // Check again, now that we have computed srcbounds.
+ fNeedsTiling = fSrcBounds.right() > kMaxDim || fSrcBounds.bottom() > kMaxDim;
} else {
fNeedsTiling = false;
fDone = true;
}
- // Check again, now that we have computed srcbounds.
- fNeedsTiling = fSrcBounds.right() > kMaxDim || fSrcBounds.bottom() > kMaxDim;
} else {
fSrcBounds = clipR;
}