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

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: 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') | src/gpu/gl/GrGLProgramDesc.cpp » ('J')
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 #include "GrGLProgram.h" 7 #include "GrGLProgram.h"
8 8
9 #include "builders/GrGLFragmentOnlyProgramBuilder.h" 9 #include "builders/GrGLFragmentOnlyProgramBuilder.h"
10 #include "builders/GrGLFullProgramBuilder.h" 10 #include "builders/GrGLFullProgramBuilder.h"
(...skipping 10 matching lines...) Expand all
21 21
22 #define GL_CALL(X) GR_GL_CALL(fGpu->glInterface(), X) 22 #define GL_CALL(X) GR_GL_CALL(fGpu->glInterface(), X)
23 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(fGpu->glInterface(), R, X) 23 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(fGpu->glInterface(), R, X)
24 24
25 GrGLProgram* GrGLProgram::Create(GrGpuGL* gpu, 25 GrGLProgram* GrGLProgram::Create(GrGpuGL* gpu,
26 const GrGLProgramDesc& desc, 26 const GrGLProgramDesc& desc,
27 const GrEffectStage* geometryProcessor, 27 const GrEffectStage* geometryProcessor,
28 const GrEffectStage* colorStages[], 28 const GrEffectStage* colorStages[],
29 const GrEffectStage* coverageStages[]) { 29 const GrEffectStage* coverageStages[]) {
30 SkAutoTDelete<GrGLProgramBuilder> builder; 30 SkAutoTDelete<GrGLProgramBuilder> builder;
31 if (!desc.getHeader().fRequiresVertexShader && 31 if (desc.getHeader().fDoPathRendering) {
bsalomon 2014/09/19 17:29:49 I think this should have a different name since we
egdaniel 2014/09/19 17:44:05 changed to fUseFragShaderOnly On 2014/09/19 17:29
32 gpu->glCaps().pathRenderingSupport() && 32 SkASSERT(gpu->glPathRendering()->texturingMode() ==
33 gpu->glPathRendering()->texturingMode() == GrGLPathRendering::FixedFunct ion_TexturingMode) { 33 GrGLPathRendering::FixedFunction_TexturingMode);
34 SkASSERT(gpu->glCaps().pathRenderingSupport());
34 SkASSERT(NULL == geometryProcessor); 35 SkASSERT(NULL == geometryProcessor);
35 builder.reset(SkNEW_ARGS(GrGLFragmentOnlyProgramBuilder, (gpu, desc))); 36 builder.reset(SkNEW_ARGS(GrGLFragmentOnlyProgramBuilder, (gpu, desc)));
36 } else { 37 } else {
37 builder.reset(SkNEW_ARGS(GrGLFullProgramBuilder, (gpu, desc))); 38 builder.reset(SkNEW_ARGS(GrGLFullProgramBuilder, (gpu, desc)));
38 } 39 }
39 if (builder->genProgram(geometryProcessor, colorStages, coverageStages)) { 40 if (builder->genProgram(geometryProcessor, colorStages, coverageStages)) {
40 SkASSERT(0 != builder->getProgramID()); 41 SkASSERT(0 != builder->getProgramID());
41 return SkNEW_ARGS(GrGLProgram, (gpu, desc, *builder)); 42 return SkNEW_ARGS(GrGLProgram, (gpu, desc, *builder));
42 } 43 }
43 return NULL; 44 return NULL;
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
263 264
264 GrGLfloat viewMatrix[3 * 3]; 265 GrGLfloat viewMatrix[3 * 3];
265 fMatrixState.getGLMatrix<3>(viewMatrix); 266 fMatrixState.getGLMatrix<3>(viewMatrix);
266 fProgramDataManager.setMatrix3f(fBuiltinUniformHandles.fViewMatrixUni, v iewMatrix); 267 fProgramDataManager.setMatrix3f(fBuiltinUniformHandles.fViewMatrixUni, v iewMatrix);
267 268
268 GrGLfloat rtAdjustmentVec[4]; 269 GrGLfloat rtAdjustmentVec[4];
269 fMatrixState.getRTAdjustmentVec(rtAdjustmentVec); 270 fMatrixState.getRTAdjustmentVec(rtAdjustmentVec);
270 fProgramDataManager.set4fv(fBuiltinUniformHandles.fRTAdjustmentUni, 1, r tAdjustmentVec); 271 fProgramDataManager.set4fv(fBuiltinUniformHandles.fRTAdjustmentUni, 1, r tAdjustmentVec);
271 } 272 }
272 } 273 }
OLDNEW
« no previous file with comments | « no previous file | src/gpu/gl/GrGLProgramDesc.h » ('j') | src/gpu/gl/GrGLProgramDesc.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698