| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 const SkMatrix& matrix, | 46 const SkMatrix& matrix, |
| 47 const GrTextureParams& p, | 47 const GrTextureParams& p, |
| 48 GrCoordSet coordSet = kLocal_GrCoordSet)
{ | 48 GrCoordSet coordSet = kLocal_GrCoordSet)
{ |
| 49 return SkNEW_ARGS(GrSimpleTextureEffect, (procDataManager, tex, matrix,
p, coordSet)); | 49 return SkNEW_ARGS(GrSimpleTextureEffect, (procDataManager, tex, matrix,
p, coordSet)); |
| 50 } | 50 } |
| 51 | 51 |
| 52 virtual ~GrSimpleTextureEffect() {} | 52 virtual ~GrSimpleTextureEffect() {} |
| 53 | 53 |
| 54 const char* name() const override { return "SimpleTexture"; } | 54 const char* name() const override { return "SimpleTexture"; } |
| 55 | 55 |
| 56 GrGLFragmentProcessor* createGLInstance() const override; | |
| 57 | |
| 58 private: | 56 private: |
| 59 GrSimpleTextureEffect(GrProcessorDataManager* procDataManager, | 57 GrSimpleTextureEffect(GrProcessorDataManager* procDataManager, |
| 60 GrTexture* texture, | 58 GrTexture* texture, |
| 61 const SkMatrix& matrix, | 59 const SkMatrix& matrix, |
| 62 GrTextureParams::FilterMode filterMode, | 60 GrTextureParams::FilterMode filterMode, |
| 63 GrCoordSet coordSet) | 61 GrCoordSet coordSet) |
| 64 : GrSingleTextureEffect(procDataManager, texture, matrix, filterMode, co
ordSet) { | 62 : GrSingleTextureEffect(procDataManager, texture, matrix, filterMode, co
ordSet) { |
| 65 this->initClassID<GrSimpleTextureEffect>(); | 63 this->initClassID<GrSimpleTextureEffect>(); |
| 66 } | 64 } |
| 67 | 65 |
| 68 GrSimpleTextureEffect(GrProcessorDataManager* procDataManager, | 66 GrSimpleTextureEffect(GrProcessorDataManager* procDataManager, |
| 69 GrTexture* texture, | 67 GrTexture* texture, |
| 70 const SkMatrix& matrix, | 68 const SkMatrix& matrix, |
| 71 const GrTextureParams& params, | 69 const GrTextureParams& params, |
| 72 GrCoordSet coordSet) | 70 GrCoordSet coordSet) |
| 73 : GrSingleTextureEffect(procDataManager, texture, matrix, params, coordS
et) { | 71 : GrSingleTextureEffect(procDataManager, texture, matrix, params, coordS
et) { |
| 74 this->initClassID<GrSimpleTextureEffect>(); | 72 this->initClassID<GrSimpleTextureEffect>(); |
| 75 } | 73 } |
| 76 | 74 |
| 75 GrGLFragmentProcessor* onCreateGLInstance() const override; |
| 76 |
| 77 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov
erride; | 77 void onGetGLProcessorKey(const GrGLSLCaps&, GrProcessorKeyBuilder*) const ov
erride; |
| 78 | 78 |
| 79 bool onIsEqual(const GrFragmentProcessor& other) const override { return tru
e; } | 79 bool onIsEqual(const GrFragmentProcessor& other) const override { return tru
e; } |
| 80 | 80 |
| 81 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; | 81 void onComputeInvariantOutput(GrInvariantOutput* inout) const override; |
| 82 | 82 |
| 83 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; | 83 GR_DECLARE_FRAGMENT_PROCESSOR_TEST; |
| 84 | 84 |
| 85 typedef GrSingleTextureEffect INHERITED; | 85 typedef GrSingleTextureEffect INHERITED; |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 #endif | 88 #endif |
| OLD | NEW |