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

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

Issue 2413363002: added SkSL support for mustForceNegatedAtanParamToFloat cap (Closed)
Patch Set: updated comment again 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 | « src/effects/gradients/SkSweepGradient.cpp ('k') | src/sksl/SkSLGLSLCodeGenerator.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 "GrGLShaderStringBuilder.h" 8 #include "GrGLShaderStringBuilder.h"
9 #include "gl/GrGLGpu.h" 9 #include "gl/GrGLGpu.h"
10 #include "gl/GrGLSLPrettyPrint.h" 10 #include "gl/GrGLSLPrettyPrint.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 break; 79 break;
80 case k320es_GrGLSLGeneration: 80 case k320es_GrGLSLGeneration:
81 SkASSERT(kGLES_GrGLStandard == standard); 81 SkASSERT(kGLES_GrGLStandard == standard);
82 result.fVersion = 320; 82 result.fVersion = 320;
83 break; 83 break;
84 } 84 }
85 result.fIsCoreProfile = caps->isCoreProfile(); 85 result.fIsCoreProfile = caps->isCoreProfile();
86 result.fUsesPrecisionModifiers = glslCaps->usesPrecisionModifiers(); 86 result.fUsesPrecisionModifiers = glslCaps->usesPrecisionModifiers();
87 result.fMustDeclareFragmentShaderOutput = glslCaps->mustDeclareFragmentShade rOutput(); 87 result.fMustDeclareFragmentShaderOutput = glslCaps->mustDeclareFragmentShade rOutput();
88 result.fCanUseMinAndAbsTogether = glslCaps->canUseMinAndAbsTogether(); 88 result.fCanUseMinAndAbsTogether = glslCaps->canUseMinAndAbsTogether();
89 result.fMustForceNegatedAtanParamToFloat = glslCaps->mustForceNegatedAtanPar amToFloat();
89 return result; 90 return result;
90 } 91 }
91 92
92 static void dump_string(std::string s) { 93 static void dump_string(std::string s) {
93 // on Android, SkDebugf only displays the first 1K characters of output, whi ch results in 94 // on Android, SkDebugf only displays the first 1K characters of output, whi ch results in
94 // incomplete shader source code. Print each line individually to avoid this problem. 95 // incomplete shader source code. Print each line individually to avoid this problem.
95 size_t index = 0; 96 size_t index = 0;
96 for (;;) { 97 for (;;) {
97 size_t next = s.find("\n", index); 98 size_t next = s.find("\n", index);
98 if (next == std::string::npos) { 99 if (next == std::string::npos) {
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 213
213 static void print_shader_source(const char** strings, int* lengths, int count) { 214 static void print_shader_source(const char** strings, int* lengths, int count) {
214 const SkString& pretty = GrGLSLPrettyPrint::PrettyPrintGLSL(strings, lengths , count, true); 215 const SkString& pretty = GrGLSLPrettyPrint::PrettyPrintGLSL(strings, lengths , count, true);
215 SkTArray<SkString> lines; 216 SkTArray<SkString> lines;
216 SkStrSplit(pretty.c_str(), "\n", &lines); 217 SkStrSplit(pretty.c_str(), "\n", &lines);
217 for (const SkString& line : lines) { 218 for (const SkString& line : lines) {
218 // Print the shader one line at the time so it doesn't get truncated by the adb log. 219 // Print the shader one line at the time so it doesn't get truncated by the adb log.
219 SkDebugf("%s\n", line.c_str()); 220 SkDebugf("%s\n", line.c_str());
220 } 221 }
221 } 222 }
OLDNEW
« no previous file with comments | « src/effects/gradients/SkSweepGradient.cpp ('k') | src/sksl/SkSLGLSLCodeGenerator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698