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

Side by Side Diff: src/gpu/gl/GrGLShaderBuilder.cpp

Issue 368943002: Add Instant Trace Event for shader compilation in gpu which outputs shader text as attribute (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 5 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 2012 Google Inc. 2 * Copyright 2012 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 "gl/GrGLShaderBuilder.h" 8 #include "gl/GrGLShaderBuilder.h"
9 #include "gl/GrGLProgram.h" 9 #include "gl/GrGLProgram.h"
10 #include "gl/GrGLUniformHandle.h" 10 #include "gl/GrGLUniformHandle.h"
(...skipping 749 matching lines...) Expand 10 before | Expand all | Expand 10 after
760 GR_GL_CALL(gli, GetShaderInfoLog(shaderId, infoLen+1, 760 GR_GL_CALL(gli, GetShaderInfoLog(shaderId, infoLen+1,
761 &length, (char*)log.get())); 761 &length, (char*)log.get()));
762 GrPrintf(shaderSrc.c_str()); 762 GrPrintf(shaderSrc.c_str());
763 GrPrintf("\n%s", log.get()); 763 GrPrintf("\n%s", log.get());
764 } 764 }
765 SkDEBUGFAIL("Shader compilation failed!"); 765 SkDEBUGFAIL("Shader compilation failed!");
766 GR_GL_CALL(gli, DeleteShader(shaderId)); 766 GR_GL_CALL(gli, DeleteShader(shaderId));
767 return 0; 767 return 0;
768 } 768 }
769 } 769 }
770
771 TRACE_EVENT_INSTANT1(TRACE_DISABLED_BY_DEFAULT("skia.gpu"), "skia_gpu::GLSha der",
772 TRACE_EVENT_SCOPE_THREAD, "shader", TRACE_STR_COPY(shad erSrc.c_str()));
770 if (c_PrintShaders) { 773 if (c_PrintShaders) {
771 GrPrintf(shaderSrc.c_str()); 774 GrPrintf(shaderSrc.c_str());
772 GrPrintf("\n"); 775 GrPrintf("\n");
773 } 776 }
774 777
775 // Attach the shader, but defer deletion until after we have linked the prog ram. 778 // Attach the shader, but defer deletion until after we have linked the prog ram.
776 // This works around a bug in the Android emulator's GLES2 wrapper which 779 // This works around a bug in the Android emulator's GLES2 wrapper which
777 // will immediately delete the shader object and free its memory even though it's 780 // will immediately delete the shader object and free its memory even though it's
778 // attached to a program, which then causes glLinkProgram to fail. 781 // attached to a program, which then causes glLinkProgram to fail.
779 GR_GL_CALL(gli, AttachShader(programId, shaderId)); 782 GR_GL_CALL(gli, AttachShader(programId, shaderId));
(...skipping 316 matching lines...) Expand 10 before | Expand all | Expand 10 after
1096 1099
1097 GrGLPathTexGenProgramEffectsBuilder pathTexGenEffectsBuilder(this, 1100 GrGLPathTexGenProgramEffectsBuilder pathTexGenEffectsBuilder(this,
1098 effectCnt); 1101 effectCnt);
1099 this->INHERITED::createAndEmitEffects(&pathTexGenEffectsBuilder, 1102 this->INHERITED::createAndEmitEffects(&pathTexGenEffectsBuilder,
1100 effectStages, 1103 effectStages,
1101 effectKeys, 1104 effectKeys,
1102 effectCnt, 1105 effectCnt,
1103 inOutFSColor); 1106 inOutFSColor);
1104 return pathTexGenEffectsBuilder.finish(); 1107 return pathTexGenEffectsBuilder.finish();
1105 } 1108 }
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