diff options
author | joshualitt <joshualitt@chromium.org> | 2016-02-29 11:38:11 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-29 11:38:11 -0800 |
commit | 3a9be690772f0417df2abe318c71e9b2fec0f8c5 (patch) | |
tree | edbea59079b8f4cc6159a60d3a195486c5b7338e /tools/skiaserve | |
parent | 89685d9112cfdffb35d14fb18ddff38a18729587 (diff) |
Fixup some of the batch info in skiaserve
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1750653002
Review URL: https://codereview.chromium.org/1750653002
Diffstat (limited to 'tools/skiaserve')
-rw-r--r-- | tools/skiaserve/Request.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/skiaserve/Request.cpp b/tools/skiaserve/Request.cpp index 98b3b030c6..a893d0a1dd 100644 --- a/tools/skiaserve/Request.cpp +++ b/tools/skiaserve/Request.cpp @@ -149,6 +149,9 @@ bool Request::initPictureFromStream(SkStream* stream) { // pour picture into debug canvas fDebugCanvas.reset(new SkDebugCanvas(kImageWidth, Request::kImageHeight)); fDebugCanvas->drawPicture(fPicture); + + // for some reason we need to 'flush' the debug canvas by drawing all of the ops + fDebugCanvas->drawTo(this->getCanvas(), this->getLastOp()); return true; } @@ -194,13 +197,14 @@ SkData* Request::getJsonBatchList(int n) { // a Json::Value and is only compiled in this file Json::Value parsedFromString; #if SK_SUPPORT_GPU + // we use the toJSON method on debug canvas, but then just ignore the results and pull + // the information we care about from the audit trail + fDebugCanvas->toJSON(fUrlDataManager, n, canvas); + GrAuditTrail* at = this->getAuditTrail(canvas); GrAuditTrail::AutoManageBatchList enable(at); - - fDebugCanvas->drawTo(canvas, n); - Json::Reader reader; - SkDEBUGCODE(bool parsingSuccessful = )reader.parse(at->toJson(true).c_str(), + SkDEBUGCODE(bool parsingSuccessful = )reader.parse(at->toJson().c_str(), parsedFromString); SkASSERT(parsingSuccessful); #endif |