Chromium Code Reviews| 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 #include "GrGLProgram.h" | 8 #include "GrGLProgram.h" |
| 9 | 9 |
| 10 #include "GrAllocator.h" | 10 #include "GrAllocator.h" |
| (...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 234 } | 234 } |
| 235 } else { | 235 } else { |
| 236 SkASSERT(!fUniformHandles.fDstCopyTopLeftUni.isValid()); | 236 SkASSERT(!fUniformHandles.fDstCopyTopLeftUni.isValid()); |
| 237 SkASSERT(!fUniformHandles.fDstCopyScaleUni.isValid()); | 237 SkASSERT(!fUniformHandles.fDstCopyScaleUni.isValid()); |
| 238 SkASSERT(!fUniformHandles.fDstCopySamplerUni.isValid()); | 238 SkASSERT(!fUniformHandles.fDstCopySamplerUni.isValid()); |
| 239 } | 239 } |
| 240 | 240 |
| 241 fColorEffects->setData(fGpu, fUniformManager, colorStages); | 241 fColorEffects->setData(fGpu, fUniformManager, colorStages); |
| 242 fCoverageEffects->setData(fGpu, fUniformManager, coverageStages); | 242 fCoverageEffects->setData(fGpu, fUniformManager, coverageStages); |
| 243 | 243 |
| 244 if (!fHasVertexShader) { | 244 if (fGpu->glCaps().fixedFunctionSupport()) { |
|
Chris Dalton
2013/10/31 17:49:09
I think it would be best to leave this as 'if (!fH
Kimmo Kinnunen
2013/11/01 06:32:11
Done.
| |
| 245 fGpu->disableUnusedTexGen(fNumTexCoordSets); | 245 fGpu->flushTexGenSettings(fNumTexCoordSets); |
| 246 } | 246 } |
| 247 } | 247 } |
| 248 | 248 |
| 249 void GrGLProgram::setColor(const GrDrawState& drawState, | 249 void GrGLProgram::setColor(const GrDrawState& drawState, |
| 250 GrColor color, | 250 GrColor color, |
| 251 SharedGLState* sharedState) { | 251 SharedGLState* sharedState) { |
| 252 const GrGLProgramDesc::KeyHeader& header = fDesc.getHeader(); | 252 const GrGLProgramDesc::KeyHeader& header = fDesc.getHeader(); |
| 253 if (!drawState.hasColorVertexAttribute()) { | 253 if (!drawState.hasColorVertexAttribute()) { |
| 254 switch (header.fColorInput) { | 254 switch (header.fColorInput) { |
| 255 case GrGLProgramDesc::kAttribute_ColorInput: | 255 case GrGLProgramDesc::kAttribute_ColorInput: |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 346 | 346 |
| 347 fMatrixState.fViewMatrix = drawState.getViewMatrix(); | 347 fMatrixState.fViewMatrix = drawState.getViewMatrix(); |
| 348 fMatrixState.fRenderTargetSize = size; | 348 fMatrixState.fRenderTargetSize = size; |
| 349 fMatrixState.fRenderTargetOrigin = rt->origin(); | 349 fMatrixState.fRenderTargetOrigin = rt->origin(); |
| 350 | 350 |
| 351 GrGLfloat viewMatrix[3 * 3]; | 351 GrGLfloat viewMatrix[3 * 3]; |
| 352 fMatrixState.getGLMatrix<3>(viewMatrix); | 352 fMatrixState.getGLMatrix<3>(viewMatrix); |
| 353 fUniformManager.setMatrix3f(fUniformHandles.fViewMatrixUni, viewMatrix); | 353 fUniformManager.setMatrix3f(fUniformHandles.fViewMatrixUni, viewMatrix); |
| 354 } | 354 } |
| 355 } | 355 } |
| OLD | NEW |