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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 */ | 132 */ |
133 virtual bool willPlayBackBitmaps() const = 0; | 133 virtual bool willPlayBackBitmaps() const = 0; |
134 | 134 |
135 /** Return the approximate number of operations in this picture. This | 135 /** Return the approximate number of operations in this picture. This |
136 * number may be greater or less than the number of SkCanvas calls | 136 * number may be greater or less than the number of SkCanvas calls |
137 * recorded: some calls may be recorded as more than one operation, or some | 137 * recorded: some calls may be recorded as more than one operation, or some |
138 * calls may be optimized away. | 138 * calls may be optimized away. |
139 */ | 139 */ |
140 virtual int approximateOpCount() const = 0; | 140 virtual int approximateOpCount() const = 0; |
141 | 141 |
142 /** Return true if this picture contains text. | |
143 */ | |
144 virtual bool hasText() const = 0; | |
145 | |
146 /** Returns the approximate byte size of this picture, not including large r
ef'd objects. */ | 142 /** Returns the approximate byte size of this picture, not including large r
ef'd objects. */ |
147 virtual size_t approximateBytesUsed() const = 0; | 143 virtual size_t approximateBytesUsed() const = 0; |
148 | 144 |
149 /** Return true if the SkStream/Buffer represents a serialized picture, and | 145 /** Return true if the SkStream/Buffer represents a serialized picture, and |
150 fills out SkPictInfo. After this function returns, the data source is no
t | 146 fills out SkPictInfo. After this function returns, the data source is no
t |
151 rewound so it will have to be manually reset before passing to | 147 rewound so it will have to be manually reset before passing to |
152 CreateFromStream or CreateFromBuffer. Note, CreateFromStream and | 148 CreateFromStream or CreateFromBuffer. Note, CreateFromStream and |
153 CreateFromBuffer perform this check internally so these entry points are | 149 CreateFromBuffer perform this check internally so these entry points are |
154 intended for stand alone tools. | 150 intended for stand alone tools. |
155 If false is returned, SkPictInfo is unmodified. | 151 If false is returned, SkPictInfo is unmodified. |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
226 const SkPictureData*, | 222 const SkPictureData*, |
227 const SkReadBuffer* buffer); | 223 const SkReadBuffer* buffer); |
228 | 224 |
229 SkPictInfo createHeader() const; | 225 SkPictInfo createHeader() const; |
230 SkPictureData* backport() const; | 226 SkPictureData* backport() const; |
231 | 227 |
232 mutable uint32_t fUniqueID; | 228 mutable uint32_t fUniqueID; |
233 }; | 229 }; |
234 | 230 |
235 #endif | 231 #endif |
OLD | NEW |