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

Unified Diff: src/effects/SkArithmeticMode_gpu.h

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/effects/SkArithmeticMode.cpp ('k') | src/effects/SkArithmeticMode_gpu.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkArithmeticMode_gpu.h
diff --git a/src/effects/SkArithmeticMode_gpu.h b/src/effects/SkArithmeticMode_gpu.h
index b8a40cf827216de27fcf8755b31e97d3fa60b4e3..98cbaf90a5d3f142122fb0aae26efe40f5a6cec5 100644
--- a/src/effects/SkArithmeticMode_gpu.h
+++ b/src/effects/SkArithmeticMode_gpu.h
@@ -31,9 +31,10 @@ class GrGLArtithmeticFP;
class GrArithmeticFP : public GrFragmentProcessor {
public:
- static const GrFragmentProcessor* Create(float k1, float k2, float k3, float k4,
- bool enforcePMColor, const GrFragmentProcessor* dst) {
- return new GrArithmeticFP(k1, k2, k3, k4, enforcePMColor, dst);
+ static sk_sp<GrFragmentProcessor> Make(float k1, float k2, float k3, float k4,
+ bool enforcePMColor, sk_sp<GrFragmentProcessor> dst) {
+ return sk_sp<GrFragmentProcessor>(new GrArithmeticFP(k1, k2, k3, k4, enforcePMColor,
+ std::move(dst)));
}
~GrArithmeticFP() override {};
@@ -62,7 +63,7 @@ private:
void onComputeInvariantOutput(GrInvariantOutput* inout) const override;
GrArithmeticFP(float k1, float k2, float k3, float k4, bool enforcePMColor,
- const GrFragmentProcessor* dst);
+ sk_sp<GrFragmentProcessor> dst);
float fK1, fK2, fK3, fK4;
bool fEnforcePMColor;
@@ -77,8 +78,8 @@ private:
class GrArithmeticXPFactory : public GrXPFactory {
public:
- static GrXPFactory* Create(float k1, float k2, float k3, float k4, bool enforcePMColor) {
- return new GrArithmeticXPFactory(k1, k2, k3, k4, enforcePMColor);
+ static sk_sp<GrXPFactory> Make(float k1, float k2, float k3, float k4, bool enforcePMColor) {
+ return sk_sp<GrXPFactory>(new GrArithmeticXPFactory(k1, k2, k3, k4, enforcePMColor));
}
void getInvariantBlendedColor(const GrProcOptInfo& colorPOI,
« no previous file with comments | « src/effects/SkArithmeticMode.cpp ('k') | src/effects/SkArithmeticMode_gpu.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698