aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrAuditTrail.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2016-11-11 12:38:40 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2016-11-11 18:24:56 +0000
commit294870ff119b89fc902773643b054f14e5d1f554 (patch)
tree8666a14ff9bd50c9138dcbc6f3331e51b8113268 /src/gpu/GrAuditTrail.cpp
parent498d403f7703cb2157bf3c877b84906db5a06cd4 (diff)
Add explicit UniqueID classes for GrGpuResource & GrSurfaceProxy
This sets the stage for using the Proxy's/RenderTargetContext's ID above the flush and the RenderTarget's/GrGpuResource's below the flush. GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4650 Change-Id: I9f1e6b00c02a0691d90b58c49e1d8c60684884c1 Reviewed-on: https://skia-review.googlesource.com/4650 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/GrAuditTrail.cpp')
-rw-r--r--src/gpu/GrAuditTrail.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/gpu/GrAuditTrail.cpp b/src/gpu/GrAuditTrail.cpp
index ff6debd032..93694cbe10 100644
--- a/src/gpu/GrAuditTrail.cpp
+++ b/src/gpu/GrAuditTrail.cpp
@@ -45,9 +45,8 @@ void GrAuditTrail::addBatch(const GrBatch* batch) {
// We use the batch pointer as a key to find the batchnode we are 'glomming' batches onto
fIDLookup.set(batch->uniqueID(), auditBatch->fBatchListID);
- BatchNode* batchNode = new BatchNode;
+ BatchNode* batchNode = new BatchNode(batch->renderTargetUniqueID());
batchNode->fBounds = batch->bounds();
- batchNode->fRenderTargetUniqueID = batch->renderTargetUniqueID();
batchNode->fChildren.push_back(auditBatch);
fBatchList.emplace_back(batchNode);
}
@@ -290,7 +289,7 @@ SkString GrAuditTrail::Batch::toJson() const {
SkString GrAuditTrail::BatchNode::toJson() const {
SkString json;
json.append("{");
- json.appendf("\"RenderTarget\": \"%u\",", fRenderTargetUniqueID);
+ json.appendf("\"RenderTarget\": \"%u\",", fRenderTargetUniqueID.asUInt());
skrect_to_json(&json, "Bounds", fBounds);
JsonifyTArray(&json, "Batches", fChildren, true);
json.append("}");