| 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 15 matching lines...) Expand all Loading... |
| 26 | 26 |
| 27 /** | 27 /** |
| 28 * This class manages a GPU program and records per-program information. | 28 * This class manages a GPU program and records per-program information. |
| 29 * We can specify the attribute locations so that they are constant | 29 * We can specify the attribute locations so that they are constant |
| 30 * across our shaders. But the driver determines the uniform locations | 30 * across our shaders. But the driver determines the uniform locations |
| 31 * at link time. We don't need to remember the sampler uniform location | 31 * at link time. We don't need to remember the sampler uniform location |
| 32 * because we will bind a texture slot to it and never change it | 32 * because we will bind a texture slot to it and never change it |
| 33 * Uniforms are program-local so we can't rely on fHWState to hold the | 33 * Uniforms are program-local so we can't rely on fHWState to hold the |
| 34 * previous uniform state after a program change. | 34 * previous uniform state after a program change. |
| 35 */ | 35 */ |
| 36 class GrGLProgram : public GrRefCnt { | 36 class GrGLProgram : public SkRefCnt { |
| 37 public: | 37 public: |
| 38 SK_DECLARE_INST_COUNT(GrGLProgram) | 38 SK_DECLARE_INST_COUNT(GrGLProgram) |
| 39 | 39 |
| 40 static GrGLProgram* Create(GrGpuGL* gpu, | 40 static GrGLProgram* Create(GrGpuGL* gpu, |
| 41 const GrGLProgramDesc& desc, | 41 const GrGLProgramDesc& desc, |
| 42 const GrEffectStage* colorStages[], | 42 const GrEffectStage* colorStages[], |
| 43 const GrEffectStage* coverageStages[]); | 43 const GrEffectStage* coverageStages[]); |
| 44 | 44 |
| 45 virtual ~GrGLProgram(); | 45 virtual ~GrGLProgram(); |
| 46 | 46 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 | 228 |
| 229 SkTArray<EffectAndSamplers> fColorEffects; | 229 SkTArray<EffectAndSamplers> fColorEffects; |
| 230 SkTArray<EffectAndSamplers> fCoverageEffects; | 230 SkTArray<EffectAndSamplers> fCoverageEffects; |
| 231 | 231 |
| 232 GrGLProgramDesc fDesc; | 232 GrGLProgramDesc fDesc; |
| 233 GrGpuGL* fGpu; | 233 GrGpuGL* fGpu; |
| 234 | 234 |
| 235 GrGLUniformManager fUniformManager; | 235 GrGLUniformManager fUniformManager; |
| 236 UniformHandles fUniformHandles; | 236 UniformHandles fUniformHandles; |
| 237 | 237 |
| 238 typedef GrRefCnt INHERITED; | 238 typedef SkRefCnt INHERITED; |
| 239 }; | 239 }; |
| 240 | 240 |
| 241 #endif | 241 #endif |
| OLD | NEW |