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

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

Issue 32403002: Fix GrProgramsTest to not generate tests with too many TexCoord references (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: adress Created 7 years, 2 months 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/GrGLShaderBuilder.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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 , fNumTexCoordSets(0) { 44 , fNumTexCoordSets(0) {
45 fDesc = desc; 45 fDesc = desc;
46 fProgramID = 0; 46 fProgramID = 0;
47 47
48 fDstCopyTexUnit = -1; 48 fDstCopyTexUnit = -1;
49 49
50 fColor = GrColor_ILLEGAL; 50 fColor = GrColor_ILLEGAL;
51 fColorFilterColor = GrColor_ILLEGAL; 51 fColorFilterColor = GrColor_ILLEGAL;
52 52
53 if (fDesc.getHeader().fHasVertexCode || 53 if (fDesc.getHeader().fHasVertexCode ||
54 !fGpu->glCaps().fixedFunctionSupport() || 54 !fGpu->shouldUseFixedFunctionTexturing()) {
55 !fGpu->glCaps().pathRenderingSupport()) {
56
57 GrGLFullShaderBuilder fullBuilder(fGpu, fUniformManager, fDesc); 55 GrGLFullShaderBuilder fullBuilder(fGpu, fUniformManager, fDesc);
58 if (this->genProgram(&fullBuilder, colorStages, coverageStages)) { 56 if (this->genProgram(&fullBuilder, colorStages, coverageStages)) {
59 fUniformHandles.fViewMatrixUni = fullBuilder.getViewMatrixUniform(); 57 fUniformHandles.fViewMatrixUni = fullBuilder.getViewMatrixUniform();
60 fHasVertexShader = true; 58 fHasVertexShader = true;
61 } 59 }
62 } else { 60 } else {
63 GrGLFragmentOnlyShaderBuilder fragmentOnlyBuilder(fGpu, fUniformManager, fDesc); 61 GrGLFragmentOnlyShaderBuilder fragmentOnlyBuilder(fGpu, fUniformManager, fDesc);
64 if (this->genProgram(&fragmentOnlyBuilder, colorStages, coverageStages)) { 62 if (this->genProgram(&fragmentOnlyBuilder, colorStages, coverageStages)) {
65 fNumTexCoordSets = fragmentOnlyBuilder.getNumTexCoordSets(); 63 fNumTexCoordSets = fragmentOnlyBuilder.getNumTexCoordSets();
66 } 64 }
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 490
493 fMatrixState.fViewMatrix = drawState.getViewMatrix(); 491 fMatrixState.fViewMatrix = drawState.getViewMatrix();
494 fMatrixState.fRenderTargetSize = size; 492 fMatrixState.fRenderTargetSize = size;
495 fMatrixState.fRenderTargetOrigin = rt->origin(); 493 fMatrixState.fRenderTargetOrigin = rt->origin();
496 494
497 GrGLfloat viewMatrix[3 * 3]; 495 GrGLfloat viewMatrix[3 * 3];
498 fMatrixState.getGLMatrix<3>(viewMatrix); 496 fMatrixState.getGLMatrix<3>(viewMatrix);
499 fUniformManager.setMatrix3f(fUniformHandles.fViewMatrixUni, viewMatrix); 497 fUniformManager.setMatrix3f(fUniformHandles.fViewMatrixUni, viewMatrix);
500 } 498 }
501 } 499 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698