| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 SharedGLState*); | 132 SharedGLState*); |
| 133 | 133 |
| 134 private: | 134 private: |
| 135 typedef GrGLUniformManager::UniformHandle UniformHandle; | 135 typedef GrGLUniformManager::UniformHandle UniformHandle; |
| 136 | 136 |
| 137 // handles for uniforms (aside from per-effect samplers) | 137 // handles for uniforms (aside from per-effect samplers) |
| 138 struct UniformHandles { | 138 struct UniformHandles { |
| 139 UniformHandle fViewMatrixUni; | 139 UniformHandle fViewMatrixUni; |
| 140 UniformHandle fColorUni; | 140 UniformHandle fColorUni; |
| 141 UniformHandle fCoverageUni; | 141 UniformHandle fCoverageUni; |
| 142 UniformHandle fColorFilterUni; | |
| 143 | 142 |
| 144 // We use the render target height to provide a y-down frag coord when s
pecifying | 143 // We use the render target height to provide a y-down frag coord when s
pecifying |
| 145 // origin_upper_left is not supported. | 144 // origin_upper_left is not supported. |
| 146 UniformHandle fRTHeightUni; | 145 UniformHandle fRTHeightUni; |
| 147 | 146 |
| 148 // Uniforms for computing texture coords to do the dst-copy lookup | 147 // Uniforms for computing texture coords to do the dst-copy lookup |
| 149 UniformHandle fDstCopyTopLeftUni; | 148 UniformHandle fDstCopyTopLeftUni; |
| 150 UniformHandle fDstCopyScaleUni; | 149 UniformHandle fDstCopyScaleUni; |
| 151 UniformHandle fDstCopySamplerUni; | 150 UniformHandle fDstCopySamplerUni; |
| 152 }; | 151 }; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 180 // Helper for setData() that sets the view matrix and loads the render targe
t height uniform | 179 // Helper for setData() that sets the view matrix and loads the render targe
t height uniform |
| 181 void setMatrixAndRenderTargetHeight(const GrDrawState&); | 180 void setMatrixAndRenderTargetHeight(const GrDrawState&); |
| 182 | 181 |
| 183 // GL program ID | 182 // GL program ID |
| 184 GrGLuint fProgramID; | 183 GrGLuint fProgramID; |
| 185 | 184 |
| 186 // these reflect the current values of uniforms (GL uniform values travel wi
th program) | 185 // these reflect the current values of uniforms (GL uniform values travel wi
th program) |
| 187 MatrixState fMatrixState; | 186 MatrixState fMatrixState; |
| 188 GrColor fColor; | 187 GrColor fColor; |
| 189 GrColor fCoverage; | 188 GrColor fCoverage; |
| 190 GrColor fColorFilterColor; | |
| 191 int fDstCopyTexUnit; | 189 int fDstCopyTexUnit; |
| 192 | 190 |
| 193 SkAutoTDelete<GrGLProgramEffects> fColorEffects; | 191 SkAutoTDelete<GrGLProgramEffects> fColorEffects; |
| 194 SkAutoTDelete<GrGLProgramEffects> fCoverageEffects; | 192 SkAutoTDelete<GrGLProgramEffects> fCoverageEffects; |
| 195 | 193 |
| 196 GrGLProgramDesc fDesc; | 194 GrGLProgramDesc fDesc; |
| 197 GrGpuGL* fGpu; | 195 GrGpuGL* fGpu; |
| 198 | 196 |
| 199 GrGLUniformManager fUniformManager; | 197 GrGLUniformManager fUniformManager; |
| 200 UniformHandles fUniformHandles; | 198 UniformHandles fUniformHandles; |
| 201 | 199 |
| 202 bool fHasVertexShader; | 200 bool fHasVertexShader; |
| 203 int fNumTexCoordSets; | 201 int fNumTexCoordSets; |
| 204 | 202 |
| 205 typedef SkRefCnt INHERITED; | 203 typedef SkRefCnt INHERITED; |
| 206 }; | 204 }; |
| 207 | 205 |
| 208 #endif | 206 #endif |
| OLD | NEW |