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

Unified Diff: gm/lightingshader.cpp

Issue 1829303002: move setshader to sk_sp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: addressing comments from #8 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 | « gm/imagefiltersscaled.cpp ('k') | gm/perlinnoise.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/lightingshader.cpp
diff --git a/gm/lightingshader.cpp b/gm/lightingshader.cpp
index 9c45c9b78309e240e37c730443e645cdf3fcd84b..6d25671ac299e1e522e1a50d72b449415a67b088 100644
--- a/gm/lightingshader.cpp
+++ b/gm/lightingshader.cpp
@@ -98,14 +98,9 @@ protected:
// TODO: correctly pull out the pure rotation
SkVector invNormRotation = { ctm[SkMatrix::kMScaleX], ctm[SkMatrix::kMSkewY] };
- SkAutoTUnref<SkShader> fShader(SkLightingShader::Create(
- fDiffuse,
- fNormalMaps[mapType],
- fLights,
- invNormRotation, &matrix, &matrix));
-
SkPaint paint;
- paint.setShader(fShader);
+ paint.setShader(SkLightingShader::Make(fDiffuse, fNormalMaps[mapType], fLights,
+ invNormRotation, &matrix, &matrix));
canvas->drawRect(r, paint);
}
« no previous file with comments | « gm/imagefiltersscaled.cpp ('k') | gm/perlinnoise.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698