diff options
author | 2016-03-01 07:47:56 -0800 | |
---|---|---|
committer | 2016-03-01 07:47:56 -0800 | |
commit | df3f2b0948507d20e72b16869f1b2bb1abdf4b40 (patch) | |
tree | cb68b767ae0cd3427e6d2275a57308752b49a892 /include | |
parent | bb7b043b2db64197d2f6a1edaf3562a50c77afb1 (diff) |
Move some GrAuditTrail fuctions to cpp file
TBR=ethannicholas@google.com
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1753753002
Review URL: https://codereview.chromium.org/1753753002
Diffstat (limited to 'include')
-rw-r--r-- | include/private/GrAuditTrail.h | 36 |
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; |