| 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 |
| 11 #define SkPicture_DEFINED | 11 #define SkPicture_DEFINED |
| 12 | 12 |
| 13 #include "SkBitmap.h" | 13 #include "SkBitmap.h" |
| 14 #include "SkImageDecoder.h" | |
| 15 #include "SkRefCnt.h" | 14 #include "SkRefCnt.h" |
| 16 | 15 |
| 17 class SkBBoxHierarchy; | 16 class SkBBoxHierarchy; |
| 18 class SkCanvas; | 17 class SkCanvas; |
| 19 class SkDrawPictureCallback; | 18 class SkDrawPictureCallback; |
| 20 class SkData; | 19 class SkData; |
| 21 class SkPicturePlayback; | 20 class SkPicturePlayback; |
| 22 class SkPictureRecord; | 21 class SkPictureRecord; |
| 23 class SkStream; | 22 class SkStream; |
| 24 class SkWStream; | 23 class SkWStream; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 58 |
| 60 /** | 59 /** |
| 61 * Recreate a picture that was serialized into a stream. | 60 * Recreate a picture that was serialized into a stream. |
| 62 * @param SkStream Serialized picture data. | 61 * @param SkStream Serialized picture data. |
| 63 * @param proc Function pointer for installing pixelrefs on SkBitmaps repre
senting the | 62 * @param proc Function pointer for installing pixelrefs on SkBitmaps repre
senting the |
| 64 * encoded bitmap data from the stream. | 63 * encoded bitmap data from the stream. |
| 65 * @return A new SkPicture representing the serialized data, or NULL if the
stream is | 64 * @return A new SkPicture representing the serialized data, or NULL if the
stream is |
| 66 * invalid. | 65 * invalid. |
| 67 */ | 66 */ |
| 68 static SkPicture* CreateFromStream(SkStream*, | 67 static SkPicture* CreateFromStream(SkStream*, |
| 69 InstallPixelRefProc proc = &SkImageDecode
r::DecodeMemory); | 68 InstallPixelRefProc proc = NULL); |
| 70 | 69 |
| 71 /** | 70 /** |
| 72 * Recreate a picture that was serialized into a buffer. If the creation re
quires bitmap | 71 * Recreate a picture that was serialized into a buffer. If the creation re
quires bitmap |
| 73 * decoding, the decoder must be set on the SkReadBuffer parameter by calli
ng | 72 * decoding, the decoder must be set on the SkReadBuffer parameter by calli
ng |
| 74 * SkReadBuffer::setBitmapDecoder() before calling SkPicture::CreateFromBuf
fer(). | 73 * SkReadBuffer::setBitmapDecoder() before calling SkPicture::CreateFromBuf
fer(). |
| 75 * @param SkReadBuffer Serialized picture data. | 74 * @param SkReadBuffer Serialized picture data. |
| 76 * @return A new SkPicture representing the serialized data, or NULL if the
buffer is | 75 * @return A new SkPicture representing the serialized data, or NULL if the
buffer is |
| 77 * invalid. | 76 * invalid. |
| 78 */ | 77 */ |
| 79 static SkPicture* CreateFromBuffer(SkReadBuffer&); | 78 static SkPicture* CreateFromBuffer(SkReadBuffer&); |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 */ | 282 */ |
| 284 class SK_API SkDrawPictureCallback { | 283 class SK_API SkDrawPictureCallback { |
| 285 public: | 284 public: |
| 286 SkDrawPictureCallback() {} | 285 SkDrawPictureCallback() {} |
| 287 virtual ~SkDrawPictureCallback() {} | 286 virtual ~SkDrawPictureCallback() {} |
| 288 | 287 |
| 289 virtual bool abortDrawing() = 0; | 288 virtual bool abortDrawing() = 0; |
| 290 }; | 289 }; |
| 291 | 290 |
| 292 #endif | 291 #endif |
| OLD | NEW |