| 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 GrGLEffect_DEFINED | 8 #ifndef GrGLEffect_DEFINED |
| 9 #define GrGLEffect_DEFINED | 9 #define GrGLEffect_DEFINED |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 The GrGLEffect subclass must also have a constructor of the form: | 27 The GrGLEffect subclass must also have a constructor of the form: |
| 28 EffectSubclass::EffectSubclass(const GrBackendEffectFactory&, const GrDr
awEffect&) | 28 EffectSubclass::EffectSubclass(const GrBackendEffectFactory&, const GrDr
awEffect&) |
| 29 The effect held by the GrDrawEffect is guaranteed to be of the type that gen
erated the | 29 The effect held by the GrDrawEffect is guaranteed to be of the type that gen
erated the |
| 30 GrGLEffect subclass instance. | 30 GrGLEffect subclass instance. |
| 31 | 31 |
| 32 These objects are created by the factory object returned by the GrEffect::ge
tFactory(). | 32 These objects are created by the factory object returned by the GrEffect::ge
tFactory(). |
| 33 */ | 33 */ |
| 34 | 34 |
| 35 class GrDrawEffect; | 35 class GrDrawEffect; |
| 36 class GrGLTexture; | 36 class GrGLTexture; |
| 37 class GrGLVertexEffect; | 37 class GrGLGeometryProcessor; |
| 38 | 38 |
| 39 class GrGLEffect { | 39 class GrGLEffect { |
| 40 | 40 |
| 41 public: | 41 public: |
| 42 typedef GrGLProgramEffects::TransformedCoordsArray TransformedCoordsArray; | 42 typedef GrGLProgramEffects::TransformedCoordsArray TransformedCoordsArray; |
| 43 typedef GrGLProgramEffects::TextureSampler TextureSampler; | 43 typedef GrGLProgramEffects::TextureSampler TextureSampler; |
| 44 typedef GrGLProgramEffects::TextureSamplerArray TextureSamplerArray; | 44 typedef GrGLProgramEffects::TextureSamplerArray TextureSamplerArray; |
| 45 | 45 |
| 46 GrGLEffect(const GrBackendEffectFactory& factory) | 46 GrGLEffect(const GrBackendEffectFactory& factory) |
| 47 : fFactory(factory) | 47 : fFactory(factory) |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 effect key as the one that created this GrGLEffect. Effects that use loc
al coords have | 83 effect key as the one that created this GrGLEffect. Effects that use loc
al coords have |
| 84 to consider whether the GrEffectStage's coord change matrix should be us
ed. When explicit | 84 to consider whether the GrEffectStage's coord change matrix should be us
ed. When explicit |
| 85 local coordinates are used it can be ignored. */ | 85 local coordinates are used it can be ignored. */ |
| 86 virtual void setData(const GrGLProgramDataManager&, const GrDrawEffect&) {} | 86 virtual void setData(const GrGLProgramDataManager&, const GrDrawEffect&) {} |
| 87 | 87 |
| 88 const char* name() const { return fFactory.name(); } | 88 const char* name() const { return fFactory.name(); } |
| 89 | 89 |
| 90 static void GenKey(const GrDrawEffect&, const GrGLCaps&, GrEffectKeyBuilder*
) {} | 90 static void GenKey(const GrDrawEffect&, const GrGLCaps&, GrEffectKeyBuilder*
) {} |
| 91 | 91 |
| 92 /** Used by the system when generating shader code, to see if this effect ca
n be downcasted to | 92 /** Used by the system when generating shader code, to see if this effect ca
n be downcasted to |
| 93 the internal GrGLVertexEffect type */ | 93 the internal GrGLGeometryProcessor type */ |
| 94 bool isVertexEffect() const { return fIsVertexEffect; } | 94 bool isVertexEffect() const { return fIsVertexEffect; } |
| 95 | 95 |
| 96 protected: | 96 protected: |
| 97 const GrBackendEffectFactory& fFactory; | 97 const GrBackendEffectFactory& fFactory; |
| 98 | 98 |
| 99 private: | 99 private: |
| 100 friend class GrGLVertexEffect; // to set fIsVertexEffect | 100 friend class GrGLGeometryProcessor; // to set fIsVertexEffect |
| 101 | 101 |
| 102 bool fIsVertexEffect; | 102 bool fIsVertexEffect; |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 #endif | 105 #endif |
| OLD | NEW |