| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2007 The Android Open Source Project | 3 * Copyright 2007 The Android Open Source Project |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 | 9 |
| 10 #ifndef SkPicture_DEFINED | 10 #ifndef SkPicture_DEFINED |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 */ | 182 */ |
| 183 typedef SkData* (*EncodeBitmap)(size_t* pixelRefOffset, const SkBitmap& bm); | 183 typedef SkData* (*EncodeBitmap)(size_t* pixelRefOffset, const SkBitmap& bm); |
| 184 | 184 |
| 185 /** | 185 /** |
| 186 * Serialize to a stream. If non NULL, encoder will be used to encode | 186 * Serialize to a stream. If non NULL, encoder will be used to encode |
| 187 * any bitmaps in the picture. | 187 * any bitmaps in the picture. |
| 188 * encoder will never be called with a NULL pixelRefOffset. | 188 * encoder will never be called with a NULL pixelRefOffset. |
| 189 */ | 189 */ |
| 190 void serialize(SkWStream*, EncodeBitmap encoder = NULL) const; | 190 void serialize(SkWStream*, EncodeBitmap encoder = NULL) const; |
| 191 | 191 |
| 192 /** | |
| 193 * @Deprecated | |
| 194 * Old version of EncodeBitmap, here to prevent chrome tree from going | |
| 195 * red. Will be removed once chrome is switched to the new version. | |
| 196 */ | |
| 197 typedef bool (*OldEncodeBitmap)(SkWStream*, const SkBitmap&); | |
| 198 | |
| 199 /** | |
| 200 * @Deprecated | |
| 201 * Old version of serialize, taking the old version of EncodeBitmap, | |
| 202 * to keep the chrome build green. Will be removed once chrome is | |
| 203 * switched to the new version. | |
| 204 */ | |
| 205 void serialize(SkWStream*, OldEncodeBitmap) const; | |
| 206 | |
| 207 #ifdef SK_BUILD_FOR_ANDROID | 192 #ifdef SK_BUILD_FOR_ANDROID |
| 208 /** Signals that the caller is prematurely done replaying the drawing | 193 /** Signals that the caller is prematurely done replaying the drawing |
| 209 commands. This can be called from a canvas virtual while the picture | 194 commands. This can be called from a canvas virtual while the picture |
| 210 is drawing. Has no effect if the picture is not drawing. | 195 is drawing. Has no effect if the picture is not drawing. |
| 211 @deprecated preserving for legacy purposes | 196 @deprecated preserving for legacy purposes |
| 212 */ | 197 */ |
| 213 void abortPlayback(); | 198 void abortPlayback(); |
| 214 #endif | 199 #endif |
| 215 | 200 |
| 216 protected: | 201 protected: |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 */ | 264 */ |
| 280 class SK_API SkDrawPictureCallback { | 265 class SK_API SkDrawPictureCallback { |
| 281 public: | 266 public: |
| 282 SkDrawPictureCallback() {} | 267 SkDrawPictureCallback() {} |
| 283 virtual ~SkDrawPictureCallback() {} | 268 virtual ~SkDrawPictureCallback() {} |
| 284 | 269 |
| 285 virtual bool abortDrawing() = 0; | 270 virtual bool abortDrawing() = 0; |
| 286 }; | 271 }; |
| 287 | 272 |
| 288 #endif | 273 #endif |
| OLD | NEW |