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

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

Issue 2212473002: SkRTConf: eliminate (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: `git grep SK_CONF` now returns nothing Created 4 years, 4 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/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | src/gpu/vk/GrVkPipelineStateCache.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 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"
11 #include "SkRTConf.h"
12 #include "SkTraceEvent.h" 11 #include "SkTraceEvent.h"
13 12
14 #define GL_CALL(X) GR_GL_CALL(gpu->glInterface(), X) 13 #define GL_CALL(X) GR_GL_CALL(gpu->glInterface(), X)
15 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(gpu->glInterface(), R, X) 14 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(gpu->glInterface(), R, X)
16 15
17 SK_CONF_DECLARE(bool, c_PrintShaders, "gpu.printShaders", false, 16 // Print the source code for all shaders generated.
18 "Print the source code for all shaders generated."); 17 static const bool c_PrintShaders{false};
19 18
20 static void print_shader_source(const char** strings, int* lengths, int count); 19 static void print_shader_source(const char** strings, int* lengths, int count);
21 20
22 GrGLuint GrGLCompileAndAttachShader(const GrGLContext& glCtx, 21 GrGLuint GrGLCompileAndAttachShader(const GrGLContext& glCtx,
23 GrGLuint programId, 22 GrGLuint programId,
24 GrGLenum type, 23 GrGLenum type,
25 const char** strings, 24 const char** strings,
26 int* lengths, 25 int* lengths,
27 int count, 26 int count,
28 GrGpu::Stats* stats) { 27 GrGpu::Stats* stats) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 95
97 static void print_shader_source(const char** strings, int* lengths, int count) { 96 static void print_shader_source(const char** strings, int* lengths, int count) {
98 const SkString& pretty = GrGLSLPrettyPrint::PrettyPrintGLSL(strings, lengths , count, true); 97 const SkString& pretty = GrGLSLPrettyPrint::PrettyPrintGLSL(strings, lengths , count, true);
99 SkTArray<SkString> lines; 98 SkTArray<SkString> lines;
100 SkStrSplit(pretty.c_str(), "\n", &lines); 99 SkStrSplit(pretty.c_str(), "\n", &lines);
101 for (const SkString& line : lines) { 100 for (const SkString& line : lines) {
102 // Print the shader one line at the time so it doesn't get truncated by the adb log. 101 // Print the shader one line at the time so it doesn't get truncated by the adb log.
103 SkDebugf("%s\n", line.c_str()); 102 SkDebugf("%s\n", line.c_str());
104 } 103 }
105 } 104 }
OLDNEW
« no previous file with comments | « src/gpu/gl/builders/GrGLProgramBuilder.cpp ('k') | src/gpu/vk/GrVkPipelineStateCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698