diff options
author | joshualitt <joshualitt@chromium.org> | 2016-02-26 08:22:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-26 08:22:49 -0800 |
commit | 1e5884b066da57a0c5dd9a0f9489b0bb1c3b3c34 (patch) | |
tree | ae9dbfd543884e5584217f252770506ca5f39a00 /tools/skiaserve/Request.h | |
parent | 4ee1cdad526fd8b6bb50d6f9d339b2c782257a8b (diff) |
Wire up /batches in skiaserve
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1737323002
Review URL: https://codereview.chromium.org/1737323002
Diffstat (limited to 'tools/skiaserve/Request.h')
-rw-r--r-- | tools/skiaserve/Request.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/skiaserve/Request.h b/tools/skiaserve/Request.h index a3276fa38b..f6ee994ecd 100644 --- a/tools/skiaserve/Request.h +++ b/tools/skiaserve/Request.h @@ -39,6 +39,14 @@ struct Request { SkCanvas* getCanvas(); SkData* writeCanvasToPng(SkCanvas* canvas); SkBitmap* getBitmapFromCanvas(SkCanvas* canvas); + bool hasPicture() const { return SkToBool(fPicture.get()); } + int getLastOp() const { return fDebugCanvas->getSize() - 1; } + + // Returns the json list of ops as an SkData + SkData* getJsonOps(int n); + + // Returns a json list of batches as an SkData + SkData* getJsonBatchList(int n); // TODO probably want to make this configurable static const int kImageWidth; |