Fix the size check for the drawBitmap fast-path in SkBitmapDevice::drawBitmapRect...
authorlsalzman <lsalzman@mozilla.com>
Thu, 6 Apr 2017 04:42:54 +0000 (21:42 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 6 Apr 2017 04:42:54 +0000 (21:42 -0700)
commitc0e52f44aac391da632d88d9702aea4f41cfe17a
tree92dca93a073e768df1832fff4970db254dd2c45a
parent45dcc0c42c4059c3b533b3e91d6c7fe67f6eefc7
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
Review-Url: https://codereview.chromium.org/2089583002
src/core/SkBitmapDevice.cpp