OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 | 8 |
9 #ifndef GrGLProgram_DEFINED | 9 #ifndef GrGLProgram_DEFINED |
10 #define GrGLProgram_DEFINED | 10 #define GrGLProgram_DEFINED |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 UniformHandle fColorFilterUni; | 125 UniformHandle fColorFilterUni; |
126 | 126 |
127 // We use the render target height to provide a y-down frag coord when s
pecifying | 127 // We use the render target height to provide a y-down frag coord when s
pecifying |
128 // origin_upper_left is not supported. | 128 // origin_upper_left is not supported. |
129 UniformHandle fRTHeightUni; | 129 UniformHandle fRTHeightUni; |
130 | 130 |
131 // Uniforms for computing texture coords to do the dst-copy lookup | 131 // Uniforms for computing texture coords to do the dst-copy lookup |
132 UniformHandle fDstCopyTopLeftUni; | 132 UniformHandle fDstCopyTopLeftUni; |
133 UniformHandle fDstCopyScaleUni; | 133 UniformHandle fDstCopyScaleUni; |
134 UniformHandle fDstCopySamplerUni; | 134 UniformHandle fDstCopySamplerUni; |
135 | |
136 UniformHandles() { | |
137 fViewMatrixUni = GrGLUniformManager::kInvalidUniformHandle; | |
138 fColorUni = GrGLUniformManager::kInvalidUniformHandle; | |
139 fCoverageUni = GrGLUniformManager::kInvalidUniformHandle; | |
140 fColorFilterUni = GrGLUniformManager::kInvalidUniformHandle; | |
141 fRTHeightUni = GrGLUniformManager::kInvalidUniformHandle; | |
142 fDstCopyTopLeftUni = GrGLUniformManager::kInvalidUniformHandle; | |
143 fDstCopyScaleUni = GrGLUniformManager::kInvalidUniformHandle; | |
144 fDstCopySamplerUni = GrGLUniformManager::kInvalidUniformHandle; | |
145 } | |
146 }; | 135 }; |
147 | 136 |
148 typedef SkSTArray<4, UniformHandle, true> SamplerUniSArray; | 137 typedef SkSTArray<4, UniformHandle, true> SamplerUniSArray; |
149 typedef SkSTArray<4, int, true> TextureUnitSArray; | 138 typedef SkSTArray<4, int, true> TextureUnitSArray; |
150 | 139 |
151 struct EffectAndSamplers { | 140 struct EffectAndSamplers { |
152 EffectAndSamplers() : fGLEffect(NULL) {} | 141 EffectAndSamplers() : fGLEffect(NULL) {} |
153 ~EffectAndSamplers() { delete fGLEffect; } | 142 ~EffectAndSamplers() { delete fGLEffect; } |
154 GrGLEffect* fGLEffect; | 143 GrGLEffect* fGLEffect; |
155 SamplerUniSArray fSamplerUnis; // sampler uni handles for effect's G
rTextureAccess | 144 SamplerUniSArray fSamplerUnis; // sampler uni handles for effect's G
rTextureAccess |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 GrGLProgramDesc fDesc; | 210 GrGLProgramDesc fDesc; |
222 const GrGLContext& fContext; | 211 const GrGLContext& fContext; |
223 | 212 |
224 GrGLUniformManager fUniformManager; | 213 GrGLUniformManager fUniformManager; |
225 UniformHandles fUniformHandles; | 214 UniformHandles fUniformHandles; |
226 | 215 |
227 typedef GrRefCnt INHERITED; | 216 typedef GrRefCnt INHERITED; |
228 }; | 217 }; |
229 | 218 |
230 #endif | 219 #endif |
OLD | NEW |