diff options
author | joshualitt <joshualitt@chromium.org> | 2014-09-23 09:50:21 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-23 09:50:21 -0700 |
commit | b0a8a377f832c59cee939ad721e1f87d378b7142 (patch) | |
tree | 7edeac33c817af28d73f3fbe1b31776ac34e8773 /src/gpu/effects/GrTextureDomain.h | |
parent | e51ac563de24ed4b25fde97c225580a30a55e9ca (diff) |
Patch to create a distinct geometry processor. The vast majority of this patch
is just a rename. The meat is in GrGeometryProcessor, GrProcessor,
GrGL*Processor, GrProcessorStage, Gr*BackendProcessorFactory,
GrProcessUnitTestFactory, and the builders
BUG=skia:
R=bsalomon@google.com
Author: joshualitt@chromium.org
Review URL: https://codereview.chromium.org/582963002
Diffstat (limited to 'src/gpu/effects/GrTextureDomain.h')
-rw-r--r-- | src/gpu/effects/GrTextureDomain.h | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/src/gpu/effects/GrTextureDomain.h b/src/gpu/effects/GrTextureDomain.h index 6cb5ad408e..5751bad0f7 100644 --- a/src/gpu/effects/GrTextureDomain.h +++ b/src/gpu/effects/GrTextureDomain.h @@ -9,7 +9,7 @@ #define GrTextureDomainEffect_DEFINED #include "GrSingleTextureEffect.h" -#include "gl/GrGLEffect.h" +#include "gl/GrGLProcessor.h" class GrGLProgramBuilder; class GrGLShaderBuilder; @@ -73,7 +73,7 @@ public: } /** - * A GrGLEffect subclass that corresponds to a GrEffect subclass that uses GrTextureDomain + * A GrGLProcessor subclass that corresponds to a GrProcessor subclass that uses GrTextureDomain * should include this helper. It generates the texture domain GLSL, produces the part of the * effect key that reflects the texture domain code, and performs the uniform uploads necessary * for texture domains. @@ -86,7 +86,8 @@ public: } /** - * Call this from GrGLEffect::emitCode() to sample the texture W.R.T. the domain and mode. + * Call this from GrGLProcessor::emitCode() to sample the texture W.R.T. the domain and + * mode. * * @param outcolor name of vec4 variable to hold the sampled color. * @param inCoords name of vec2 variable containing the coords to be used with the domain. @@ -98,12 +99,12 @@ public: const GrTextureDomain& textureDomain, const char* outColor, const SkString& inCoords, - const GrGLEffect::TextureSampler sampler, + const GrGLProcessor::TextureSampler sampler, const char* inModulateColor = NULL); /** - * Call this from GrGLEffect::setData() to upload uniforms necessary for the texture domain. - * The rectangle is automatically adjusted to account for the texture's origin. + * Call this from GrGLProcessor::setData() to upload uniforms necessary for the texture + * domain. The rectangle is automatically adjusted to account for the texture's origin. */ void setData(const GrGLProgramDataManager& pdman, const GrTextureDomain& textureDomain, GrSurfaceOrigin textureOrigin); @@ -113,8 +114,8 @@ public: }; /** - * GrGLEffect::GenKey() must call this and include the returned value in it's computed key. - * The returned will be limited to the lower kDomainKeyBits bits. + * GrGLProcessor::GenKey() must call this and include the returned value in it's computed + * key. The returned will be limited to the lower kDomainKeyBits bits. */ static uint32_t DomainKey(const GrTextureDomain& domain) { GR_STATIC_ASSERT(kModeCount <= 4); @@ -144,20 +145,20 @@ class GrGLTextureDomainEffect; class GrTextureDomainEffect : public GrSingleTextureEffect { public: - static GrEffect* Create(GrTexture*, - const SkMatrix&, - const SkRect& domain, - GrTextureDomain::Mode, - GrTextureParams::FilterMode filterMode, - GrCoordSet = kLocal_GrCoordSet); + static GrFragmentProcessor* Create(GrTexture*, + const SkMatrix&, + const SkRect& domain, + GrTextureDomain::Mode, + GrTextureParams::FilterMode filterMode, + GrCoordSet = kLocal_GrCoordSet); virtual ~GrTextureDomainEffect(); static const char* Name() { return "TextureDomain"; } - typedef GrGLTextureDomainEffect GLEffect; + typedef GrGLTextureDomainEffect GLProcessor; - virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE; + virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERRIDE; virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE; const GrTextureDomain& textureDomain() const { return fTextureDomain; } @@ -173,9 +174,9 @@ private: GrTextureParams::FilterMode, GrCoordSet); - virtual bool onIsEqual(const GrEffect&) const SK_OVERRIDE; + virtual bool onIsEqual(const GrProcessor&) const SK_OVERRIDE; - GR_DECLARE_EFFECT_TEST; + GR_DECLARE_FRAGMENT_PROCESSOR_TEST; typedef GrSingleTextureEffect INHERITED; }; |