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

Unified Diff: src/gpu/GrAuditTrail.cpp

Issue 1754633002: SkDebugCanvas ignore batch bounds if they are offscreen (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: src/gpu/GrAuditTrail.cpp
diff --git a/src/gpu/GrAuditTrail.cpp b/src/gpu/GrAuditTrail.cpp
index f17ada48819453c7d7173cb2358ac11f0424c657..6b20876807406a42e8c47cc2e7823f98dd599c1c 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("}");

Powered by Google App Engine
This is Rietveld 408576698