| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 GrSingleTextureEffect_DEFINED | 8 #ifndef GrSingleTextureEffect_DEFINED |
| 9 #define GrSingleTextureEffect_DEFINED | 9 #define GrSingleTextureEffect_DEFINED |
| 10 | 10 |
| 11 #include "GrEffect.h" | 11 #include "GrProcessor.h" |
| 12 #include "SkMatrix.h" | 12 #include "SkMatrix.h" |
| 13 #include "GrCoordTransform.h" | 13 #include "GrCoordTransform.h" |
| 14 | 14 |
| 15 class GrTexture; | 15 class GrTexture; |
| 16 | 16 |
| 17 /** | 17 /** |
| 18 * A base class for effects that draw a single texture with a texture matrix. Th
is effect has no | 18 * A base class for effects that draw a single texture with a texture matrix. Th
is effect has no |
| 19 * backend implementations. One must be provided by the subclass. | 19 * backend implementations. One must be provided by the subclass. |
| 20 */ | 20 */ |
| 21 class GrSingleTextureEffect : public GrEffect { | 21 class GrSingleTextureEffect : public GrFragmentProcessor { |
| 22 public: | 22 public: |
| 23 virtual ~GrSingleTextureEffect(); | 23 virtual ~GrSingleTextureEffect(); |
| 24 | 24 |
| 25 protected: | 25 protected: |
| 26 /** unfiltered, clamp mode */ | 26 /** unfiltered, clamp mode */ |
| 27 GrSingleTextureEffect(GrTexture*, const SkMatrix&, GrCoordSet = kLocal_GrCoo
rdSet); | 27 GrSingleTextureEffect(GrTexture*, const SkMatrix&, GrCoordSet = kLocal_GrCoo
rdSet); |
| 28 /** clamp mode */ | 28 /** clamp mode */ |
| 29 GrSingleTextureEffect(GrTexture*, const SkMatrix&, GrTextureParams::FilterMo
de filterMode, | 29 GrSingleTextureEffect(GrTexture*, const SkMatrix&, GrTextureParams::FilterMo
de filterMode, |
| 30 GrCoordSet = kLocal_GrCoordSet); | 30 GrCoordSet = kLocal_GrCoordSet); |
| 31 GrSingleTextureEffect(GrTexture*, | 31 GrSingleTextureEffect(GrTexture*, |
| (...skipping 22 matching lines...) Expand all Loading... |
| 54 *validFlags = kA_GrColorComponentFlag; | 54 *validFlags = kA_GrColorComponentFlag; |
| 55 } else { | 55 } else { |
| 56 *validFlags = 0; | 56 *validFlags = 0; |
| 57 } | 57 } |
| 58 } | 58 } |
| 59 | 59 |
| 60 private: | 60 private: |
| 61 GrCoordTransform fCoordTransform; | 61 GrCoordTransform fCoordTransform; |
| 62 GrTextureAccess fTextureAccess; | 62 GrTextureAccess fTextureAccess; |
| 63 | 63 |
| 64 typedef GrEffect INHERITED; | 64 typedef GrFragmentProcessor INHERITED; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 #endif | 67 #endif |
| OLD | NEW |