Revert of fix size check for drawBitmap fast-path in SkBitmapDevice::drawBitmapRect (patchset #2 id:20001 of https://codereview.chromium.org/2089583002/ )

Reason for revert:
I agree the diffs are not meaningful, but nevertheless their existence is blocking the roll into Chrome.

(https://storage.googleapis.com/chromium-layout-test-archives/linux_trusty_blink_rel/7376/layout-test-results/results.html)

Original issue's description:
> Fix the size check for the drawBitmap fast-path in SkBitmapDevice::drawBitmapRect. It would fail when the source rectangle had a non-zero offset, in which case it would compare the source rectangle with the offset to the extracted bitmap size, which always fails. The only thing that should matter is that the source rectangle and extract bitmap have the same size, since the offset gets added onto the matrix.
>
> BUG=skia:
> GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2089583002
>
> Review-Url: https://codereview.chromium.org/2089583002
> Committed: https://skia.googlesource.com/skia/+/ea9bc0c07b5dae78a9a449d7d7a07fc79262d41a

TBR=reed@google.com,caryclark@google.com,lsalzman@mozilla.com
# Skipping CQ checks because original CL landed less than 1 days ago.
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:

Review-Url: https://codereview.chromium.org/2787263005
This commit is contained in:
mtklein 2017-03-31 18:36:39 -07:00 committed by Commit bot
parent d58f040532
commit 65c74f1368

View File

@ -316,9 +316,8 @@ void SkBitmapDevice::drawBitmapRect(const SkBitmap& bitmap,
matrix.preTranslate(dx, dy);
}
SkRect extractedBitmapBounds = SkRect::MakeXYWH(dx, dy,
SkIntToScalar(bitmapPtr->width()),
SkIntToScalar(bitmapPtr->height()));
SkRect extractedBitmapBounds;
extractedBitmapBounds.isetWH(bitmapPtr->width(), bitmapPtr->height());
if (extractedBitmapBounds == tmpSrc) {
// no fractional part in src, we can just call drawBitmap
goto USE_DRAWBITMAP;