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

Side by Side Diff: src/gpu/gl/GrGLShaderBuilder.cpp

Issue 12533007: Use vertex array objects on core profiles. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Use vertex array objects on core profiles. Created 7 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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/GrGLShaderBuilder.h" 8 #include "gl/GrGLShaderBuilder.h"
9 #include "gl/GrGLProgram.h" 9 #include "gl/GrGLProgram.h"
10 #include "gl/GrGLUniformHandle.h" 10 #include "gl/GrGLUniformHandle.h"
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 fFSInputs.back().setName(*fsName); 257 fFSInputs.back().setName(*fsName);
258 if (fsInName) { 258 if (fsInName) {
259 *fsInName = fsName->c_str(); 259 *fsInName = fsName->c_str();
260 } 260 }
261 } 261 }
262 262
263 const char* GrGLShaderBuilder::fragmentPosition() { 263 const char* GrGLShaderBuilder::fragmentPosition() {
264 #if 1 264 #if 1
265 if (fCtxInfo.caps().fragCoordConventionsSupport()) { 265 if (fCtxInfo.caps().fragCoordConventionsSupport()) {
266 if (!fSetupFragPosition) { 266 if (!fSetupFragPosition) {
267 fFSHeader.append("#extension GL_ARB_fragment_coord_conventions: requ ire\n"); 267 if (fCtxInfo.glslGeneration() < k150_GrGLSLGeneration) {
268 fFSHeader.append("#extension GL_ARB_fragment_coord_conventions: require\n");
269 }
268 fFSInputs.push_back().set(kVec4f_GrSLType, 270 fFSInputs.push_back().set(kVec4f_GrSLType,
269 GrGLShaderVar::kIn_TypeModifier, 271 GrGLShaderVar::kIn_TypeModifier,
270 "gl_FragCoord", 272 "gl_FragCoord",
271 GrGLShaderVar::kDefault_Precision, 273 GrGLShaderVar::kDefault_Precision,
272 GrGLShaderVar::kUpperLeft_Origin); 274 GrGLShaderVar::kUpperLeft_Origin);
273 fSetupFragPosition = true; 275 fSetupFragPosition = true;
274 } 276 }
275 return "gl_FragCoord"; 277 return "gl_FragCoord";
276 } else { 278 } else {
277 static const char* kCoordName = "fragCoordYDown"; 279 static const char* kCoordName = "fragCoordYDown";
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 key, 457 key,
456 vsInCoord, 458 vsInCoord,
457 fsOutColor, 459 fsOutColor,
458 fsInColor, 460 fsInColor,
459 textureSamplers); 461 textureSamplers);
460 this->fVSCode.appendf("\t}\n"); 462 this->fVSCode.appendf("\t}\n");
461 this->fFSCode.appendf("\t}\n"); 463 this->fFSCode.appendf("\t}\n");
462 464
463 return glEffect; 465 return glEffect;
464 } 466 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698