Make GrGLSLFragmentProcessors be created as std::unique_ptr.
Rename factory function from createGLSLInstance() to makeProgramImpl()
Bug: b/180759848
Bug: skia:11358
Change-Id: I095bdf1f26db5a8192fa8ab59000db4a1d561d96
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/373738
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/samplecode/SampleCCPRGeometry.cpp b/samplecode/SampleCCPRGeometry.cpp
index 59c6581..c5cc09d 100644
--- a/samplecode/SampleCCPRGeometry.cpp
+++ b/samplecode/SampleCCPRGeometry.cpp
@@ -148,7 +148,9 @@
}
};
- GrGLSLFragmentProcessor* onCreateGLSLInstance() const override { return new Impl; }
+ std::unique_ptr<GrGLSLFragmentProcessor> onMakeProgramImpl() const override {
+ return std::make_unique<Impl>();
+ }
};
void CCPRGeometryView::onDrawContent(SkCanvas* canvas) {