OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 The Android Open Source Project |
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 SkPicture_DEFINED | 8 #ifndef SkPicture_DEFINED |
9 #define SkPicture_DEFINED | 9 #define SkPicture_DEFINED |
10 | 10 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 /** Return a cull rect for this picture. | 96 /** Return a cull rect for this picture. |
97 Ops recorded into this picture that attempt to draw outside the cull mig ht not be drawn. | 97 Ops recorded into this picture that attempt to draw outside the cull mig ht not be drawn. |
98 */ | 98 */ |
99 virtual SkRect cullRect() const = 0; | 99 virtual SkRect cullRect() const = 0; |
100 | 100 |
101 /** Returns a non-zero value unique among all pictures. */ | 101 /** Returns a non-zero value unique among all pictures. */ |
102 uint32_t uniqueID() const; | 102 uint32_t uniqueID() const; |
103 | 103 |
104 /** | 104 /** |
105 * Serialize to a stream. If non NULL, serializer will be used to serialize | 105 * Serialize to a stream. If non NULL, serializer will be used to serialize |
106 * any bitmaps in the picture. | 106 * bitmaps and images in the picture. |
scroggo
2015/09/04 18:48:20
I like that we turn bitmaps into images! I was thi
| |
107 * | |
108 * TODO: Use serializer to serialize SkImages as well. | |
109 */ | 107 */ |
110 void serialize(SkWStream*, SkPixelSerializer* = NULL) const; | 108 void serialize(SkWStream*, SkPixelSerializer* = NULL) const; |
111 | 109 |
112 /** | 110 /** |
113 * Serialize to a buffer. | 111 * Serialize to a buffer. |
114 */ | 112 */ |
115 void flatten(SkWriteBuffer&) const; | 113 void flatten(SkWriteBuffer&) const; |
116 | 114 |
117 /** | 115 /** |
118 * Returns true if any bitmaps may be produced when this SkPicture | 116 * Returns true if any bitmaps may be produced when this SkPicture |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
197 static bool IsValidPictInfo(const SkPictInfo& info); | 195 static bool IsValidPictInfo(const SkPictInfo& info); |
198 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); | 196 static SkPicture* Forwardport(const SkPictInfo&, const SkPictureData*); |
199 | 197 |
200 SkPictInfo createHeader() const; | 198 SkPictInfo createHeader() const; |
201 SkPictureData* backport() const; | 199 SkPictureData* backport() const; |
202 | 200 |
203 mutable uint32_t fUniqueID; | 201 mutable uint32_t fUniqueID; |
204 }; | 202 }; |
205 | 203 |
206 #endif | 204 #endif |
OLD | NEW |