Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(316)

Unified Diff: src/gpu/effects/GrSimpleTextureEffect.h

Issue 2215323003: Start using RenderTargetProxy (omnibus) (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/effects/GrMatrixConvolutionEffect.h ('k') | src/gpu/effects/GrSingleTextureEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/gpu/effects/GrMatrixConvolutionEffect.h ('k') | src/gpu/effects/GrSingleTextureEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698