diff options
author | brianosman <brianosman@google.com> | 2016-04-15 11:00:51 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-15 11:00:51 -0700 |
commit | 1c9f9228e5dae355cbcdf6c4e6a10dc92ad6fe47 (patch) | |
tree | 37cf708f3892cd0888ca65a1eebda28ffe8a45f5 /tools/debugger | |
parent | 2a04104ba0c40ea31f6bcf403bd69fda05935e5b (diff) |
Fix skiaserve crash when displaying batch bounds
In my test case, the first actual batch would combine with the clear
issued before auditing had been enabled. After the successful combine,
we would try to inform the audit manager, but it didn't know about the
batch, triggering an assert (and subsequent crash). Fix is ijust to
ensure that no prior batches are pending when we turn on auditing.
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1894633002
Review URL: https://codereview.chromium.org/1894633002
Diffstat (limited to 'tools/debugger')
-rw-r--r-- | tools/debugger/SkDebugCanvas.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp index 123b9b4aa8..6b629c8959 100644 --- a/tools/debugger/SkDebugCanvas.cpp +++ b/tools/debugger/SkDebugCanvas.cpp @@ -239,6 +239,11 @@ void SkDebugCanvas::drawTo(SkCanvas* canvas, int index, int m) { } #if SK_SUPPORT_GPU + // We need to flush any pending operations, or they might batch with commands below. + // Previous operations were not registered with the audit trail when they were + // created, so if we allow them to combine, the audit trail will fail to find them. + canvas->flush(); + GrAuditTrail::AutoCollectBatches* acb = nullptr; if (at) { acb = new GrAuditTrail::AutoCollectBatches(at, i); |