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

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

Issue 1754633002: SkDebugCanvas ignore batch bounds if they are offscreen (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 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 | « no previous file | src/gpu/GrAuditTrail.cpp » ('j') | tools/debugger/SkDebugCanvas.cpp » ('J')
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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 bool isEnabled() { return fEnabled; } 123 bool isEnabled() { return fEnabled; }
124 void setEnabled(bool enabled) { fEnabled = enabled; } 124 void setEnabled(bool enabled) { fEnabled = enabled; }
125 125
126 void setClientID(int clientID) { fClientID = clientID; } 126 void setClientID(int clientID) { fClientID = clientID; }
127 127
128 // We could just return our internal bookkeeping struct if copying the data out becomes 128 // We could just return our internal bookkeeping struct if copying the data out becomes
129 // a performance issue, but until then its nice to decouple 129 // a performance issue, but until then its nice to decouple
130 struct BatchInfo { 130 struct BatchInfo {
131 SkRect fBounds; 131 SkRect fBounds;
132 uint32_t fRenderTargetUniqueID;
132 struct Batch { 133 struct Batch {
133 int fClientID; 134 int fClientID;
134 SkRect fBounds; 135 SkRect fBounds;
135 }; 136 };
136 SkTArray<Batch> fBatches; 137 SkTArray<Batch> fBatches;
137 }; 138 };
138 139
139 void getBoundsByClientID(SkTArray<BatchInfo>* outInfo, int clientID); 140 void getBoundsByClientID(SkTArray<BatchInfo>* outInfo, int clientID);
140 141
141 void fullReset() { 142 void fullReset() {
(...skipping 19 matching lines...) Expand all
161 int fChildID; 162 int fChildID;
162 }; 163 };
163 typedef SkTArray<SkAutoTDelete<Batch>, true> BatchPool; 164 typedef SkTArray<SkAutoTDelete<Batch>, true> BatchPool;
164 165
165 typedef SkTArray<Batch*> Batches; 166 typedef SkTArray<Batch*> Batches;
166 167
167 struct BatchNode { 168 struct BatchNode {
168 SkString toJson() const; 169 SkString toJson() const;
169 SkRect fBounds; 170 SkRect fBounds;
170 Batches fChildren; 171 Batches fChildren;
172 uint32_t fRenderTargetUniqueID;
171 }; 173 };
172 typedef SkTArray<SkAutoTDelete<BatchNode>, true> BatchList; 174 typedef SkTArray<SkAutoTDelete<BatchNode>, true> BatchList;
173 175
174 template <typename T> 176 template <typename T>
175 static void JsonifyTArray(SkString* json, const char* name, const T& array, 177 static void JsonifyTArray(SkString* json, const char* name, const T& array,
176 bool addComma); 178 bool addComma);
177 179
178 Batch* fCurrentBatch; 180 Batch* fCurrentBatch;
179 BatchPool fBatchPool; 181 BatchPool fBatchPool;
180 SkTHashMap<GrBatch*, int> fIDLookup; 182 SkTHashMap<GrBatch*, int> fIDLookup;
(...skipping 20 matching lines...) Expand all
201 #define GR_AUDIT_TRAIL_ADDBATCH(audit_trail, batchname, bounds) \ 203 #define GR_AUDIT_TRAIL_ADDBATCH(audit_trail, batchname, bounds) \
202 GR_AUDIT_TRAIL_INVOKE_GUARD(audit_trail, addBatch, batchname, bounds); 204 GR_AUDIT_TRAIL_INVOKE_GUARD(audit_trail, addBatch, batchname, bounds);
203 205
204 #define GR_AUDIT_TRAIL_BATCHING_RESULT_COMBINED(audit_trail, combiner) \ 206 #define GR_AUDIT_TRAIL_BATCHING_RESULT_COMBINED(audit_trail, combiner) \
205 GR_AUDIT_TRAIL_INVOKE_GUARD(audit_trail, batchingResultCombined, combiner); 207 GR_AUDIT_TRAIL_INVOKE_GUARD(audit_trail, batchingResultCombined, combiner);
206 208
207 #define GR_AUDIT_TRAIL_BATCHING_RESULT_NEW(audit_trail, batch) \ 209 #define GR_AUDIT_TRAIL_BATCHING_RESULT_NEW(audit_trail, batch) \
208 GR_AUDIT_TRAIL_INVOKE_GUARD(audit_trail, batchingResultNew, batch); 210 GR_AUDIT_TRAIL_INVOKE_GUARD(audit_trail, batchingResultNew, batch);
209 211
210 #endif 212 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrAuditTrail.cpp » ('j') | tools/debugger/SkDebugCanvas.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698