aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/debugger/SkDebugCanvas.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2016-02-11 07:09:51 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-11 07:09:51 -0800
commitdb6a254bdcf6884db172f716966d7787e0d6f264 (patch)
tree41b26c2735e1b65adabbe870c0b6b0237b55280a /tools/debugger/SkDebugCanvas.cpp
parent860fc696d7020e59904f15a7d89b596a135bade8 (diff)
wire up new json code in skiaserve
Diffstat (limited to 'tools/debugger/SkDebugCanvas.cpp')
-rw-r--r--tools/debugger/SkDebugCanvas.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp
index d8d51fe0ac..8b71c0fb2c 100644
--- a/tools/debugger/SkDebugCanvas.cpp
+++ b/tools/debugger/SkDebugCanvas.cpp
@@ -318,11 +318,11 @@ SkTDArray <SkDrawCommand*>& SkDebugCanvas::getDrawCommands() {
return fCommandVector;
}
-Json::Value SkDebugCanvas::toJSON(UrlDataManager& urlDataManager) {
+Json::Value SkDebugCanvas::toJSON(UrlDataManager& urlDataManager, int n) {
Json::Value result = Json::Value(Json::objectValue);
result[SKDEBUGCANVAS_ATTRIBUTE_VERSION] = Json::Value(SKDEBUGCANVAS_VERSION);
Json::Value commands = Json::Value(Json::arrayValue);
- for (int i = 0; i < this->getSize(); i++) {
+ for (int i = 0; i < this->getSize() && i < n; i++) {
commands[i] = this->getDrawCommandAt(i)->toJSON();
}
result[SKDEBUGCANVAS_ATTRIBUTE_COMMANDS] = commands;