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

Side by Side Diff: bench/GLVertexAttributesBench.cpp

Issue 1417993004: Add version string and force highp NDS transfrom to GLSLCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@renameShaderVar
Patch Set: Fix glslInit 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 | « bench/GLVec4ScalarBench.cpp ('k') | src/gpu/effects/GrTextureDomain.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 2015 Google Inc. 2 * Copyright 2015 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 "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkImageEncoder.h" 10 #include "SkImageEncoder.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 uint32_t fAttribs; 58 uint32_t fAttribs;
59 size_t fStride; 59 size_t fStride;
60 SkString fName; 60 SkString fName;
61 typedef Benchmark INHERITED; 61 typedef Benchmark INHERITED;
62 }; 62 };
63 63
64 //////////////////////////////////////////////////////////////////////////////// /////////////////// 64 //////////////////////////////////////////////////////////////////////////////// ///////////////////
65 65
66 GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a ttribs, 66 GrGLuint GLVertexAttributesBench::setupShader(const GrGLContext* ctx, uint32_t a ttribs,
67 uint32_t maxAttribs) { 67 uint32_t maxAttribs) {
68 const char* version = GrGLGetGLSLVersionDecl(*ctx); 68 const char* version = ctx->caps()->glslCaps()->versionDeclString();
69 69
70 // setup vertex shader 70 // setup vertex shader
71 GrGLSLShaderVar aPosition("a_position", kVec4f_GrSLType, GrShaderVar::kAttri bute_TypeModifier); 71 GrGLSLShaderVar aPosition("a_position", kVec4f_GrSLType, GrShaderVar::kAttri bute_TypeModifier);
72 SkTArray<GrGLSLShaderVar> aVars; 72 SkTArray<GrGLSLShaderVar> aVars;
73 SkTArray<GrGLSLShaderVar> oVars; 73 SkTArray<GrGLSLShaderVar> oVars;
74 74
75 SkString vshaderTxt(version); 75 SkString vshaderTxt(version);
76 aPosition.appendDecl(ctx->caps()->glslCaps(), &vshaderTxt); 76 aPosition.appendDecl(ctx->caps()->glslCaps(), &vshaderTxt);
77 vshaderTxt.append(";\n"); 77 vshaderTxt.append(";\n");
78 78
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
261 261
262 DEF_BENCH( return new GLVertexAttributesBench(0) ) 262 DEF_BENCH( return new GLVertexAttributesBench(0) )
263 DEF_BENCH( return new GLVertexAttributesBench(1) ) 263 DEF_BENCH( return new GLVertexAttributesBench(1) )
264 DEF_BENCH( return new GLVertexAttributesBench(2) ) 264 DEF_BENCH( return new GLVertexAttributesBench(2) )
265 DEF_BENCH( return new GLVertexAttributesBench(3) ) 265 DEF_BENCH( return new GLVertexAttributesBench(3) )
266 DEF_BENCH( return new GLVertexAttributesBench(4) ) 266 DEF_BENCH( return new GLVertexAttributesBench(4) )
267 DEF_BENCH( return new GLVertexAttributesBench(5) ) 267 DEF_BENCH( return new GLVertexAttributesBench(5) )
268 DEF_BENCH( return new GLVertexAttributesBench(6) ) 268 DEF_BENCH( return new GLVertexAttributesBench(6) )
269 DEF_BENCH( return new GLVertexAttributesBench(7) ) 269 DEF_BENCH( return new GLVertexAttributesBench(7) )
270 #endif 270 #endif
OLDNEW
« no previous file with comments | « bench/GLVec4ScalarBench.cpp ('k') | src/gpu/effects/GrTextureDomain.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698