aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/debugger
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2016-03-08 10:43:41 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-03-08 10:43:42 -0800
commitb0666ad3a9e99ce1a6e6d9ea69ff9f1ddbe74594 (patch)
tree001b9a724edb773a657ced2446fdb9db996fcc17 /tools/debugger
parentd8a4f772115bbb9d50c0e73613bdd879833da690 (diff)
Fix up GrAuditTrail to allow arbitrary reordering
Diffstat (limited to 'tools/debugger')
-rw-r--r--tools/debugger/SkDebugCanvas.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp
index 9915c1baa2..7bb70c2940 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