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

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

Issue 196133033: replace old SK_TRACE_EVENT macros with new TRACE_EVENT ones (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: remove old trace events Created 6 years, 9 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/GrDefaultPathRenderer.cpp ('k') | src/utils/SkDebugTrace.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 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"
11 #include "GrCoordTransform.h" 11 #include "GrCoordTransform.h"
12 #include "GrDrawEffect.h" 12 #include "GrDrawEffect.h"
13 #include "GrGpuGL.h" 13 #include "GrGpuGL.h"
14 #include "GrTexture.h" 14 #include "GrTexture.h"
15 #include "SkRTConf.h" 15 #include "SkRTConf.h"
16 #include "SkTrace.h" 16 #include "SkTraceEvent.h"
17 17
18 #define GL_CALL(X) GR_GL_CALL(this->gpu()->glInterface(), X) 18 #define GL_CALL(X) GR_GL_CALL(this->gpu()->glInterface(), X)
19 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(this->gpu()->glInterface(), R, X) 19 #define GL_CALL_RET(R, X) GR_GL_CALL_RET(this->gpu()->glInterface(), R, X)
20 20
21 // number of each input/output type in a single allocation block 21 // number of each input/output type in a single allocation block
22 static const int kVarsPerBlock = 8; 22 static const int kVarsPerBlock = 8;
23 23
24 // except FS outputs where we expect 2 at most. 24 // except FS outputs where we expect 2 at most.
25 static const int kMaxFSOutputs = 2; 25 static const int kMaxFSOutputs = 2;
26 26
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 if (!fHasSecondaryOutput) { 563 if (!fHasSecondaryOutput) {
564 fFSOutputs.push_back().set(kVec4f_GrSLType, 564 fFSOutputs.push_back().set(kVec4f_GrSLType,
565 GrGLShaderVar::kOut_TypeModifier, 565 GrGLShaderVar::kOut_TypeModifier,
566 dual_source_output_name()); 566 dual_source_output_name());
567 fHasSecondaryOutput = true; 567 fHasSecondaryOutput = true;
568 } 568 }
569 return dual_source_output_name(); 569 return dual_source_output_name();
570 } 570 }
571 571
572 bool GrGLShaderBuilder::finish(GrGLuint* outProgramId) { 572 bool GrGLShaderBuilder::finish(GrGLuint* outProgramId) {
573 SK_TRACE_EVENT0("GrGLShaderBuilder::finish");
574
575 GrGLuint programId = 0; 573 GrGLuint programId = 0;
576 GL_CALL_RET(programId, CreateProgram()); 574 GL_CALL_RET(programId, CreateProgram());
577 if (!programId) { 575 if (!programId) {
578 return false; 576 return false;
579 } 577 }
580 578
581 SkTDArray<GrGLuint> shadersToDelete; 579 SkTDArray<GrGLuint> shadersToDelete;
582 580
583 if (!this->compileAndAttachShaders(programId, &shadersToDelete)) { 581 if (!this->compileAndAttachShaders(programId, &shadersToDelete)) {
584 GL_CALL(DeleteProgram(programId)); 582 GL_CALL(DeleteProgram(programId));
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 GrGLSLExpr4* inOutFSColor) { 990 GrGLSLExpr4* inOutFSColor) {
993 991
994 GrGLTexGenProgramEffectsBuilder texGenEffectsBuilder(this, effectCnt); 992 GrGLTexGenProgramEffectsBuilder texGenEffectsBuilder(this, effectCnt);
995 this->INHERITED::createAndEmitEffects(&texGenEffectsBuilder, 993 this->INHERITED::createAndEmitEffects(&texGenEffectsBuilder,
996 effectStages, 994 effectStages,
997 effectKeys, 995 effectKeys,
998 effectCnt, 996 effectCnt,
999 inOutFSColor); 997 inOutFSColor);
1000 return texGenEffectsBuilder.finish(); 998 return texGenEffectsBuilder.finish();
1001 } 999 }
OLDNEW
« no previous file with comments | « src/gpu/GrDefaultPathRenderer.cpp ('k') | src/utils/SkDebugTrace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698