Index: tools/debugger/SkDebugCanvas.cpp |
diff --git a/tools/debugger/SkDebugCanvas.cpp b/tools/debugger/SkDebugCanvas.cpp |
index 89e53e1e7cbb8a91f9867bdaa30f9a9242b12a2d..9c0465d928a83fd281131e0aa480f126b167eb57 100644 |
--- a/tools/debugger/SkDebugCanvas.cpp |
+++ b/tools/debugger/SkDebugCanvas.cpp |
@@ -331,12 +331,12 @@ SkTDArray <SkDrawCommand*>& SkDebugCanvas::getDrawCommands() { |
return fCommandVector; |
} |
-Json::Value SkDebugCanvas::toJSON(UrlDataManager& urlDataManager, int n) { |
+Json::Value SkDebugCanvas::toJSON(UrlDataManager& urlDataManager, int n, SkCanvas* canvas) { |
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 <= n; i++) { |
- commands[i] = this->getDrawCommandAt(i)->toJSON(urlDataManager); |
+ commands[i] = this->getDrawCommandAt(i)->drawToAndCollectJSON(canvas, urlDataManager); |
} |
result[SKDEBUGCANVAS_ATTRIBUTE_COMMANDS] = commands; |
return result; |