sk_sp for Ganesh.
Convert use of GrFragmentProcessor, GrGeometryProcessor, and
GrXPFactory to sk_sp. This clarifies ownership and should
reduce reference count churn by moving ownership.
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2041113004
Review-Url: https://codereview.chromium.org/2041113004
diff --git a/src/core/SkColorShader.cpp b/src/core/SkColorShader.cpp
index 2c7ee8b..83fd239 100644
--- a/src/core/SkColorShader.cpp
+++ b/src/core/SkColorShader.cpp
@@ -89,12 +89,12 @@
#include "SkGr.h"
#include "effects/GrConstColorProcessor.h"
-const GrFragmentProcessor* SkColorShader::asFragmentProcessor(GrContext*, const SkMatrix&,
+sk_sp<GrFragmentProcessor> SkColorShader::asFragmentProcessor(GrContext*, const SkMatrix&,
const SkMatrix*,
SkFilterQuality,
SkSourceGammaTreatment) const {
GrColor color = SkColorToPremulGrColor(fColor);
- return GrConstColorProcessor::Create(color, GrConstColorProcessor::kModulateA_InputMode);
+ return GrConstColorProcessor::Make(color, GrConstColorProcessor::kModulateA_InputMode);
}
#endif
@@ -217,13 +217,13 @@
#include "SkGr.h"
#include "effects/GrConstColorProcessor.h"
-const GrFragmentProcessor* SkColor4Shader::asFragmentProcessor(GrContext*, const SkMatrix&,
+sk_sp<GrFragmentProcessor> SkColor4Shader::asFragmentProcessor(GrContext*, const SkMatrix&,
const SkMatrix*,
SkFilterQuality,
SkSourceGammaTreatment) const {
// TODO: how to communicate color4f to Gr
GrColor color = SkColorToPremulGrColor(fCachedByteColor);
- return GrConstColorProcessor::Create(color, GrConstColorProcessor::kModulateA_InputMode);
+ return GrConstColorProcessor::Make(color, GrConstColorProcessor::kModulateA_InputMode);
}
#endif