projects
/
platform
/
upstream
/
libSkiaSharp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec53c63
)
Fix the size check for the drawBitmap fast-path in SkBitmapDevice::drawBitmapRect...
author
lsalzman
<lsalzman@mozilla.com>
Fri, 31 Mar 2017 20:46:47 +0000
(13:46 -0700)
committer
Commit bot
<commit-bot@chromium.org>
Fri, 31 Mar 2017 20:46:47 +0000
(13:46 -0700)
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=
2089583002
Review-Url: https://codereview.chromium.org/
2089583002
src/core/SkBitmapDevice.cpp
patch
|
blob
|
history
diff --git
a/src/core/SkBitmapDevice.cpp
b/src/core/SkBitmapDevice.cpp
index
3be63ba
..
de0cc7d
100644
(file)
--- a/
src/core/SkBitmapDevice.cpp
+++ b/
src/core/SkBitmapDevice.cpp
@@
-316,8
+316,9
@@
void SkBitmapDevice::drawBitmapRect(const SkBitmap& bitmap,
matrix.preTranslate(dx, dy);
}
- SkRect extractedBitmapBounds;
- extractedBitmapBounds.isetWH(bitmapPtr->width(), bitmapPtr->height());
+ SkRect extractedBitmapBounds = SkRect::MakeXYWH(dx, dy,
+ SkIntToScalar(bitmapPtr->width()),
+ SkIntToScalar(bitmapPtr->height()));
if (extractedBitmapBounds == tmpSrc) {
// no fractional part in src, we can just call drawBitmap
goto USE_DRAWBITMAP;