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

Side by Side Diff: src/gpu/gl/builders/GrGLProgramBuilder.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, 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
« no previous file with comments | « src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.cpp ('k') | tests/GLProgramsTest.cpp » ('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 2014 Google Inc. 2 * Copyright 2014 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 "gl/GrGLProgram.h" 8 #include "gl/GrGLProgram.h"
9 #include "gl/GrGLSLPrettyPrint.h" 9 #include "gl/GrGLSLPrettyPrint.h"
10 #include "gl/GrGLUniformHandle.h" 10 #include "gl/GrGLUniformHandle.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 return false; 77 return false;
78 } 78 }
79 79
80 return true; 80 return true;
81 } 81 }
82 82
83 ////////////////////////////////////////////////////////////////////////////// 83 //////////////////////////////////////////////////////////////////////////////
84 84
85 GrGLProgramBuilder::GrGLProgramBuilder(GrGpuGL* gpu, 85 GrGLProgramBuilder::GrGLProgramBuilder(GrGpuGL* gpu,
86 const GrGLProgramDesc& desc) 86 const GrGLProgramDesc& desc)
87 : fFragOnly(!desc.getHeader().fRequiresVertexShader && 87 : fFragOnly(SkToBool(desc.getHeader().fUseFragShaderOnly))
88 gpu->glCaps().pathRenderingSupport() &&
89 gpu->glPathRendering()->texturingMode() == GrGLPathRendering::Fi xedFunction_TexturingMode)
90 , fTexCoordSetCnt(0) 88 , fTexCoordSetCnt(0)
91 , fProgramID(0) 89 , fProgramID(0)
92 , fFS(this, desc) 90 , fFS(this, desc)
93 , fSeparableVaryingInfos(kVarsPerBlock) 91 , fSeparableVaryingInfos(kVarsPerBlock)
94 , fDesc(desc) 92 , fDesc(desc)
95 , fGpu(gpu) 93 , fGpu(gpu)
96 , fUniforms(kVarsPerBlock) { 94 , fUniforms(kVarsPerBlock) {
97 } 95 }
98 96
99 void GrGLProgramBuilder::nameVariable(SkString* out, char prefix, const char* na me) { 97 void GrGLProgramBuilder::nameVariable(SkString* out, char prefix, const char* na me) {
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 GetProgramResourceLocation(programId, 317 GetProgramResourceLocation(programId,
320 GR_GL_FRAGMENT_INPUT, 318 GR_GL_FRAGMENT_INPUT,
321 fSeparableVaryingInfos[i].fVariab le.c_str())); 319 fSeparableVaryingInfos[i].fVariab le.c_str()));
322 fSeparableVaryingInfos[i].fLocation = location; 320 fSeparableVaryingInfos[i].fLocation = location;
323 } 321 }
324 } 322 }
325 323
326 const GrGLContextInfo& GrGLProgramBuilder::ctxInfo() const { 324 const GrGLContextInfo& GrGLProgramBuilder::ctxInfo() const {
327 return fGpu->ctxInfo(); 325 return fGpu->ctxInfo();
328 } 326 }
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.cpp ('k') | tests/GLProgramsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698