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

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

Issue 2215433003: Revert of SkRTConf: reduce functionality to what we use, increase simplicity (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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"
11 #include "SkTraceEvent.h" 12 #include "SkTraceEvent.h"
12 13
13 #define GL_CALL(X) GR_GL_CALL(gpu->glInterface(), X) 14 #define GL_CALL(X) GR_GL_CALL(gpu->glInterface(), X)
14 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(gpu->glInterface(), R, X) 15 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(gpu->glInterface(), R, X)
15 16
16 // Print the source code for all shaders generated. 17 SK_CONF_DECLARE(bool, c_PrintShaders, "gpu.printShaders", false,
17 static const bool c_PrintShaders{false}; 18 "Print the source code for all shaders generated.");
18 19
19 static void print_shader_source(const char** strings, int* lengths, int count); 20 static void print_shader_source(const char** strings, int* lengths, int count);
20 21
21 GrGLuint GrGLCompileAndAttachShader(const GrGLContext& glCtx, 22 GrGLuint GrGLCompileAndAttachShader(const GrGLContext& glCtx,
22 GrGLuint programId, 23 GrGLuint programId,
23 GrGLenum type, 24 GrGLenum type,
24 const char** strings, 25 const char** strings,
25 int* lengths, 26 int* lengths,
26 int count, 27 int count,
27 GrGpu::Stats* stats) { 28 GrGpu::Stats* stats) {
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 96
96 static void print_shader_source(const char** strings, int* lengths, int count) { 97 static void print_shader_source(const char** strings, int* lengths, int count) {
97 const SkString& pretty = GrGLSLPrettyPrint::PrettyPrintGLSL(strings, lengths , count, true); 98 const SkString& pretty = GrGLSLPrettyPrint::PrettyPrintGLSL(strings, lengths , count, true);
98 SkTArray<SkString> lines; 99 SkTArray<SkString> lines;
99 SkStrSplit(pretty.c_str(), "\n", &lines); 100 SkStrSplit(pretty.c_str(), "\n", &lines);
100 for (const SkString& line : lines) { 101 for (const SkString& line : lines) {
101 // Print the shader one line at the time so it doesn't get truncated by the adb log. 102 // Print the shader one line at the time so it doesn't get truncated by the adb log.
102 SkDebugf("%s\n", line.c_str()); 103 SkDebugf("%s\n", line.c_str());
103 } 104 }
104 } 105 }
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