OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SKDRAWCOMMAND_H_ | 8 #ifndef SKDRAWCOMMAND_H_ |
9 #define SKDRAWCOMMAND_H_ | 9 #define SKDRAWCOMMAND_H_ |
10 | 10 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 /* Converts a JSON representation of a command into a newly-allocated SkDraw
Command object. It | 116 /* Converts a JSON representation of a command into a newly-allocated SkDraw
Command object. It |
117 * is the caller's responsibility to delete this object. This method may ret
urn null if an error | 117 * is the caller's responsibility to delete this object. This method may ret
urn null if an error |
118 * occurs. | 118 * occurs. |
119 */ | 119 */ |
120 static SkDrawCommand* fromJSON(Json::Value& command, UrlDataManager& urlData
Manager); | 120 static SkDrawCommand* fromJSON(Json::Value& command, UrlDataManager& urlData
Manager); |
121 | 121 |
122 static const char* GetCommandString(OpType type); | 122 static const char* GetCommandString(OpType type); |
123 | 123 |
124 // Helper methods for converting things to JSON | 124 // Helper methods for converting things to JSON |
125 static Json::Value MakeJsonColor(const SkColor color); | 125 static Json::Value MakeJsonColor(const SkColor color); |
| 126 static Json::Value MakeJsonColor4f(const SkColor4f& color); |
126 static Json::Value MakeJsonPoint(const SkPoint& point); | 127 static Json::Value MakeJsonPoint(const SkPoint& point); |
127 static Json::Value MakeJsonPoint(SkScalar x, SkScalar y); | 128 static Json::Value MakeJsonPoint(SkScalar x, SkScalar y); |
128 static Json::Value MakeJsonRect(const SkRect& rect); | 129 static Json::Value MakeJsonRect(const SkRect& rect); |
129 static Json::Value MakeJsonIRect(const SkIRect&); | 130 static Json::Value MakeJsonIRect(const SkIRect&); |
130 static Json::Value MakeJsonMatrix(const SkMatrix&); | 131 static Json::Value MakeJsonMatrix(const SkMatrix&); |
131 static Json::Value MakeJsonScalar(SkScalar); | 132 static Json::Value MakeJsonScalar(SkScalar); |
132 static Json::Value MakeJsonPath(const SkPath& path); | 133 static Json::Value MakeJsonPath(const SkPath& path); |
133 static Json::Value MakeJsonRegion(const SkRegion& region); | 134 static Json::Value MakeJsonRegion(const SkRegion& region); |
134 static Json::Value MakeJsonPaint(const SkPaint& paint, UrlDataManager& urlDa
taManager); | 135 static Json::Value MakeJsonPaint(const SkPaint& paint, UrlDataManager& urlDa
taManager); |
135 | 136 |
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
794 Json::Value toJSON(UrlDataManager& urlDataManager) const override; | 795 Json::Value toJSON(UrlDataManager& urlDataManager) const override; |
795 static SkTranslateZCommand* fromJSON(Json::Value& command, UrlDataManager& u
rlDataManager); | 796 static SkTranslateZCommand* fromJSON(Json::Value& command, UrlDataManager& u
rlDataManager); |
796 | 797 |
797 private: | 798 private: |
798 SkScalar fZTranslate; | 799 SkScalar fZTranslate; |
799 | 800 |
800 typedef SkDrawCommand INHERITED; | 801 typedef SkDrawCommand INHERITED; |
801 }; | 802 }; |
802 #endif | 803 #endif |
803 | 804 |
OLD | NEW |