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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 const char* inputColor, | 78 const char* inputColor, |
79 const TextureSamplerArray& samplers) = 0; | 79 const TextureSamplerArray& samplers) = 0; |
80 | 80 |
81 /** A GrGLEffect instance can be reused with any GrEffect that produces the
same stage | 81 /** A GrGLEffect instance can be reused with any GrEffect that produces the
same stage |
82 key; this function reads data from a stage and uploads any uniform varia
bles required | 82 key; this function reads data from a stage and uploads any uniform varia
bles required |
83 by the shaders created in emitCode(). The GrEffect installed in the GrEf
fectStage is | 83 by the shaders created in emitCode(). The GrEffect installed in the GrEf
fectStage is |
84 guaranteed to be of the same type that created this GrGLEffect and to ha
ve an identical | 84 guaranteed to be of the same type that created this GrGLEffect and to ha
ve an identical |
85 EffectKey as the one that created this GrGLEffect. Effects that use loca
l coords have | 85 EffectKey as the one that created this GrGLEffect. Effects that use loca
l coords have |
86 to consider whether the GrEffectStage's coord change matrix should be us
ed. When explicit | 86 to consider whether the GrEffectStage's coord change matrix should be us
ed. When explicit |
87 local coordinates are used it can be ignored. */ | 87 local coordinates are used it can be ignored. */ |
88 virtual void setData(const GrGLUniformManager&, const GrDrawEffect&); | 88 virtual void setData(const GrGLContext&, const GrDrawEffect&); |
89 | 89 |
90 const char* name() const { return fFactory.name(); } | 90 const char* name() const { return fFactory.name(); } |
91 | 91 |
92 static EffectKey GenTextureKey(const GrDrawEffect&, const GrGLCaps&); | 92 static EffectKey GenTextureKey(const GrDrawEffect&, const GrGLCaps&); |
93 static EffectKey GenAttribKey(const GrDrawEffect& stage); | 93 static EffectKey GenAttribKey(const GrDrawEffect& stage); |
94 | 94 |
95 protected: | 95 protected: |
96 const GrBackendEffectFactory& fFactory; | 96 const GrBackendEffectFactory& fFactory; |
97 }; | 97 }; |
98 | 98 |
99 #endif | 99 #endif |
OLD | NEW |