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

Unified Diff: src/core/SkLightingShader.cpp

Issue 2041113004: sk_sp for gpu. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Reserve correctly. Created 4 years, 6 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/SkImageFilter.cpp ('k') | src/core/SkLocalMatrixShader.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkLightingShader.cpp
diff --git a/src/core/SkLightingShader.cpp b/src/core/SkLightingShader.cpp
index 542d0f3e673a43b03e3c6569875f5164d4b02cbe..a2ce52fe28764b2750546faf09ae96194cbc2a85 100644
--- a/src/core/SkLightingShader.cpp
+++ b/src/core/SkLightingShader.cpp
@@ -72,7 +72,7 @@ public:
bool isOpaque() const override;
#if SK_SUPPORT_GPU
- const GrFragmentProcessor* asFragmentProcessor(GrContext*,
+ sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext*,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
SkFilterQuality,
@@ -350,7 +350,7 @@ static bool make_mat(const SkBitmap& bm,
return true;
}
-const GrFragmentProcessor* SkLightingShaderImpl::asFragmentProcessor(
+sk_sp<GrFragmentProcessor> SkLightingShaderImpl::asFragmentProcessor(
GrContext* context,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
@@ -404,10 +404,10 @@ const GrFragmentProcessor* SkLightingShaderImpl::asFragmentProcessor(
return nullptr;
}
- SkAutoTUnref<const GrFragmentProcessor> inner (
+ sk_sp<GrFragmentProcessor> inner (
new LightingFP(diffuseTexture, normalTexture, diffM, normM, diffParams, normParams, fLights,
fInvNormRotation));
- return GrFragmentProcessor::MulOutputByInputAlpha(inner);
+ return GrFragmentProcessor::MulOutputByInputAlpha(std::move(inner));
}
#endif
« no previous file with comments | « src/core/SkImageFilter.cpp ('k') | src/core/SkLocalMatrixShader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698