OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 SkRemote_DEFINED | 8 #ifndef SkRemote_DEFINED |
9 #define SkRemote_DEFINED | 9 #define SkRemote_DEFINED |
10 | 10 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 virtual void undefine(ID) = 0; | 84 virtual void undefine(ID) = 0; |
85 | 85 |
86 // TODO: do these all belong here in CommonIDs? | 86 // TODO: do these all belong here in CommonIDs? |
87 struct CommonIDs { | 87 struct CommonIDs { |
88 ID misc, patheffect, shader, xfermode, maskfilter, | 88 ID misc, patheffect, shader, xfermode, maskfilter, |
89 colorfilter, rasterizer, looper, imagefilter, annotation; | 89 colorfilter, rasterizer, looper, imagefilter, annotation; |
90 }; | 90 }; |
91 | 91 |
92 virtual void save() = 0; | 92 virtual void save() = 0; |
93 virtual void restore() = 0; | 93 virtual void restore() = 0; |
94 virtual void saveLayer(ID bounds, CommonIDs, SkCanvas::SaveFlags) = 0; | 94 virtual void saveLayer(ID bounds, CommonIDs, uint32_t saveLayerFlags) =
0; |
95 | 95 |
96 virtual void setMatrix(ID matrix) = 0; | 96 virtual void setMatrix(ID matrix) = 0; |
97 | 97 |
98 virtual void clipPath(ID path, SkRegion::Op, bool aa) = 0; | 98 virtual void clipPath(ID path, SkRegion::Op, bool aa) = 0; |
99 virtual void fillPath(ID path, CommonIDs) = 0; | 99 virtual void fillPath(ID path, CommonIDs) = 0; |
100 virtual void strokePath(ID path, CommonIDs, ID stroke) = 0; | 100 virtual void strokePath(ID path, CommonIDs, ID stroke) = 0; |
101 virtual void fillText(ID text, SkPoint, CommonIDs) = 0; | 101 virtual void fillText(ID text, SkPoint, CommonIDs) = 0; |
102 virtual void strokeText(ID text, SkPoint, CommonIDs, ID stroke) = 0; | 102 virtual void strokeText(ID text, SkPoint, CommonIDs, ID stroke) = 0; |
103 }; | 103 }; |
104 | 104 |
105 // None of these factories take ownership of their arguments. | 105 // None of these factories take ownership of their arguments. |
106 | 106 |
107 // Returns a new SkCanvas that translates to the Encoder API. | 107 // Returns a new SkCanvas that translates to the Encoder API. |
108 SkCanvas* NewCanvas(Encoder*); | 108 SkCanvas* NewCanvas(Encoder*); |
109 // Returns an Encoder that translates back to the SkCanvas API. | 109 // Returns an Encoder that translates back to the SkCanvas API. |
110 Encoder* NewDecoder(SkCanvas*); | 110 Encoder* NewDecoder(SkCanvas*); |
111 // Wraps another Encoder with a cache. TODO: parameterize | 111 // Wraps another Encoder with a cache. TODO: parameterize |
112 Encoder* NewCachingEncoder(Encoder*); | 112 Encoder* NewCachingEncoder(Encoder*); |
113 | 113 |
114 } // namespace SkRemote | 114 } // namespace SkRemote |
115 | 115 |
116 #endif//SkRemote_DEFINED | 116 #endif//SkRemote_DEFINED |
OLD | NEW |