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

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

Issue 586793002: Change GrGLProgramDesc header to have DoPathRendering flag instead of RequiresVertexShader (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Cast to bool Created 6 years, 3 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
« no previous file with comments | « no previous file | src/gpu/gl/GrGLProgramDesc.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 "builders/GrGLFragmentOnlyProgramBuilder.h" 10 #include "builders/GrGLFragmentOnlyProgramBuilder.h"
(...skipping 11 matching lines...) Expand all
22 22
23 #define GL_CALL(X) GR_GL_CALL(fGpu->glInterface(), X) 23 #define GL_CALL(X) GR_GL_CALL(fGpu->glInterface(), X)
24 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(fGpu->glInterface(), R, X) 24 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(fGpu->glInterface(), R, X)
25 25
26 GrGLProgram* GrGLProgram::Create(GrGpuGL* gpu, 26 GrGLProgram* GrGLProgram::Create(GrGpuGL* gpu,
27 const GrGLProgramDesc& desc, 27 const GrGLProgramDesc& desc,
28 const GrEffectStage* geometryProcessor, 28 const GrEffectStage* geometryProcessor,
29 const GrEffectStage* colorStages[], 29 const GrEffectStage* colorStages[],
30 const GrEffectStage* coverageStages[]) { 30 const GrEffectStage* coverageStages[]) {
31 SkAutoTDelete<GrGLProgramBuilder> builder; 31 SkAutoTDelete<GrGLProgramBuilder> builder;
32 if (!desc.getHeader().fRequiresVertexShader && 32 if (desc.getHeader().fUseFragShaderOnly) {
33 gpu->glCaps().pathRenderingSupport() && 33 SkASSERT(gpu->glCaps().pathRenderingSupport());
34 gpu->glPathRendering()->texturingMode() == GrGLPathRendering::FixedFunct ion_TexturingMode) { 34 SkASSERT(gpu->glPathRendering()->texturingMode() ==
35 GrGLPathRendering::FixedFunction_TexturingMode);
35 SkASSERT(NULL == geometryProcessor); 36 SkASSERT(NULL == geometryProcessor);
36 builder.reset(SkNEW_ARGS(GrGLFragmentOnlyProgramBuilder, (gpu, desc))); 37 builder.reset(SkNEW_ARGS(GrGLFragmentOnlyProgramBuilder, (gpu, desc)));
37 } else { 38 } else {
38 builder.reset(SkNEW_ARGS(GrGLFullProgramBuilder, (gpu, desc))); 39 builder.reset(SkNEW_ARGS(GrGLFullProgramBuilder, (gpu, desc)));
39 } 40 }
40 if (builder->genProgram(geometryProcessor, colorStages, coverageStages)) { 41 if (builder->genProgram(geometryProcessor, colorStages, coverageStages)) {
41 SkASSERT(0 != builder->getProgramID()); 42 SkASSERT(0 != builder->getProgramID());
42 return SkNEW_ARGS(GrGLProgram, (gpu, desc, *builder)); 43 return SkNEW_ARGS(GrGLProgram, (gpu, desc, *builder));
43 } 44 }
44 return NULL; 45 return NULL;
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 265
265 GrGLfloat viewMatrix[3 * 3]; 266 GrGLfloat viewMatrix[3 * 3];
266 fMatrixState.getGLMatrix<3>(viewMatrix); 267 fMatrixState.getGLMatrix<3>(viewMatrix);
267 fProgramDataManager.setMatrix3f(fBuiltinUniformHandles.fViewMatrixUni, v iewMatrix); 268 fProgramDataManager.setMatrix3f(fBuiltinUniformHandles.fViewMatrixUni, v iewMatrix);
268 269
269 GrGLfloat rtAdjustmentVec[4]; 270 GrGLfloat rtAdjustmentVec[4];
270 fMatrixState.getRTAdjustmentVec(rtAdjustmentVec); 271 fMatrixState.getRTAdjustmentVec(rtAdjustmentVec);
271 fProgramDataManager.set4fv(fBuiltinUniformHandles.fRTAdjustmentUni, 1, r tAdjustmentVec); 272 fProgramDataManager.set4fv(fBuiltinUniformHandles.fRTAdjustmentUni, 1, r tAdjustmentVec);
272 } 273 }
273 } 274 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLProgramDesc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698