Update GrFragmentProcessor handling in Make methods in SkSL

Change-Id: I89ec73049126f3b5ff695a31a94e4816d4639fcd
Reviewed-on: https://skia-review.googlesource.com/68901
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Robert Phillips 2017-11-08 15:31:30 -05:00 committed by Skia Commit-Bot
parent 58898eab5d
commit 7a59f23bc1
2 changed files with 2 additions and 2 deletions

View File

@ -25,7 +25,7 @@ public:
bool enforcePMColor,
std::unique_ptr<GrFragmentProcessor> child) {
return std::unique_ptr<GrFragmentProcessor>(
new GrArithmeticFP(k1, k2, k3, k4, enforcePMColor, child->clone()));
new GrArithmeticFP(k1, k2, k3, k4, enforcePMColor, std::move(child)));
}
GrArithmeticFP(const GrArithmeticFP& src);
std::unique_ptr<GrFragmentProcessor> clone() const override;

View File

@ -150,7 +150,7 @@ void HCodeGenerator::writeMake() {
separator = "";
for (const auto& param : fSectionAndParameterHelper.getParameters()) {
if (param->fType == *fContext.fFragmentProcessor_Type) {
this->writef("%s%s->clone()", separator, String(param->fName).c_str());
this->writef("%sstd::move(%s)", separator, String(param->fName).c_str());
} else {
this->writef("%s%s", separator, String(param->fName).c_str());
}