Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: src/gpu/gl/GrGLProgram.cpp

Issue 54403003: Fix few inconsistencies in handling fixed-function texture coordinate set generation (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGpuGL.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698