aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2016-03-01 07:47:56 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-01 07:47:56 -0800
commitdf3f2b0948507d20e72b16869f1b2bb1abdf4b40 (patch)
treecb68b767ae0cd3427e6d2275a57308752b49a892 /include
parentbb7b043b2db64197d2f6a1edaf3562a50c77afb1 (diff)
Move some GrAuditTrail fuctions to cpp file
Diffstat (limited to 'include')
-rw-r--r--include/private/GrAuditTrail.h36
1 files changed, 2 insertions, 34 deletions
diff --git a/include/private/GrAuditTrail.h b/include/private/GrAuditTrail.h
index 14873cd78c..dab6fe7353 100644
--- a/include/private/GrAuditTrail.h
+++ b/include/private/GrAuditTrail.h
@@ -79,31 +79,7 @@ public:
GrAuditTrail* fAuditTrail;
};
- void addBatch(const char* name, const SkRect& bounds) {
- SkASSERT(fEnabled);
- Batch* batch = new Batch;
- fBatchPool.emplace_back(batch);
- batch->fName = name;
- batch->fBounds = bounds;
- batch->fClientID = kGrAuditTrailInvalidID;
- batch->fBatchListID = kGrAuditTrailInvalidID;
- batch->fChildID = kGrAuditTrailInvalidID;
- fCurrentBatch = batch;
-
- if (fClientID != kGrAuditTrailInvalidID) {
- batch->fClientID = fClientID;
- Batches** batchesLookup = fClientIDLookup.find(fClientID);
- Batches* batches = nullptr;
- if (!batchesLookup) {
- batches = new Batches;
- fClientIDLookup.set(fClientID, batches);
- } else {
- batches = *batchesLookup;
- }
-
- batches->push_back(fCurrentBatch);
- }
- }
+ void addBatch(const char* name, const SkRect& bounds);
void batchingResultCombined(GrBatch* combiner);
@@ -139,15 +115,7 @@ public:
void getBoundsByClientID(SkTArray<BatchInfo>* outInfo, int clientID);
- void fullReset() {
- SkASSERT(fEnabled);
- fBatchList.reset();
- fIDLookup.reset();
- // free all client batches
- fClientIDLookup.foreach([](const int&, Batches** batches) { delete *batches; });
- fClientIDLookup.reset();
- fBatchPool.reset(); // must be last, frees all of the memory
- }
+ void fullReset();
static const int kGrAuditTrailInvalidID;