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

Side by Side Diff: include/private/GrAuditTrail.h

Issue 1704133002: fix comma in GrAuditTrail json (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 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 | src/gpu/GrAuditTrail.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 2016 Google Inc. 2 * Copyright 2016 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 #ifndef GrAuditTrail_DEFINED 8 #ifndef GrAuditTrail_DEFINED
9 #define GrAuditTrail_DEFINED 9 #define GrAuditTrail_DEFINED
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 struct Frame : public Event { 85 struct Frame : public Event {
86 SkString toJson() const override; 86 SkString toJson() const override;
87 FrameArray fChildren; 87 FrameArray fChildren;
88 }; 88 };
89 89
90 struct Batch : public Event { 90 struct Batch : public Event {
91 SkString toJson() const override; 91 SkString toJson() const override;
92 SkRect fBounds; 92 SkRect fBounds;
93 }; 93 };
94 94
95 static void JsonifyTArray(SkString* json, const char* name, const FrameArray & array); 95 static void JsonifyTArray(SkString* json, const char* name, const FrameArray & array,
96 bool addComma);
96 97
97 FrameArray fFrames; 98 FrameArray fFrames;
98 SkTArray<Frame*> fStack; 99 SkTArray<Frame*> fStack;
99 uint64_t fUniqueID; 100 uint64_t fUniqueID;
100 }; 101 };
101 102
102 #define GR_AUDIT_TRAIL_INVOKE_GUARD(invoke, ...) \ 103 #define GR_AUDIT_TRAIL_INVOKE_GUARD(invoke, ...) \
103 if (GR_BATCH_DEBUGGING_OUTPUT) { \ 104 if (GR_BATCH_DEBUGGING_OUTPUT) { \
104 invoke(__VA_ARGS__); \ 105 invoke(__VA_ARGS__); \
105 } 106 }
106 107
107 #define GR_AUDIT_TRAIL_AUTO_FRAME(audit_trail, framename) \ 108 #define GR_AUDIT_TRAIL_AUTO_FRAME(audit_trail, framename) \
108 GrAuditTrail::AutoFrame SK_MACRO_APPEND_LINE(auto_frame)(audit_trail, framen ame); 109 GrAuditTrail::AutoFrame SK_MACRO_APPEND_LINE(auto_frame)(audit_trail, framen ame);
109 110
110 #define GR_AUDIT_TRAIL_RESET(audit_trail) \ 111 #define GR_AUDIT_TRAIL_RESET(audit_trail) \
111 GR_AUDIT_TRAIL_INVOKE_GUARD(audit_trail->reset); 112 GR_AUDIT_TRAIL_INVOKE_GUARD(audit_trail->reset);
112 113
113 #define GR_AUDIT_TRAIL_ADDBATCH(audit_trail, batchname, bounds) \ 114 #define GR_AUDIT_TRAIL_ADDBATCH(audit_trail, batchname, bounds) \
114 GR_AUDIT_TRAIL_INVOKE_GUARD(audit_trail->addBatch, batchname, bounds); 115 GR_AUDIT_TRAIL_INVOKE_GUARD(audit_trail->addBatch, batchname, bounds);
115 116
116 #endif 117 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrAuditTrail.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698