aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/skiaserve/Request.h
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2016-02-26 08:22:49 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-26 08:22:49 -0800
commit1e5884b066da57a0c5dd9a0f9489b0bb1c3b3c34 (patch)
treeae9dbfd543884e5584217f252770506ca5f39a00 /tools/skiaserve/Request.h
parent4ee1cdad526fd8b6bb50d6f9d339b2c782257a8b (diff)
Wire up /batches in skiaserve
Diffstat (limited to 'tools/skiaserve/Request.h')
-rw-r--r--tools/skiaserve/Request.h8
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;