| 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 GrSimpleTextureEffect_DEFINED | 8 #ifndef GrSimpleTextureEffect_DEFINED |
| 9 #define GrSimpleTextureEffect_DEFINED | 9 #define GrSimpleTextureEffect_DEFINED |
| 10 | 10 |
| 11 #include "GrSingleTextureEffect.h" | 11 #include "GrSingleTextureEffect.h" |
| 12 | 12 |
| 13 class GrGLSimpleTextureEffect; | 13 class GrGLSimpleTextureEffect; |
| 14 class GrInvariantOutput; |
| 14 | 15 |
| 15 /** | 16 /** |
| 16 * The output color of this effect is a modulation of the input color and a samp
le from a texture. | 17 * The output color of this effect is a modulation of the input color and a samp
le from a texture. |
| 17 * It allows explicit specification of the filtering and wrap modes (GrTexturePa
rams). It can use | 18 * It allows explicit specification of the filtering and wrap modes (GrTexturePa
rams). It can use |
| 18 * local coords, positions, or a custom vertex attribute as input texture coords
. The input coords | 19 * local coords, positions, or a custom vertex attribute as input texture coords
. The input coords |
| 19 * can have a matrix applied in the VS in both the local and position cases but
not with a custom | 20 * can have a matrix applied in the VS in both the local and position cases but
not with a custom |
| 20 * attribute coords at this time. It will add a varying to input interpolate tex
ture coords to the | 21 * attribute coords at this time. It will add a varying to input interpolate tex
ture coords to the |
| 21 * FS. | 22 * FS. |
| 22 */ | 23 */ |
| 23 class GrSimpleTextureEffect : public GrSingleTextureEffect { | 24 class GrSimpleTextureEffect : public GrSingleTextureEffect { |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 64 |
| 64 GrSimpleTextureEffect(GrTexture* texture, | 65 GrSimpleTextureEffect(GrTexture* texture, |
| 65 const SkMatrix& matrix, | 66 const SkMatrix& matrix, |
| 66 const GrTextureParams& params, | 67 const GrTextureParams& params, |
| 67 GrCoordSet coordSet) | 68 GrCoordSet coordSet) |
| 68 : GrSingleTextureEffect(texture, matrix, params, coordSet) { | 69 : GrSingleTextureEffect(texture, matrix, params, coordSet) { |
| 69 } | 70 } |
| 70 | 71 |
| 71 virtual bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE {
return true; } | 72 virtual bool onIsEqual(const GrFragmentProcessor& other) const SK_OVERRIDE {
return true; } |
| 72 | 73 |
| 73 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR
IDE; | 74 virtual void onComputeInvariantOutput(GrInvariantOutput* inout) const SK_OVE
RRIDE; |
| 74 | 75 |
| 75 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 76 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
| 76 | 77 |
| 77 typedef GrSingleTextureEffect INHERITED; | 78 typedef GrSingleTextureEffect INHERITED; |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 #endif | 81 #endif |
| OLD | NEW |