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

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

Issue 1417123002: Move GrGLShaderVar to GrGLSL (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix gyp Created 5 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/GrGLProgramBuilder.h ('k') | src/gpu/gl/builders/GrGLShaderBuilder.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 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 "GrGLProgramBuilder.h" 8 #include "GrGLProgramBuilder.h"
9 9
10 #include "GrAutoLocaleSetter.h" 10 #include "GrAutoLocaleSetter.h"
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 int count, 126 int count,
127 const char** out Name) { 127 const char** out Name) {
128 SkASSERT(name && strlen(name)); 128 SkASSERT(name && strlen(name));
129 SkDEBUGCODE(static const uint32_t kVisibilityMask = kVertex_Visibility | kFr agment_Visibility); 129 SkDEBUGCODE(static const uint32_t kVisibilityMask = kVertex_Visibility | kFr agment_Visibility);
130 SkASSERT(0 == (~kVisibilityMask & visibility)); 130 SkASSERT(0 == (~kVisibilityMask & visibility));
131 SkASSERT(0 != visibility); 131 SkASSERT(0 != visibility);
132 SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type)); 132 SkASSERT(kDefault_GrSLPrecision == precision || GrSLTypeIsFloatType(type));
133 133
134 UniformInfo& uni = fUniforms.push_back(); 134 UniformInfo& uni = fUniforms.push_back();
135 uni.fVariable.setType(type); 135 uni.fVariable.setType(type);
136 uni.fVariable.setTypeModifier(GrGLShaderVar::kUniform_TypeModifier); 136 uni.fVariable.setTypeModifier(GrGLSLShaderVar::kUniform_TypeModifier);
137 // TODO this is a bit hacky, lets think of a better way. Basically we need to be able to use 137 // TODO this is a bit hacky, lets think of a better way. Basically we need to be able to use
138 // the uniform view matrix name in the GP, and the GP is immutable so it has to tell the PB 138 // the uniform view matrix name in the GP, and the GP is immutable so it has to tell the PB
139 // exactly what name it wants to use for the uniform view matrix. If we pre fix anythings, then 139 // exactly what name it wants to use for the uniform view matrix. If we pre fix anythings, then
140 // the names will mismatch. I think the correct solution is to have all GPs which need the 140 // the names will mismatch. I think the correct solution is to have all GPs which need the
141 // uniform view matrix, they should upload the view matrix in their setData along with regular 141 // uniform view matrix, they should upload the view matrix in their setData along with regular
142 // uniforms. 142 // uniforms.
143 char prefix = 'u'; 143 char prefix = 'u';
144 if ('u' == name[0]) { 144 if ('u' == name[0]) {
145 prefix = '\0'; 145 prefix = '\0';
146 } 146 }
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after
518 } 518 }
519 519
520 //////////////////////////////////////////////////////////////////////////////// /////////////////// 520 //////////////////////////////////////////////////////////////////////////////// ///////////////////
521 521
522 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() { 522 GrGLInstalledFragProcs::~GrGLInstalledFragProcs() {
523 int numProcs = fProcs.count(); 523 int numProcs = fProcs.count();
524 for (int i = 0; i < numProcs; ++i) { 524 for (int i = 0; i < numProcs; ++i) {
525 delete fProcs[i]; 525 delete fProcs[i];
526 } 526 }
527 } 527 }
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.h ('k') | src/gpu/gl/builders/GrGLShaderBuilder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698