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

Unified Diff: tools/debugger/SkDebugCanvas.cpp

Issue 1765123002: Fix up GrAuditTrail to allow arbitrary reordering (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: fix up audit trail Created 4 years, 9 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
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | tools/skiaserve/Request.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/debugger/SkDebugCanvas.cpp
diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp
index 9915c1baa20ee409df928018a35e8e55adadcec9..7bb70c29405730082cdd3c49afd15abbcc8001b8 100644
--- a/tools/debugger/SkDebugCanvas.cpp
+++ b/tools/debugger/SkDebugCanvas.cpp
@@ -334,6 +334,7 @@ void SkDebugCanvas::drawTo(SkCanvas* canvas, int index, int m) {
if (at) {
// just in case there is global reordering, we flush the canvas before querying
// GrAuditTrail
+ GrAuditTrail::AutoEnable ae(at);
canvas->flush();
// we pick three colorblind-safe colors, 75% alpha
@@ -347,7 +348,6 @@ void SkDebugCanvas::drawTo(SkCanvas* canvas, int index, int m) {
uint32_t rtID = gbd->accessRenderTarget()->getUniqueID();
// get the bounding boxes to draw
- GrAuditTrail::AutoEnable ae(at);
SkTArray<GrAuditTrail::BatchInfo> childrenBounds;
if (m == -1) {
at->getBoundsByClientID(&childrenBounds, index);
@@ -434,7 +434,10 @@ Json::Value SkDebugCanvas::toJSON(UrlDataManager& urlDataManager, int n, SkCanva
}
// in case there is some kind of global reordering
- canvas->flush();
+ {
+ GrAuditTrail::AutoEnable ae(at);
+ canvas->flush();
+ }
}
}
#endif
@@ -459,6 +462,7 @@ Json::Value SkDebugCanvas::toJSON(UrlDataManager& urlDataManager, int n, SkCanva
}
#if SK_SUPPORT_GPU
if (at) {
+ GrAuditTrail::AutoEnable ae(at);
at->fullReset();
}
#endif
« no previous file with comments | « src/gpu/GrDrawTarget.cpp ('k') | tools/skiaserve/Request.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698