aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkBitmapDevice.cpp
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2017-03-31 18:36:39 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2017-03-31 18:36:39 -0700
commit65c74f1368290551c60e4cd46e08ea1d6970b3d3 (patch)
treea57cf8ad92c1ae6cefe815740218df9d47ba6370 /src/core/SkBitmapDevice.cpp
parentd58f040532f2f5a63d24bd17d7c588e52c0b99c3 (diff)
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
Diffstat (limited to 'src/core/SkBitmapDevice.cpp')
-rw-r--r--src/core/SkBitmapDevice.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/core/SkBitmapDevice.cpp b/src/core/SkBitmapDevice.cpp
index de0cc7d381..3be63ba66b 100644
--- a/src/core/SkBitmapDevice.cpp
+++ b/src/core/SkBitmapDevice.cpp
@@ -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;