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

Side by Side Diff: bench/GLInstancedArraysBench.cpp

Issue 1420033002: Revert of Add version string and force highp NDS transfrom to GLSLCaps (Closed) Base URL: https://skia.googlesource.com/skia.git@renameShaderVar
Patch Set: 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 | « no previous file | bench/GLVec4ScalarBench.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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 uint32_t fDrawDiv; 100 uint32_t fDrawDiv;
101 SkTArray<GrGLuint> fBuffers; 101 SkTArray<GrGLuint> fBuffers;
102 GrGLuint fProgram; 102 GrGLuint fProgram;
103 GrGLuint fVAO; 103 GrGLuint fVAO;
104 GrGLuint fTexture; 104 GrGLuint fTexture;
105 }; 105 };
106 106
107 //////////////////////////////////////////////////////////////////////////////// /////////////////// 107 //////////////////////////////////////////////////////////////////////////////// ///////////////////
108 108
109 GrGLuint GLCpuPosInstancedArraysBench::setupShader(const GrGLContext* ctx) { 109 GrGLuint GLCpuPosInstancedArraysBench::setupShader(const GrGLContext* ctx) {
110 const char* version = ctx->caps()->glslCaps()->versionDeclString(); 110 const char* version = GrGLGetGLSLVersionDecl(*ctx);
111 111
112 // setup vertex shader 112 // setup vertex shader
113 GrGLSLShaderVar aPosition("a_position", kVec2f_GrSLType, GrShaderVar::kAttri bute_TypeModifier); 113 GrGLSLShaderVar aPosition("a_position", kVec2f_GrSLType, GrShaderVar::kAttri bute_TypeModifier);
114 GrGLSLShaderVar aColor("a_color", kVec3f_GrSLType, GrShaderVar::kAttribute_T ypeModifier); 114 GrGLSLShaderVar aColor("a_color", kVec3f_GrSLType, GrShaderVar::kAttribute_T ypeModifier);
115 GrGLSLShaderVar oColor("o_color", kVec3f_GrSLType, GrShaderVar::kVaryingOut_ TypeModifier); 115 GrGLSLShaderVar oColor("o_color", kVec3f_GrSLType, GrShaderVar::kVaryingOut_ TypeModifier);
116 116
117 SkString vshaderTxt(version); 117 SkString vshaderTxt(version);
118 aPosition.appendDecl(ctx->caps()->glslCaps(), &vshaderTxt); 118 aPosition.appendDecl(ctx->caps()->glslCaps(), &vshaderTxt);
119 vshaderTxt.append(";\n"); 119 vshaderTxt.append(";\n");
120 aColor.appendDecl(ctx->caps()->glslCaps(), &vshaderTxt); 120 aColor.appendDecl(ctx->caps()->glslCaps(), &vshaderTxt);
(...skipping 268 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 1) ) 389 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 1) )
390 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 1) ) 390 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 1) )
391 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 2) ) 391 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 2) )
392 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 2) ) 392 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 2) )
393 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 4) ) 393 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 4) )
394 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 4) ) 394 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 4) )
395 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 8) ) 395 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 8) )
396 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 8) ) 396 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 8) )
397 397
398 #endif 398 #endif
OLDNEW
« no previous file with comments | « no previous file | bench/GLVec4ScalarBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698