| 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 |
| 192 #ifdef SK_BUILD_FOR_ANDROID | 207 #ifdef SK_BUILD_FOR_ANDROID |
| 193 /** Signals that the caller is prematurely done replaying the drawing | 208 /** Signals that the caller is prematurely done replaying the drawing |
| 194 commands. This can be called from a canvas virtual while the picture | 209 commands. This can be called from a canvas virtual while the picture |
| 195 is drawing. Has no effect if the picture is not drawing. | 210 is drawing. Has no effect if the picture is not drawing. |
| 196 @deprecated preserving for legacy purposes | 211 @deprecated preserving for legacy purposes |
| 197 */ | 212 */ |
| 198 void abortPlayback(); | 213 void abortPlayback(); |
| 199 #endif | 214 #endif |
| 200 | 215 |
| 201 protected: | 216 protected: |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 */ | 279 */ |
| 265 class SkDrawPictureCallback { | 280 class SkDrawPictureCallback { |
| 266 public: | 281 public: |
| 267 SkDrawPictureCallback() {} | 282 SkDrawPictureCallback() {} |
| 268 virtual ~SkDrawPictureCallback() {} | 283 virtual ~SkDrawPictureCallback() {} |
| 269 | 284 |
| 270 virtual bool abortDrawing() = 0; | 285 virtual bool abortDrawing() = 0; |
| 271 }; | 286 }; |
| 272 | 287 |
| 273 #endif | 288 #endif |
| OLD | NEW |