| Index: src/gpu/effects/GrBezierEffect.cpp
|
| diff --git a/src/gpu/effects/GrBezierEffect.cpp b/src/gpu/effects/GrBezierEffect.cpp
|
| index d710c641a541c578f950de2267e08a2b3eda8e4f..7337d8a7fc8f69bf7479565b3120b7f2e15ff31a 100644
|
| --- a/src/gpu/effects/GrBezierEffect.cpp
|
| +++ b/src/gpu/effects/GrBezierEffect.cpp
|
| @@ -19,13 +19,13 @@ public:
|
|
|
| virtual void emitCode(GrGLFullShaderBuilder* builder,
|
| const GrDrawEffect& drawEffect,
|
| - EffectKey key,
|
| + const GrEffectKey& key,
|
| const char* outputColor,
|
| const char* inputColor,
|
| const TransformedCoordsArray&,
|
| const TextureSamplerArray&) SK_OVERRIDE;
|
|
|
| - static inline EffectKey GenKey(const GrDrawEffect&, const GrGLCaps&);
|
| + static inline void GenKey(const GrDrawEffect&, const GrGLCaps&, GrEffectKeyBuilder*);
|
|
|
| virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) SK_OVERRIDE {}
|
|
|
| @@ -44,7 +44,7 @@ GrGLConicEffect::GrGLConicEffect(const GrBackendEffectFactory& factory,
|
|
|
| void GrGLConicEffect::emitCode(GrGLFullShaderBuilder* builder,
|
| const GrDrawEffect& drawEffect,
|
| - EffectKey key,
|
| + const GrEffectKey& key,
|
| const char* outputColor,
|
| const char* inputColor,
|
| const TransformedCoordsArray&,
|
| @@ -117,9 +117,11 @@ void GrGLConicEffect::emitCode(GrGLFullShaderBuilder* builder,
|
| (GrGLSLExpr4(inputColor) * GrGLSLExpr1("edgeAlpha")).c_str());
|
| }
|
|
|
| -GrGLEffect::EffectKey GrGLConicEffect::GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&) {
|
| +void GrGLConicEffect::GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&,
|
| + GrEffectKeyBuilder* b) {
|
| const GrConicEffect& ce = drawEffect.castEffect<GrConicEffect>();
|
| - return ce.isAntiAliased() ? (ce.isFilled() ? 0x0 : 0x1) : 0x2;
|
| + uint32_t key = ce.isAntiAliased() ? (ce.isFilled() ? 0x0 : 0x1) : 0x2;
|
| + b->add32(key);
|
| }
|
|
|
| //////////////////////////////////////////////////////////////////////////////
|
| @@ -167,13 +169,13 @@ public:
|
|
|
| virtual void emitCode(GrGLFullShaderBuilder* builder,
|
| const GrDrawEffect& drawEffect,
|
| - EffectKey key,
|
| + const GrEffectKey& key,
|
| const char* outputColor,
|
| const char* inputColor,
|
| const TransformedCoordsArray&,
|
| const TextureSamplerArray&) SK_OVERRIDE;
|
|
|
| - static inline EffectKey GenKey(const GrDrawEffect&, const GrGLCaps&);
|
| + static inline void GenKey(const GrDrawEffect&, const GrGLCaps&, GrEffectKeyBuilder*);
|
|
|
| virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) SK_OVERRIDE {}
|
|
|
| @@ -192,7 +194,7 @@ GrGLQuadEffect::GrGLQuadEffect(const GrBackendEffectFactory& factory,
|
|
|
| void GrGLQuadEffect::emitCode(GrGLFullShaderBuilder* builder,
|
| const GrDrawEffect& drawEffect,
|
| - EffectKey key,
|
| + const GrEffectKey& key,
|
| const char* outputColor,
|
| const char* inputColor,
|
| const TransformedCoordsArray&,
|
| @@ -255,9 +257,11 @@ void GrGLQuadEffect::emitCode(GrGLFullShaderBuilder* builder,
|
| builder->vsCodeAppendf("\t%s = %s;\n", vsName, attrName->c_str());
|
| }
|
|
|
| -GrGLEffect::EffectKey GrGLQuadEffect::GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&) {
|
| +void GrGLQuadEffect::GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&,
|
| + GrEffectKeyBuilder* b) {
|
| const GrQuadEffect& ce = drawEffect.castEffect<GrQuadEffect>();
|
| - return ce.isAntiAliased() ? (ce.isFilled() ? 0x0 : 0x1) : 0x2;
|
| + uint32_t key = ce.isAntiAliased() ? (ce.isFilled() ? 0x0 : 0x1) : 0x2;
|
| + b->add32(key);
|
| }
|
|
|
| //////////////////////////////////////////////////////////////////////////////
|
| @@ -305,13 +309,13 @@ public:
|
|
|
| virtual void emitCode(GrGLFullShaderBuilder* builder,
|
| const GrDrawEffect& drawEffect,
|
| - EffectKey key,
|
| + const GrEffectKey& key,
|
| const char* outputColor,
|
| const char* inputColor,
|
| const TransformedCoordsArray&,
|
| const TextureSamplerArray&) SK_OVERRIDE;
|
|
|
| - static inline EffectKey GenKey(const GrDrawEffect&, const GrGLCaps&);
|
| + static inline void GenKey(const GrDrawEffect&, const GrGLCaps&, GrEffectKeyBuilder*);
|
|
|
| virtual void setData(const GrGLUniformManager&, const GrDrawEffect&) SK_OVERRIDE {}
|
|
|
| @@ -330,7 +334,7 @@ GrGLCubicEffect::GrGLCubicEffect(const GrBackendEffectFactory& factory,
|
|
|
| void GrGLCubicEffect::emitCode(GrGLFullShaderBuilder* builder,
|
| const GrDrawEffect& drawEffect,
|
| - EffectKey key,
|
| + const GrEffectKey& key,
|
| const char* outputColor,
|
| const char* inputColor,
|
| const TransformedCoordsArray&,
|
| @@ -403,9 +407,11 @@ void GrGLCubicEffect::emitCode(GrGLFullShaderBuilder* builder,
|
| (GrGLSLExpr4(inputColor) * GrGLSLExpr1("edgeAlpha")).c_str());
|
| }
|
|
|
| -GrGLEffect::EffectKey GrGLCubicEffect::GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&) {
|
| +void GrGLCubicEffect::GenKey(const GrDrawEffect& drawEffect, const GrGLCaps&,
|
| + GrEffectKeyBuilder* b) {
|
| const GrCubicEffect& ce = drawEffect.castEffect<GrCubicEffect>();
|
| - return ce.isAntiAliased() ? (ce.isFilled() ? 0x0 : 0x1) : 0x2;
|
| + uint32_t key = ce.isAntiAliased() ? (ce.isFilled() ? 0x0 : 0x1) : 0x2;
|
| + b->add32(key);
|
| }
|
|
|
| //////////////////////////////////////////////////////////////////////////////
|
|
|