aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2016-03-01 07:15:52 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-01 07:15:52 -0800
commit1d7decffbc34a438fe5eacda17211a10ba72eac2 (patch)
treeacf697c576ac4584f8c7b4ee705a9b180c9a2342 /src
parentfd5a26080d4647cc913f5f2b2dc72cb35abac3ab (diff)
SkDebugCanvas ignore batch bounds if they are offscreen
Diffstat (limited to 'src')
-rw-r--r--src/gpu/GrAuditTrail.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gpu/GrAuditTrail.cpp b/src/gpu/GrAuditTrail.cpp
index f17ada4881..6b20876807 100644
--- a/src/gpu/GrAuditTrail.cpp
+++ b/src/gpu/GrAuditTrail.cpp
@@ -36,6 +36,7 @@ void GrAuditTrail::batchingResultNew(GrBatch* batch) {
fIDLookup.set(batch, fCurrentBatch->fBatchListID);
BatchNode* batchNode = new BatchNode;
batchNode->fBounds = fCurrentBatch->fBounds;
+ batchNode->fRenderTargetUniqueID = batch->renderTargetUniqueID();
batchNode->fChildren.push_back(fCurrentBatch);
fBatchList.emplace_back(batchNode);
}
@@ -62,6 +63,7 @@ void GrAuditTrail::getBoundsByClientID(SkTArray<BatchInfo>* outInfo, int clientI
// they have a different clientID
const BatchNode* bn = fBatchList[currentBatchListID];
outBatchInfo.fBounds = bn->fBounds;
+ outBatchInfo.fRenderTargetUniqueID = bn->fRenderTargetUniqueID;
for (int j = 0; j < bn->fChildren.count(); j++) {
BatchInfo::Batch& outBatch = outBatchInfo.fBatches.push_back();
const Batch* currentBatch = bn->fChildren[j];
@@ -212,6 +214,7 @@ SkString GrAuditTrail::Batch::toJson() const {
SkString GrAuditTrail::BatchNode::toJson() const {
SkString json;
json.append("{");
+ json.appendf("\"RenderTarget\": \"%u\",", fRenderTargetUniqueID);
skrect_to_json(&json, "Bounds", fBounds);
JsonifyTArray(&json, "Batches", fChildren, true);
json.append("}");