Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1105)

Unified Diff: src/effects/SkBitmapSource.cpp

Issue 1228083004: add src-rect-constraint to drawImageRect (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkRecords.h ('k') | src/gpu/GrRecordReplaceDraw.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBitmapSource.cpp
diff --git a/src/effects/SkBitmapSource.cpp b/src/effects/SkBitmapSource.cpp
index ed9521fd2c215bce1e3d80aa4c3f21b7f4b737b6..859e8aff62ac67ad4d1d3a78e817125aca4e50d0 100644
--- a/src/effects/SkBitmapSource.cpp
+++ b/src/effects/SkBitmapSource.cpp
@@ -79,12 +79,12 @@ bool SkBitmapSource::onFilterImage(Proxy* proxy, const SkBitmap&, const Context&
// Subtract off the integer component of the translation (will be applied in loc, below).
dstRect.offset(-SkIntToScalar(dstIRect.fLeft), -SkIntToScalar(dstIRect.fTop));
paint.setXfermodeMode(SkXfermode::kSrc_Mode);
- // FIXME: this probably shouldn't be necessary, but drawBitmapRectToRect asserts
+ // FIXME: this probably shouldn't be necessary, but drawBitmapRect asserts
// None filtering when it's translate-only
paint.setFilterQuality(
fSrcRect.width() == dstRect.width() && fSrcRect.height() == dstRect.height() ?
kNone_SkFilterQuality : fFilterQuality);
- canvas.drawBitmapRectToRect(fBitmap, &fSrcRect, dstRect, &paint);
+ canvas.drawBitmapRect(fBitmap, &fSrcRect, dstRect, &paint, SkCanvas::kStrict_SrcRectConstraint);
*result = device.get()->accessBitmap(false);
offset->fX = dstIRect.fLeft;
« no previous file with comments | « src/core/SkRecords.h ('k') | src/gpu/GrRecordReplaceDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698