Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: tools/json/SkJSONCanvas.cpp

Issue 1662003002: Modify skia serve to return clip rect and view matrix (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: todo Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/json/SkJSONCanvas.h ('k') | tools/skiaserve/skiaserve.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/json/SkJSONCanvas.cpp
diff --git a/tools/json/SkJSONCanvas.cpp b/tools/json/SkJSONCanvas.cpp
index efc4acd1a319013a84a8611a65e4b962d3ee9faa..2272f881520bb38fa433a6cca3f0683567f75e97 100644
--- a/tools/json/SkJSONCanvas.cpp
+++ b/tools/json/SkJSONCanvas.cpp
@@ -382,7 +382,16 @@ Json::Value SkJSONCanvas::makePaint(const SkPaint& paint) {
return result;
}
-Json::Value SkJSONCanvas::makeMatrix(const SkMatrix& matrix) {
+Json::Value SkJSONCanvas::MakeIRect(const SkIRect& rect) {
+ Json::Value result(Json::arrayValue);
+ result.append(Json::Value(rect.left()));
+ result.append(Json::Value(rect.top()));
+ result.append(Json::Value(rect.right()));
+ result.append(Json::Value(rect.bottom()));
+ return result;
+}
+
+Json::Value SkJSONCanvas::MakeMatrix(const SkMatrix& matrix) {
Json::Value result(Json::arrayValue);
Json::Value row1(Json::arrayValue);
row1.append(Json::Value(matrix[0]));
@@ -441,7 +450,7 @@ void SkJSONCanvas::updateMatrix() {
if (matrix != fLastMatrix) {
Json::Value command(Json::objectValue);
command[SKJSONCANVAS_COMMAND] = Json::Value(SKJSONCANVAS_COMMAND_MATRIX);
- command[SKJSONCANVAS_ATTRIBUTE_MATRIX] = this->makeMatrix(matrix);
+ command[SKJSONCANVAS_ATTRIBUTE_MATRIX] = MakeMatrix(matrix);
fCommands.append(command);
fLastMatrix = matrix;
}
« no previous file with comments | « tools/json/SkJSONCanvas.h ('k') | tools/skiaserve/skiaserve.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698