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 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 GrGLInstalledGeoProc*, | 176 GrGLInstalledGeoProc*, |
177 GrGLInstalledXferProc* xferProcessor, | 177 GrGLInstalledXferProc* xferProcessor, |
178 GrGLInstalledFragProcs* fragmentProcessors); | 178 GrGLInstalledFragProcs* fragmentProcessors); |
179 virtual void onSetRenderTargetState(const GrOptDrawState&); | 179 virtual void onSetRenderTargetState(const GrOptDrawState&); |
180 | 180 |
181 typedef GrGLProgram INHERITED; | 181 typedef GrGLProgram INHERITED; |
182 }; | 182 }; |
183 | 183 |
184 class GrGLNvprProgram : public GrGLNvprProgramBase { | 184 class GrGLNvprProgram : public GrGLNvprProgramBase { |
185 public: | 185 public: |
186 virtual bool hasVertexShader() const SK_OVERRIDE { return true; } | 186 bool hasVertexShader() const SK_OVERRIDE { return true; } |
187 | 187 |
188 private: | 188 private: |
189 typedef GrGLNvprProgramBuilder::SeparableVaryingInfo SeparableVaryingInfo; | 189 typedef GrGLNvprProgramBuilder::SeparableVaryingInfo SeparableVaryingInfo; |
190 typedef GrGLNvprProgramBuilder::SeparableVaryingInfoArray SeparableVaryingIn
foArray; | 190 typedef GrGLNvprProgramBuilder::SeparableVaryingInfoArray SeparableVaryingIn
foArray; |
191 GrGLNvprProgram(GrGLGpu*, | 191 GrGLNvprProgram(GrGLGpu*, |
192 const GrProgramDesc&, | 192 const GrProgramDesc&, |
193 const BuiltinUniformHandles&, | 193 const BuiltinUniformHandles&, |
194 GrGLuint programID, | 194 GrGLuint programID, |
195 const UniformInfoArray&, | 195 const UniformInfoArray&, |
196 GrGLInstalledGeoProc*, | 196 GrGLInstalledGeoProc*, |
197 GrGLInstalledXferProc* xferProcessor, | 197 GrGLInstalledXferProc* xferProcessor, |
198 GrGLInstalledFragProcs* fragmentProcessors, | 198 GrGLInstalledFragProcs* fragmentProcessors, |
199 const SeparableVaryingInfoArray& separableVaryings); | 199 const SeparableVaryingInfoArray& separableVaryings); |
200 virtual void didSetData(GrGpu::DrawType) SK_OVERRIDE; | 200 void didSetData(GrGpu::DrawType) SK_OVERRIDE; |
201 virtual void setTransformData(const GrPendingFragmentStage&, | 201 virtual void setTransformData(const GrPendingFragmentStage&, |
202 const SkMatrix& localMatrix, | 202 const SkMatrix& localMatrix, |
203 GrGLInstalledFragProc*) SK_OVERRIDE; | 203 GrGLInstalledFragProc*) SK_OVERRIDE; |
204 | 204 |
205 struct Varying { | 205 struct Varying { |
206 GrGLint fLocation; | 206 GrGLint fLocation; |
207 SkDEBUGCODE( | 207 SkDEBUGCODE( |
208 GrSLType fType; | 208 GrSLType fType; |
209 ); | 209 ); |
210 }; | 210 }; |
211 SkTArray<Varying, true> fVaryings; | 211 SkTArray<Varying, true> fVaryings; |
212 | 212 |
213 friend class GrGLNvprProgramBuilder; | 213 friend class GrGLNvprProgramBuilder; |
214 | 214 |
215 typedef GrGLNvprProgramBase INHERITED; | 215 typedef GrGLNvprProgramBase INHERITED; |
216 }; | 216 }; |
217 | 217 |
218 class GrGLLegacyNvprProgram : public GrGLNvprProgramBase { | 218 class GrGLLegacyNvprProgram : public GrGLNvprProgramBase { |
219 public: | 219 public: |
220 virtual bool hasVertexShader() const SK_OVERRIDE { return false; } | 220 bool hasVertexShader() const SK_OVERRIDE { return false; } |
221 | 221 |
222 private: | 222 private: |
223 GrGLLegacyNvprProgram(GrGLGpu* gpu, | 223 GrGLLegacyNvprProgram(GrGLGpu* gpu, |
224 const GrProgramDesc& desc, | 224 const GrProgramDesc& desc, |
225 const BuiltinUniformHandles&, | 225 const BuiltinUniformHandles&, |
226 GrGLuint programID, | 226 GrGLuint programID, |
227 const UniformInfoArray&, | 227 const UniformInfoArray&, |
228 GrGLInstalledGeoProc*, | 228 GrGLInstalledGeoProc*, |
229 GrGLInstalledXferProc* xp, | 229 GrGLInstalledXferProc* xp, |
230 GrGLInstalledFragProcs* fps, | 230 GrGLInstalledFragProcs* fps, |
231 int texCoordSetCnt); | 231 int texCoordSetCnt); |
232 virtual void didSetData(GrGpu::DrawType) SK_OVERRIDE; | 232 void didSetData(GrGpu::DrawType) SK_OVERRIDE; |
233 virtual void setTransformData(const GrPendingFragmentStage&, | 233 virtual void setTransformData(const GrPendingFragmentStage&, |
234 const SkMatrix& localMatrix, | 234 const SkMatrix& localMatrix, |
235 GrGLInstalledFragProc*) SK_OVERRIDE; | 235 GrGLInstalledFragProc*) SK_OVERRIDE; |
236 | 236 |
237 int fTexCoordSetCnt; | 237 int fTexCoordSetCnt; |
238 | 238 |
239 friend class GrGLLegacyNvprProgramBuilder; | 239 friend class GrGLLegacyNvprProgramBuilder; |
240 | 240 |
241 typedef GrGLNvprProgramBase INHERITED; | 241 typedef GrGLNvprProgramBase INHERITED; |
242 }; | 242 }; |
243 | 243 |
244 #endif | 244 #endif |
OLD | NEW |