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

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: 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
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"); 573 TRACE_EVENT0("skia.ganesh", "GrGLShaderBuilder::finish");
574 574
575 GrGLuint programId = 0; 575 GrGLuint programId = 0;
576 GL_CALL_RET(programId, CreateProgram()); 576 GL_CALL_RET(programId, CreateProgram());
577 if (!programId) { 577 if (!programId) {
578 return false; 578 return false;
579 } 579 }
580 580
581 SkTDArray<GrGLuint> shadersToDelete; 581 SkTDArray<GrGLuint> shadersToDelete;
582 582
583 if (!this->compileAndAttachShaders(programId, &shadersToDelete)) { 583 if (!this->compileAndAttachShaders(programId, &shadersToDelete)) {
(...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 GrGLSLExpr4* inOutFSColor) { 992 GrGLSLExpr4* inOutFSColor) {
993 993
994 GrGLTexGenProgramEffectsBuilder texGenEffectsBuilder(this, effectCnt); 994 GrGLTexGenProgramEffectsBuilder texGenEffectsBuilder(this, effectCnt);
995 this->INHERITED::createAndEmitEffects(&texGenEffectsBuilder, 995 this->INHERITED::createAndEmitEffects(&texGenEffectsBuilder,
996 effectStages, 996 effectStages,
997 effectKeys, 997 effectKeys,
998 effectCnt, 998 effectCnt,
999 inOutFSColor); 999 inOutFSColor);
1000 return texGenEffectsBuilder.finish(); 1000 return texGenEffectsBuilder.finish();
1001 } 1001 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698