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

Unified Diff: src/core/SkCanvas.cpp

Issue 1826893002: Switch new SkImageFilter internal methods over to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Change method name to drawSpriteWithFilter Created 4 years, 9 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 | « include/effects/SkPaintImageFilter.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index f1c16266027c813be555904b64e9bf840b07798c..6a11db5ee5a2147972004926763af752cf249c7c 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1412,8 +1412,7 @@ void SkCanvas::internalDrawDevice(SkBaseDevice* srcDev, int x, int y,
continue; // something disastrous happened
}
- SkAutoTUnref<SkSpecialImage> resultImg(filter->filterImage(srcImg.get(), ctx,
- &offset));
+ sk_sp<SkSpecialImage> resultImg(filter->filterImage(srcImg.get(), ctx, &offset));
if (resultImg) {
SkPaint tmpUnfiltered(*paint);
tmpUnfiltered.setImageFilter(nullptr);
@@ -2265,9 +2264,9 @@ void SkCanvas::onDrawImage(const SkImage* image, SkScalar x, SkScalar y, const S
if (as_IB(image)->asBitmapForImageFilters(&bitmap)) {
SkPoint pt;
iter.fMatrix->mapXY(x, y, &pt);
- iter.fDevice->drawBitmapAsSpriteWithImageFilter(iter, bitmap,
- SkScalarRoundToInt(pt.fX),
- SkScalarRoundToInt(pt.fY), pnt);
+ iter.fDevice->drawSpriteWithFilter(iter, bitmap,
+ SkScalarRoundToInt(pt.fX),
+ SkScalarRoundToInt(pt.fY), pnt);
}
} else {
iter.fDevice->drawImage(iter, image, x, y, pnt);
@@ -2347,9 +2346,9 @@ void SkCanvas::onDrawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, cons
if (drawAsSprite && pnt.getImageFilter()) {
SkPoint pt;
iter.fMatrix->mapXY(x, y, &pt);
- iter.fDevice->drawBitmapAsSpriteWithImageFilter(iter, bitmap,
- SkScalarRoundToInt(pt.fX),
- SkScalarRoundToInt(pt.fY), pnt);
+ iter.fDevice->drawSpriteWithFilter(iter, bitmap,
+ SkScalarRoundToInt(pt.fX),
+ SkScalarRoundToInt(pt.fY), pnt);
} else {
iter.fDevice->drawBitmap(iter, bitmap, matrix, looper.paint());
}
« no previous file with comments | « include/effects/SkPaintImageFilter.h ('k') | src/core/SkDevice.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698