| 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;
|
| }
|
|
|