| Index: src/gpu/effects/GrDistanceFieldTextureEffect.h
|
| diff --git a/src/gpu/effects/GrDistanceFieldTextureEffect.h b/src/gpu/effects/GrDistanceFieldTextureEffect.h
|
| index 692290ccdb334f0443fb34da7c2c5c287f17f1d5..937908f9bc0a55fa75bcfc539596f2325b5b00c8 100644
|
| --- a/src/gpu/effects/GrDistanceFieldTextureEffect.h
|
| +++ b/src/gpu/effects/GrDistanceFieldTextureEffect.h
|
| @@ -18,23 +18,12 @@
|
| * The output color of this effect is a modulation of the input color and a sample from a
|
| * distance field texture (using a smoothed step function near 0.5).
|
| * It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input
|
| - * coords are a custom attribute. Gamma correction is handled via a texture LUT.
|
| + * coords are a custom attribute.
|
| */
|
| class GrDistanceFieldTextureEffect : public GrVertexEffect {
|
| public:
|
| -#ifdef SK_GAMMA_APPLY_TO_A8
|
| - static GrEffectRef* Create(GrTexture* tex, const GrTextureParams& params,
|
| - GrTexture* gamma, const GrTextureParams& gammaParams, float lum,
|
| - bool similarity) {
|
| - AutoEffectUnref effect(SkNEW_ARGS(GrDistanceFieldTextureEffect, (tex, params,
|
| - gamma, gammaParams, lum,
|
| - similarity)));
|
| -#else
|
| - static GrEffectRef* Create(GrTexture* tex, const GrTextureParams& params,
|
| - bool similarity) {
|
| - AutoEffectUnref effect(SkNEW_ARGS(GrDistanceFieldTextureEffect, (tex, params,
|
| - similarity)));
|
| -#endif
|
| + static GrEffectRef* Create(GrTexture* tex, const GrTextureParams& params, bool similarity) {
|
| + AutoEffectUnref effect(SkNEW_ARGS(GrDistanceFieldTextureEffect, (tex, params, similarity)));
|
| return CreateEffectRef(effect);
|
| }
|
|
|
| @@ -43,9 +32,6 @@
|
| static const char* Name() { return "DistanceFieldTexture"; }
|
|
|
| virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
|
| -#ifdef SK_GAMMA_APPLY_TO_A8
|
| - float getLuminance() const { return fLuminance; }
|
| -#endif
|
| bool isSimilarity() const { return fIsSimilarity; }
|
|
|
| typedef GrGLDistanceFieldTextureEffect GLEffect;
|
| @@ -54,18 +40,11 @@
|
|
|
| private:
|
| GrDistanceFieldTextureEffect(GrTexture* texture, const GrTextureParams& params,
|
| -#ifdef SK_GAMMA_APPLY_TO_A8
|
| - GrTexture* gamma, const GrTextureParams& gammaParams, float lum,
|
| -#endif
|
| bool uniformScale);
|
|
|
| virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE;
|
|
|
| GrTextureAccess fTextureAccess;
|
| -#ifdef SK_GAMMA_APPLY_TO_A8
|
| - GrTextureAccess fGammaTextureAccess;
|
| - float fLuminance;
|
| -#endif
|
| bool fIsSimilarity;
|
|
|
| GR_DECLARE_EFFECT_TEST;
|
| @@ -77,17 +56,14 @@
|
| * The output color of this effect is a modulation of the input color and samples from a
|
| * distance field texture (using a smoothed step function near 0.5), adjusted for LCD displays.
|
| * It allows explicit specification of the filtering and wrap modes (GrTextureParams). The input
|
| - * coords are a custom attribute. Gamma correction is handled via a texture LUT.
|
| + * coords are a custom attribute.
|
| */
|
| class GrDistanceFieldLCDTextureEffect : public GrVertexEffect {
|
| public:
|
| static GrEffectRef* Create(GrTexture* tex, const GrTextureParams& params,
|
| - GrTexture* gamma, const GrTextureParams& gammaParams,
|
| - SkColor textColor,
|
| bool uniformScale, bool useBGR) {
|
| AutoEffectUnref effect(SkNEW_ARGS(GrDistanceFieldLCDTextureEffect,
|
| - (tex, params, gamma, gammaParams, textColor, uniformScale,
|
| - useBGR)));
|
| + (tex, params, uniformScale, useBGR)));
|
| return CreateEffectRef(effect);
|
| }
|
|
|
| @@ -96,7 +72,6 @@
|
| static const char* Name() { return "DistanceFieldLCDTexture"; }
|
|
|
| virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags) const SK_OVERRIDE;
|
| - GrColor getTextColor() const { return fTextColor; }
|
| bool isUniformScale() const { return fUniformScale; }
|
| bool useBGR() const { return fUseBGR; }
|
|
|
| @@ -106,15 +81,11 @@
|
|
|
| private:
|
| GrDistanceFieldLCDTextureEffect(GrTexture* texture, const GrTextureParams& params,
|
| - GrTexture* gamma, const GrTextureParams& gammaParams,
|
| - SkColor textColor,
|
| bool uniformScale, bool useBGR);
|
|
|
| virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE;
|
|
|
| GrTextureAccess fTextureAccess;
|
| - GrTextureAccess fGammaTextureAccess;
|
| - GrColor fTextColor;
|
| bool fUniformScale;
|
| bool fUseBGR;
|
|
|
| @@ -123,4 +94,5 @@
|
| typedef GrVertexEffect INHERITED;
|
| };
|
|
|
| +
|
| #endif
|
|
|