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

Side by Side Diff: src/gpu/gl/builders/GrGLVertexShaderBuilder.cpp

Issue 576543005: Breaking out full program and frag only (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 | « src/gpu/gl/builders/GrGLShaderBuilder.cpp ('k') | no next file » | 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 "GrGLVertexShaderBuilder.h" 8 #include "GrGLVertexShaderBuilder.h"
9 #include "GrGLProgramBuilder.h" 9 #include "GrGLFullProgramBuilder.h"
10 #include "GrGLShaderStringBuilder.h" 10 #include "GrGLShaderStringBuilder.h"
11 #include "../GrGpuGL.h" 11 #include "../GrGpuGL.h"
12 #include "../../GrOptDrawState.h" 12 #include "../../GrOptDrawState.h"
13 13
14 #define GL_CALL(X) GR_GL_CALL(gpu->glInterface(), X) 14 #define GL_CALL(X) GR_GL_CALL(gpu->glInterface(), X)
15 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(gpu->glInterface(), R, X) 15 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(gpu->glInterface(), R, X)
16 16
17 namespace { 17 namespace {
18 inline const char* color_attribute_name() { return "inColor"; } 18 inline const char* color_attribute_name() { return "inColor"; }
19 inline const char* coverage_attribute_name() { return "inCoverage"; } 19 inline const char* coverage_attribute_name() { return "inCoverage"; }
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 this->addAttribute(GrShaderVar(coverage_attribute_name(), 192 this->addAttribute(GrShaderVar(coverage_attribute_name(),
193 kVec4f_GrSLType, 193 kVec4f_GrSLType,
194 GrShaderVar::kAttribute_TypeModifier)); 194 GrShaderVar::kAttribute_TypeModifier));
195 const char *vsName, *fsName; 195 const char *vsName, *fsName;
196 fFullProgramBuilder->addVarying(kVec4f_GrSLType, "Coverage", &vsName, &f sName); 196 fFullProgramBuilder->addVarying(kVec4f_GrSLType, "Coverage", &vsName, &f sName);
197 this->codeAppendf("\t%s = %s;\n", vsName, coverage_attribute_name()); 197 this->codeAppendf("\t%s = %s;\n", vsName, coverage_attribute_name());
198 *coverage = fsName; 198 *coverage = fsName;
199 } 199 }
200 fEffectAttribOffset = fInputs.count(); 200 fEffectAttribOffset = fInputs.count();
201 } 201 }
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLShaderBuilder.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698