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:
parent
d58f040532
commit
65c74f1368
@ -316,9 +316,8 @@ void SkBitmapDevice::drawBitmapRect(const SkBitmap& bitmap,
|
|||||||
matrix.preTranslate(dx, dy);
|
matrix.preTranslate(dx, dy);
|
||||||
}
|
}
|
||||||
|
|
||||||
SkRect extractedBitmapBounds = SkRect::MakeXYWH(dx, dy,
|
SkRect extractedBitmapBounds;
|
||||||
SkIntToScalar(bitmapPtr->width()),
|
extractedBitmapBounds.isetWH(bitmapPtr->width(), bitmapPtr->height());
|
||||||
SkIntToScalar(bitmapPtr->height()));
|
|
||||||
if (extractedBitmapBounds == tmpSrc) {
|
if (extractedBitmapBounds == tmpSrc) {
|
||||||
// no fractional part in src, we can just call drawBitmap
|
// no fractional part in src, we can just call drawBitmap
|
||||||
goto USE_DRAWBITMAP;
|
goto USE_DRAWBITMAP;
|
||||||
|
Loading…
Reference in New Issue
Block a user