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

Unified Diff: gm/dcshader.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 | « gm/convexpolyeffect.cpp ('k') | gm/rrects.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/dcshader.cpp
diff --git a/gm/dcshader.cpp b/gm/dcshader.cpp
index 568a35376cace59fdacfefce659eb7fdb47da448..2b179a0a1fc639680b4a2eea6d5115a848cb2fd3 100644
--- a/gm/dcshader.cpp
+++ b/gm/dcshader.cpp
@@ -35,7 +35,7 @@ public:
buf.writeMatrix(fDeviceMatrix);
}
- const GrFragmentProcessor* asFragmentProcessor(GrContext*,
+ sk_sp<GrFragmentProcessor> asFragmentProcessor(GrContext*,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
SkFilterQuality,
@@ -99,13 +99,13 @@ private:
GrCoordTransform fDeviceTransform;
};
-const GrFragmentProcessor* DCShader::asFragmentProcessor(GrContext*,
+sk_sp<GrFragmentProcessor> DCShader::asFragmentProcessor(GrContext*,
const SkMatrix& viewM,
const SkMatrix* localMatrix,
SkFilterQuality,
SkSourceGammaTreatment) const {
- SkAutoTUnref<const GrFragmentProcessor> inner(new DCFP(fDeviceMatrix));
- return GrFragmentProcessor::MulOutputByInputAlpha(inner);
+ sk_sp<GrFragmentProcessor> inner(new DCFP(fDeviceMatrix));
+ return GrFragmentProcessor::MulOutputByInputAlpha(std::move(inner));
}
class DCShaderGM : public GM {
« no previous file with comments | « gm/convexpolyeffect.cpp ('k') | gm/rrects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698