diff options
author | Brian Salomon <bsalomon@google.com> | 2017-08-11 09:40:37 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-08-11 14:13:26 +0000 |
commit | aff329b8e9b239bca1d93b13a914fbef45ccf7fe (patch) | |
tree | 06ba42a557c6695f145bcf4956c981fc87af55ff /src/sksl/SkSLHCodeGenerator.cpp | |
parent | e2cbd0451832ec71d1b498e0f64d02b7d096b2b7 (diff) |
Make GrFragmentProcessor be non-refcounted and use std::unique_ptr.
Change-Id: I985e54a071338e99292a5aa2f42c92bc115b4008
Reviewed-on: https://skia-review.googlesource.com/32760
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Diffstat (limited to 'src/sksl/SkSLHCodeGenerator.cpp')
-rw-r--r-- | src/sksl/SkSLHCodeGenerator.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sksl/SkSLHCodeGenerator.cpp b/src/sksl/SkSLHCodeGenerator.cpp index 22f4fd80ce..50d242896a 100644 --- a/src/sksl/SkSLHCodeGenerator.cpp +++ b/src/sksl/SkSLHCodeGenerator.cpp @@ -123,7 +123,7 @@ void HCodeGenerator::writeExtraConstructorParams(const char* separator) { void HCodeGenerator::writeMake() { const char* separator; if (!this->writeSection(MAKE_SECTION)) { - this->writef(" static sk_sp<GrFragmentProcessor> Make("); + this->writef(" static std::unique_ptr<GrFragmentProcessor> Make("); separator = ""; for (const auto& param : fSectionAndParameterHelper.getParameters()) { this->writef("%s%s %s", separator, ParameterType(param->fType).c_str(), @@ -132,7 +132,7 @@ void HCodeGenerator::writeMake() { } this->writeSection(CONSTRUCTOR_PARAMS_SECTION, separator); this->writef(") {\n" - " return sk_sp<GrFragmentProcessor>(new %s(", + " return std::unique_ptr<GrFragmentProcessor>(new %s(", fFullName.c_str()); separator = ""; for (const auto& param : fSectionAndParameterHelper.getParameters()) { @@ -251,7 +251,7 @@ bool HCodeGenerator::generateCode() { } this->writeMake(); this->writef(" %s(const %s& src);\n" - " sk_sp<GrFragmentProcessor> clone() const override;\n" + " std::unique_ptr<GrFragmentProcessor> clone() const override;\n" " const char* name() const override { return \"%s\"; }\n" "private:\n", fFullName.c_str(), fFullName.c_str(), fName.c_str()); |