Index: src/gpu/effects/GrSimpleTextureEffect.h |
diff --git a/src/gpu/effects/GrSimpleTextureEffect.h b/src/gpu/effects/GrSimpleTextureEffect.h |
index fced7361835a7bb9b750f1c2095910099f1ca8a4..af469ed8bcd04ab71e35724fe0c3cb1f75aeba6f 100644 |
--- a/src/gpu/effects/GrSimpleTextureEffect.h |
+++ b/src/gpu/effects/GrSimpleTextureEffect.h |
@@ -45,6 +45,32 @@ public: |
matrix, p)); |
} |
+ /* unfiltered, clamp mode */ |
+ static sk_sp<GrFragmentProcessor> Make(GrTextureProxy* tex, |
+ sk_sp<GrColorSpaceXform> colorSpaceXform, |
+ const SkMatrix& matrix) { |
+ return sk_sp<GrFragmentProcessor>( |
+ new GrSimpleTextureEffect(tex, std::move(colorSpaceXform), matrix, |
+ GrTextureParams::kNone_FilterMode)); |
+ } |
+ |
+ /* clamp mode */ |
+ static sk_sp<GrFragmentProcessor> Make(GrTextureProxy* tex, |
+ sk_sp<GrColorSpaceXform> colorSpaceXform, |
+ const SkMatrix& matrix, |
+ GrTextureParams::FilterMode filterMode) { |
+ return sk_sp<GrFragmentProcessor>( |
+ new GrSimpleTextureEffect(tex, std::move(colorSpaceXform), matrix, filterMode)); |
+ } |
+ |
+ static sk_sp<GrFragmentProcessor> Make(GrTextureProxy* tex, |
+ sk_sp<GrColorSpaceXform> colorSpaceXform, |
+ const SkMatrix& matrix, |
+ const GrTextureParams& p) { |
+ return sk_sp<GrFragmentProcessor>(new GrSimpleTextureEffect(tex, std::move(colorSpaceXform), |
+ matrix, p)); |
+ } |
+ |
virtual ~GrSimpleTextureEffect() {} |
const char* name() const override { return "SimpleTexture"; } |
@@ -66,6 +92,22 @@ private: |
this->initClassID<GrSimpleTextureEffect>(); |
} |
+ GrSimpleTextureEffect(GrTextureProxy* texture, |
+ sk_sp<GrColorSpaceXform> colorSpaceXform, |
+ const SkMatrix& matrix, |
+ GrTextureParams::FilterMode filterMode) |
+ : GrSingleTextureEffect(texture, std::move(colorSpaceXform), matrix, filterMode) { |
+ this->initClassID<GrSimpleTextureEffect>(); |
+ } |
+ |
+ GrSimpleTextureEffect(GrTextureProxy* texture, |
+ sk_sp<GrColorSpaceXform> colorSpaceXform, |
+ const SkMatrix& matrix, |
+ const GrTextureParams& params) |
+ : GrSingleTextureEffect(texture, std::move(colorSpaceXform), matrix, params) { |
+ this->initClassID<GrSimpleTextureEffect>(); |
+ } |
+ |
GrGLSLFragmentProcessor* onCreateGLSLInstance() const override; |
void onGetGLSLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const override; |