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

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

Issue 2448593002: Remove SkAutoTUnref and SkAutoTDelete from public includes. (Closed)
Patch Set: And Vulcan. Created 4 years, 1 month 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 | « include/ports/SkTypeface_win.h ('k') | include/private/SkMiniRecorder.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 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 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 // TODO if performance becomes an issue, we can move to using SkVarAlloc 127 // TODO if performance becomes an issue, we can move to using SkVarAlloc
128 struct Batch { 128 struct Batch {
129 SkString toJson() const; 129 SkString toJson() const;
130 SkString fName; 130 SkString fName;
131 SkTArray<SkString> fStackTrace; 131 SkTArray<SkString> fStackTrace;
132 SkRect fBounds; 132 SkRect fBounds;
133 int fClientID; 133 int fClientID;
134 int fBatchListID; 134 int fBatchListID;
135 int fChildID; 135 int fChildID;
136 }; 136 };
137 typedef SkTArray<SkAutoTDelete<Batch>, true> BatchPool; 137 typedef SkTArray<std::unique_ptr<Batch>, true> BatchPool;
138 138
139 typedef SkTArray<Batch*> Batches; 139 typedef SkTArray<Batch*> Batches;
140 140
141 struct BatchNode { 141 struct BatchNode {
142 SkString toJson() const; 142 SkString toJson() const;
143 SkRect fBounds; 143 SkRect fBounds;
144 Batches fChildren; 144 Batches fChildren;
145 uint32_t fRenderTargetUniqueID; 145 uint32_t fRenderTargetUniqueID;
146 }; 146 };
147 typedef SkTArray<SkAutoTDelete<BatchNode>, true> BatchList; 147 typedef SkTArray<std::unique_ptr<BatchNode>, true> BatchList;
148 148
149 void copyOutFromBatchList(BatchInfo* outBatchInfo, int batchListID); 149 void copyOutFromBatchList(BatchInfo* outBatchInfo, int batchListID);
150 150
151 template <typename T> 151 template <typename T>
152 static void JsonifyTArray(SkString* json, const char* name, const T& array, 152 static void JsonifyTArray(SkString* json, const char* name, const T& array,
153 bool addComma); 153 bool addComma);
154 154
155 BatchPool fBatchPool; 155 BatchPool fBatchPool;
156 SkTHashMap<uint32_t, int> fIDLookup; 156 SkTHashMap<uint32_t, int> fIDLookup;
157 SkTHashMap<int, Batches*> fClientIDLookup; 157 SkTHashMap<int, Batches*> fClientIDLookup;
158 BatchList fBatchList; 158 BatchList fBatchList;
159 SkTArray<SkString> fCurrentStackTrace; 159 SkTArray<SkString> fCurrentStackTrace;
160 160
161 // The client cas pass in an optional client ID which we will use to mark th e batches 161 // The client cas pass in an optional client ID which we will use to mark th e batches
162 int fClientID; 162 int fClientID;
163 bool fEnabled; 163 bool fEnabled;
164 }; 164 };
(...skipping 12 matching lines...) Expand all
177 #define GR_AUDIT_TRAIL_ADDBATCH(audit_trail, batch) \ 177 #define GR_AUDIT_TRAIL_ADDBATCH(audit_trail, batch) \
178 GR_AUDIT_TRAIL_INVOKE_GUARD(audit_trail, addBatch, batch); 178 GR_AUDIT_TRAIL_INVOKE_GUARD(audit_trail, addBatch, batch);
179 179
180 #define GR_AUDIT_TRAIL_BATCHING_RESULT_COMBINED(audit_trail, combineWith, batch) \ 180 #define GR_AUDIT_TRAIL_BATCHING_RESULT_COMBINED(audit_trail, combineWith, batch) \
181 GR_AUDIT_TRAIL_INVOKE_GUARD(audit_trail, batchingResultCombined, combineWith , batch); 181 GR_AUDIT_TRAIL_INVOKE_GUARD(audit_trail, batchingResultCombined, combineWith , batch);
182 182
183 #define GR_AUDIT_TRAIL_BATCHING_RESULT_NEW(audit_trail, batch) \ 183 #define GR_AUDIT_TRAIL_BATCHING_RESULT_NEW(audit_trail, batch) \
184 // Doesn't do anything now, one day... 184 // Doesn't do anything now, one day...
185 185
186 #endif 186 #endif
OLDNEW
« no previous file with comments | « include/ports/SkTypeface_win.h ('k') | include/private/SkMiniRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698