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

Side by Side Diff: src/gpu/gl/builders/GrGLFragmentOnlyProgramBuilder.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 | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.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 "GrGLFragmentOnlyProgramBuilder.h" 8 #include "GrGLFragmentOnlyProgramBuilder.h"
9 #include "../GrGpuGL.h" 9 #include "../GrGpuGL.h"
10 10
11 GrGLFragmentOnlyProgramBuilder::GrGLFragmentOnlyProgramBuilder(GrGpuGL* gpu, 11 GrGLFragmentOnlyProgramBuilder::GrGLFragmentOnlyProgramBuilder(GrGpuGL* gpu,
12 const GrGLProgram Desc& desc) 12 const GrGLProgram Desc& desc)
13 : INHERITED(gpu, desc) { 13 : INHERITED(gpu, desc) {
14 SkASSERT(!desc.getHeader().fRequiresVertexShader); 14 SkASSERT(desc.getHeader().fUseFragShaderOnly);
15 SkASSERT(gpu->glCaps().pathRenderingSupport()); 15 SkASSERT(gpu->glCaps().pathRenderingSupport());
16 SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fColorIn put); 16 SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fColorIn put);
17 SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fCoverag eInput); 17 SkASSERT(GrGLProgramDesc::kAttribute_ColorInput != desc.getHeader().fCoverag eInput);
18 } 18 }
19 19
20 int GrGLFragmentOnlyProgramBuilder::addTexCoordSets(int count) { 20 int GrGLFragmentOnlyProgramBuilder::addTexCoordSets(int count) {
21 int firstFreeCoordSet = fTexCoordSetCnt; 21 int firstFreeCoordSet = fTexCoordSetCnt;
22 fTexCoordSetCnt += count; 22 fTexCoordSetCnt += count;
23 SkASSERT(gpu()->glCaps().maxFixedFunctionTextureCoords() >= fTexCoordSetCnt) ; 23 SkASSERT(gpu()->glCaps().maxFixedFunctionTextureCoords() >= fTexCoordSetCnt) ;
24 return firstFreeCoordSet; 24 return firstFreeCoordSet;
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 for (int t = 0; t < numTransforms; ++t) { 99 for (int t = 0; t < numTransforms; ++t) {
100 GrSLType type = 100 GrSLType type =
101 effectStage.isPerspectiveCoordTransform(t, false) ? 101 effectStage.isPerspectiveCoordTransform(t, false) ?
102 kVec3f_GrSLType : 102 kVec3f_GrSLType :
103 kVec2f_GrSLType; 103 kVec2f_GrSLType;
104 104
105 name.printf("%s(gl_TexCoord[%i])", GrGLSLTypeString(type), texCoordIndex ++); 105 name.printf("%s(gl_TexCoord[%i])", GrGLSLTypeString(type), texCoordIndex ++);
106 SkNEW_APPEND_TO_TARRAY(outCoords, GrGLEffect::TransformedCoords, (name, type)); 106 SkNEW_APPEND_TO_TARRAY(outCoords, GrGLEffect::TransformedCoords, (name, type));
107 } 107 }
108 } 108 }
OLDNEW
« no previous file with comments | « src/gpu/gl/GrGLProgramDesc.cpp ('k') | src/gpu/gl/builders/GrGLProgramBuilder.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698