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

Side by Side Diff: bench/GLVec4ScalarBench.cpp

Issue 2419573002: fixed GLVec4ScalarBench (Closed)
Patch Set: Created 4 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 | 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 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 "SkMatrix.h" 8 #include "SkMatrix.h"
9 #include "SkPoint.h" 9 #include "SkPoint.h"
10 #include "SkString.h" 10 #include "SkString.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 oColor.setTypeModifier(GrShaderVar::kVaryingIn_TypeModifier); 138 oColor.setTypeModifier(GrShaderVar::kVaryingIn_TypeModifier);
139 oColor.appendDecl(glslCaps, &fshaderTxt); 139 oColor.appendDecl(glslCaps, &fshaderTxt);
140 fshaderTxt.append(";\n"); 140 fshaderTxt.append(";\n");
141 141
142 const char* fsOutName; 142 const char* fsOutName;
143 if (glslCaps->mustDeclareFragmentShaderOutput()) { 143 if (glslCaps->mustDeclareFragmentShaderOutput()) {
144 oFragColor.appendDecl(glslCaps, &fshaderTxt); 144 oFragColor.appendDecl(glslCaps, &fshaderTxt);
145 fshaderTxt.append(";\n"); 145 fshaderTxt.append(";\n");
146 fsOutName = oFragColor.c_str(); 146 fsOutName = oFragColor.c_str();
147 } else { 147 } else {
148 fsOutName = "gl_FragColor"; 148 fsOutName = "sk_FragColor";
149 } 149 }
150 150
151 151
152 fshaderTxt.appendf( 152 fshaderTxt.appendf(
153 "void main()\n" 153 "void main()\n"
154 "{\n" 154 "{\n"
155 " vec4 outputColor;\n" 155 " vec4 outputColor;\n"
156 " %s outputCoverage;\n" 156 " %s outputCoverage;\n"
157 " outputColor = vec4(%s, 1.0);\n" 157 " outputColor = vec4(%s, 1.0);\n"
158 " outputCoverage = %s;\n", 158 " outputCoverage = %s;\n",
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
293 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe tup, 2) ) 293 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe tup, 2) )
294 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu p, 2) ) 294 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu p, 2) )
295 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe tup, 4) ) 295 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe tup, 4) )
296 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu p, 4) ) 296 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu p, 4) )
297 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe tup, 6) ) 297 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe tup, 6) )
298 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu p, 6) ) 298 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu p, 6) )
299 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe tup, 8) ) 299 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseScalar_CoverageSe tup, 8) )
300 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu p, 8) ) 300 DEF_BENCH( return new GLVec4ScalarBench(GLVec4ScalarBench::kUseVec4_CoverageSetu p, 8) )
301 301
302 #endif 302 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698