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 |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 const SkMatrix& matrix, | 42 const SkMatrix& matrix, |
43 const GrTextureParams& p, | 43 const GrTextureParams& p, |
44 GrCoordSet coordSet = kLocal_GrCoordSet)
{ | 44 GrCoordSet coordSet = kLocal_GrCoordSet)
{ |
45 return SkNEW_ARGS(GrSimpleTextureEffect, (tex, matrix, p, coordSet)); | 45 return SkNEW_ARGS(GrSimpleTextureEffect, (tex, matrix, p, coordSet)); |
46 } | 46 } |
47 | 47 |
48 virtual ~GrSimpleTextureEffect() {} | 48 virtual ~GrSimpleTextureEffect() {} |
49 | 49 |
50 static const char* Name() { return "Texture"; } | 50 static const char* Name() { return "Texture"; } |
51 | 51 |
| 52 virtual void getConstantColorComponents(GrColor* color, uint32_t* validFlags
) const SK_OVERRIDE; |
| 53 |
52 typedef GrGLSimpleTextureEffect GLProcessor; | 54 typedef GrGLSimpleTextureEffect GLProcessor; |
53 | 55 |
54 virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERR
IDE; | 56 virtual const GrBackendFragmentProcessorFactory& getFactory() const SK_OVERR
IDE; |
55 | 57 |
56 private: | 58 private: |
57 GrSimpleTextureEffect(GrTexture* texture, | 59 GrSimpleTextureEffect(GrTexture* texture, |
58 const SkMatrix& matrix, | 60 const SkMatrix& matrix, |
59 GrTextureParams::FilterMode filterMode, | 61 GrTextureParams::FilterMode filterMode, |
60 GrCoordSet coordSet) | 62 GrCoordSet coordSet) |
61 : GrSingleTextureEffect(texture, matrix, filterMode, coordSet) { | 63 : GrSingleTextureEffect(texture, matrix, filterMode, coordSet) { |
62 } | 64 } |
63 | 65 |
64 GrSimpleTextureEffect(GrTexture* texture, | 66 GrSimpleTextureEffect(GrTexture* texture, |
65 const SkMatrix& matrix, | 67 const SkMatrix& matrix, |
66 const GrTextureParams& params, | 68 const GrTextureParams& params, |
67 GrCoordSet coordSet) | 69 GrCoordSet coordSet) |
68 : GrSingleTextureEffect(texture, matrix, params, coordSet) { | 70 : GrSingleTextureEffect(texture, matrix, params, coordSet) { |
69 } | 71 } |
70 | 72 |
71 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE { | 73 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE { |
72 const GrSimpleTextureEffect& ste = other.cast<GrSimpleTextureEffect>(); | 74 const GrSimpleTextureEffect& ste = other.cast<GrSimpleTextureEffect>(); |
73 return this->hasSameTextureParamsMatrixAndSourceCoords(ste); | 75 return this->hasSameTextureParamsMatrixAndSourceCoords(ste); |
74 } | 76 } |
75 | 77 |
76 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR
IDE; | |
77 | |
78 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 78 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
79 | 79 |
80 typedef GrSingleTextureEffect INHERITED; | 80 typedef GrSingleTextureEffect INHERITED; |
81 }; | 81 }; |
82 | 82 |
83 #endif | 83 #endif |
OLD | NEW |