Revert "limit mask drawing to clip bounds"
This reverts commit 41d087c26288777e191beba9677e34e54a96a965.
Reason for revert: very speculative revert to see if this fixes android roll
Original change's description:
> limit mask drawing to clip bounds
>
> Change-Id: Iab74531614654f241e12d1cd1af14725888580c8
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207143
> Reviewed-by: Mike Reed <reed@google.com>
> Auto-Submit: Lee Salzman <lsalzman@mozilla.com>
> Commit-Queue: Mike Klein <mtklein@google.com>
TBR=mtklein@chromium.org,mtklein@google.com,reed@google.com,lsalzman@mozilla.com
Change-Id: Ib848a276cc4bfdf346949acef3e81fd9f8b082a2
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/207860
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/core/SkDraw.cpp b/src/core/SkDraw.cpp
index 90bdf47..b30f654 100644
--- a/src/core/SkDraw.cpp
+++ b/src/core/SkDraw.cpp
@@ -965,11 +965,6 @@
void SkDraw::drawBitmapAsMask(const SkBitmap& bitmap, const SkPaint& paint) const {
SkASSERT(bitmap.colorType() == kAlpha_8_SkColorType);
- // nothing to draw
- if (fRC->isEmpty()) {
- return;
- }
-
if (SkTreatAsSprite(*fMatrix, bitmap.dimensions(), paint)) {
int ix = SkScalarRoundToInt(fMatrix->getTranslateX());
int iy = SkScalarRoundToInt(fMatrix->getTranslateY());
@@ -996,11 +991,10 @@
r.round(&mask.fBounds);
// set the mask's bounds to the transformed bitmap-bounds,
- // clipped to the actual device and further limited by the clip bounds
+ // clipped to the actual device
{
- SkASSERT(fDst.bounds().contains(fRC->getBounds()));
- SkIRect devBounds = fDst.bounds();
- devBounds.intersect(fRC->getBounds().makeOutset(1, 1));
+ SkIRect devBounds;
+ devBounds.set(0, 0, fDst.width(), fDst.height());
// need intersect(l, t, r, b) on irect
if (!mask.fBounds.intersect(devBounds)) {
return;