| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #ifndef GrDistanceFieldTextureEffect_DEFINED | 8 #ifndef GrDistanceFieldTextureEffect_DEFINED |
| 9 #define GrDistanceFieldTextureEffect_DEFINED | 9 #define GrDistanceFieldTextureEffect_DEFINED |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 */ | 21 */ |
| 22 class GrDistanceFieldTextureEffect : public GrVertexEffect { | 22 class GrDistanceFieldTextureEffect : public GrVertexEffect { |
| 23 public: | 23 public: |
| 24 static GrEffectRef* Create(GrTexture* tex, const GrTextureParams& p) { | 24 static GrEffectRef* Create(GrTexture* tex, const GrTextureParams& p) { |
| 25 AutoEffectUnref effect(SkNEW_ARGS(GrDistanceFieldTextureEffect, (tex, p)
)); | 25 AutoEffectUnref effect(SkNEW_ARGS(GrDistanceFieldTextureEffect, (tex, p)
)); |
| 26 return CreateEffectRef(effect); | 26 return CreateEffectRef(effect); |
| 27 } | 27 } |
| 28 | 28 |
| 29 virtual ~GrDistanceFieldTextureEffect() {} | 29 virtual ~GrDistanceFieldTextureEffect() {} |
| 30 | 30 |
| 31 static const char* Name() { return "Texture"; } | 31 static const char* Name() { return "DistanceFieldTexture"; } |
| 32 | 32 |
| 33 virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags
) const SK_OVERRIDE; | 33 virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags
) const SK_OVERRIDE; |
| 34 | 34 |
| 35 typedef GrGLDistanceFieldTextureEffect GLEffect; | 35 typedef GrGLDistanceFieldTextureEffect GLEffect; |
| 36 | 36 |
| 37 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE; | 37 virtual const GrBackendEffectFactory& getFactory() const SK_OVERRIDE; |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 GrDistanceFieldTextureEffect(GrTexture* texture, const GrTextureParams& para
ms); | 40 GrDistanceFieldTextureEffect(GrTexture* texture, const GrTextureParams& para
ms); |
| 41 | 41 |
| 42 virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE; | 42 virtual bool onIsEqual(const GrEffect& other) const SK_OVERRIDE; |
| 43 | 43 |
| 44 GrTextureAccess fTextureAccess; | 44 GrTextureAccess fTextureAccess; |
| 45 | 45 |
| 46 GR_DECLARE_EFFECT_TEST; | 46 GR_DECLARE_EFFECT_TEST; |
| 47 | 47 |
| 48 typedef GrVertexEffect INHERITED; | 48 typedef GrVertexEffect INHERITED; |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 #endif | 51 #endif |
| OLD | NEW |