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

Unified Diff: src/core/SkDevice.cpp

Issue 1785473002: SkImage now has makeShader to return sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: use build guard for impl of newShader 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 | « samplecode/SampleFilterQuality.cpp ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkDevice.cpp
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp
index fa4a4b8fd1ec9634742b2da9964646058f27b69f..aff15515d4ad624349790c4b5c1d29a9b9e9516f 100644
--- a/src/core/SkDevice.cpp
+++ b/src/core/SkDevice.cpp
@@ -198,13 +198,13 @@ void SkBaseDevice::drawAtlas(const SkDraw& draw, const SkImage* atlas, const SkR
localM.preTranslate(-tex[i].left(), -tex[i].top());
SkPaint pnt(paint);
- SkAutoTUnref<SkShader> shader(atlas->newShader(SkShader::kClamp_TileMode,
- SkShader::kClamp_TileMode,
- &localM));
+ sk_sp<SkShader> shader = atlas->makeShader(SkShader::kClamp_TileMode,
+ SkShader::kClamp_TileMode,
+ &localM);
if (!shader) {
break;
}
- pnt.setShader(shader);
+ pnt.setShader(std::move(shader));
if (colors) {
SkAutoTUnref<SkColorFilter> cf(SkColorFilter::CreateModeFilter(colors[i], mode));
« no previous file with comments | « samplecode/SampleFilterQuality.cpp ('k') | src/core/SkPictureShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698