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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 GrGLInstalledGeoProc* geometryProcessor, | 143 GrGLInstalledGeoProc* geometryProcessor, |
144 GrGLInstalledXferProc* xferProcessor, | 144 GrGLInstalledXferProc* xferProcessor, |
145 GrGLInstalledFragProcs* fragmentProcessors); | 145 GrGLInstalledFragProcs* fragmentProcessors); |
146 | 146 |
147 // Sets the texture units for samplers. | 147 // Sets the texture units for samplers. |
148 void initSamplerUniforms(); | 148 void initSamplerUniforms(); |
149 void initSamplers(GrGLInstalledProc*, int* texUnitIdx); | 149 void initSamplers(GrGLInstalledProc*, int* texUnitIdx); |
150 | 150 |
151 // A templated helper to loop over effects, set the transforms(via subclass)
and bind textures | 151 // A templated helper to loop over effects, set the transforms(via subclass)
and bind textures |
152 void setFragmentData(const GrOptDrawState&); | 152 void setFragmentData(const GrOptDrawState&); |
153 virtual void setTransformData(const GrPendingFragmentStage&, GrGLInstalledFr
agProc*); | 153 virtual void setTransformData(const GrPendingFragmentStage&, |
| 154 const SkMatrix& localMatrix, |
| 155 GrGLInstalledFragProc*); |
154 void bindTextures(const GrGLInstalledProc*, const GrProcessor&); | 156 void bindTextures(const GrGLInstalledProc*, const GrProcessor&); |
155 | 157 |
156 /* | 158 /* |
157 * Legacy NVPR needs a hook here to flush path tex gen settings. | 159 * Legacy NVPR needs a hook here to flush path tex gen settings. |
158 * TODO when legacy nvpr is removed, remove this call. | 160 * TODO when legacy nvpr is removed, remove this call. |
159 */ | 161 */ |
160 virtual void didSetData(GrGpu::DrawType); | 162 virtual void didSetData(GrGpu::DrawType); |
161 | 163 |
162 // Helper for setData() that sets the view matrix and loads the render targe
t height uniform | 164 // Helper for setData() that sets the view matrix and loads the render targe
t height uniform |
163 void setMatrixAndRenderTargetHeight(const GrOptDrawState&); | 165 void setMatrixAndRenderTargetHeight(const GrOptDrawState&); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 const GrProgramDesc&, | 220 const GrProgramDesc&, |
219 const BuiltinUniformHandles&, | 221 const BuiltinUniformHandles&, |
220 GrGLuint programID, | 222 GrGLuint programID, |
221 const UniformInfoArray&, | 223 const UniformInfoArray&, |
222 GrGLInstalledGeoProc*, | 224 GrGLInstalledGeoProc*, |
223 GrGLInstalledXferProc* xferProcessor, | 225 GrGLInstalledXferProc* xferProcessor, |
224 GrGLInstalledFragProcs* fragmentProcessors, | 226 GrGLInstalledFragProcs* fragmentProcessors, |
225 const SeparableVaryingInfoArray& separableVaryings); | 227 const SeparableVaryingInfoArray& separableVaryings); |
226 virtual void didSetData(GrGpu::DrawType) SK_OVERRIDE; | 228 virtual void didSetData(GrGpu::DrawType) SK_OVERRIDE; |
227 virtual void setTransformData(const GrPendingFragmentStage&, | 229 virtual void setTransformData(const GrPendingFragmentStage&, |
| 230 const SkMatrix& localMatrix, |
228 GrGLInstalledFragProc*) SK_OVERRIDE; | 231 GrGLInstalledFragProc*) SK_OVERRIDE; |
229 | 232 |
230 struct Varying { | 233 struct Varying { |
231 GrGLint fLocation; | 234 GrGLint fLocation; |
232 SkDEBUGCODE( | 235 SkDEBUGCODE( |
233 GrSLType fType; | 236 GrSLType fType; |
234 ); | 237 ); |
235 }; | 238 }; |
236 SkTArray<Varying, true> fVaryings; | 239 SkTArray<Varying, true> fVaryings; |
237 | 240 |
(...skipping 11 matching lines...) Expand all Loading... |
249 const GrProgramDesc& desc, | 252 const GrProgramDesc& desc, |
250 const BuiltinUniformHandles&, | 253 const BuiltinUniformHandles&, |
251 GrGLuint programID, | 254 GrGLuint programID, |
252 const UniformInfoArray&, | 255 const UniformInfoArray&, |
253 GrGLInstalledGeoProc*, | 256 GrGLInstalledGeoProc*, |
254 GrGLInstalledXferProc* xp, | 257 GrGLInstalledXferProc* xp, |
255 GrGLInstalledFragProcs* fps, | 258 GrGLInstalledFragProcs* fps, |
256 int texCoordSetCnt); | 259 int texCoordSetCnt); |
257 virtual void didSetData(GrGpu::DrawType) SK_OVERRIDE; | 260 virtual void didSetData(GrGpu::DrawType) SK_OVERRIDE; |
258 virtual void setTransformData(const GrPendingFragmentStage&, | 261 virtual void setTransformData(const GrPendingFragmentStage&, |
| 262 const SkMatrix& localMatrix, |
259 GrGLInstalledFragProc*) SK_OVERRIDE; | 263 GrGLInstalledFragProc*) SK_OVERRIDE; |
260 | 264 |
261 int fTexCoordSetCnt; | 265 int fTexCoordSetCnt; |
262 | 266 |
263 friend class GrGLLegacyNvprProgramBuilder; | 267 friend class GrGLLegacyNvprProgramBuilder; |
264 | 268 |
265 typedef GrGLNvprProgramBase INHERITED; | 269 typedef GrGLNvprProgramBase INHERITED; |
266 }; | 270 }; |
267 | 271 |
268 #endif | 272 #endif |
OLD | NEW |