Revert "limit mask drawing to clip bounds"

This reverts commit 41d087c262.

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>
This commit is contained in:
Greg Daniel 2019-04-12 11:55:11 +00:00 committed by Skia Commit-Bot
parent 41476708db
commit 35f1c154c5

View File

@ -965,11 +965,6 @@ void SkDraw::drawPath(const SkPath& origSrcPath, const SkPaint& origPaint,
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 @@ void SkDraw::drawBitmapAsMask(const SkBitmap& bitmap, const SkPaint& paint) cons
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;