| OLD | NEW |
| 1 | |
| 2 /* | 1 /* |
| 3 * Copyright 2007 The Android Open Source Project | 2 * Copyright 2007 The Android Open Source Project |
| 4 * | 3 * |
| 5 * 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 |
| 6 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 7 */ | 6 */ |
| 8 | 7 |
| 9 | 8 |
| 10 #ifndef SkPicture_DEFINED | 9 #ifndef SkPicture_DEFINED |
| 11 #define SkPicture_DEFINED | 10 #define SkPicture_DEFINED |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 /** | 124 /** |
| 126 * Function to encode an SkBitmap to an SkData. A function with this | 125 * Function to encode an SkBitmap to an SkData. A function with this |
| 127 * signature can be passed to serialize() and SkWriteBuffer. | 126 * signature can be passed to serialize() and SkWriteBuffer. |
| 128 * Returning NULL will tell the SkWriteBuffer to use | 127 * Returning NULL will tell the SkWriteBuffer to use |
| 129 * SkBitmap::flatten() to store the bitmap. | 128 * SkBitmap::flatten() to store the bitmap. |
| 130 * | 129 * |
| 131 * @param pixelRefOffset DEPRECATED -- caller assumes it will return 0. | 130 * @param pixelRefOffset DEPRECATED -- caller assumes it will return 0. |
| 132 * @return SkData If non-NULL, holds encoded data representing the passed | 131 * @return SkData If non-NULL, holds encoded data representing the passed |
| 133 * in bitmap. The caller is responsible for calling unref(). | 132 * in bitmap. The caller is responsible for calling unref(). |
| 134 * | 133 * |
| 135 * TODO: No longer used by SkPicture (except when SK_LEGACY_ENCODE_BITMAP | 134 * TODO: No longer used by SkPicture. Still used by PDF though. Move into P
DF. |
| 136 * is defined. Still used by PDF though. Move into PDF. | |
| 137 */ | 135 */ |
| 138 typedef SkData* (*EncodeBitmap)(size_t* pixelRefOffset, const SkBitmap& bm); | 136 typedef SkData* (*EncodeBitmap)(size_t* pixelRefOffset, const SkBitmap& bm); |
| 139 | 137 |
| 140 /** | 138 /** |
| 141 * Serialize to a stream. If non NULL, serializer will be used to serialize | 139 * Serialize to a stream. If non NULL, serializer will be used to serialize |
| 142 * any bitmaps in the picture. | 140 * any bitmaps in the picture. |
| 143 * | 141 * |
| 144 * TODO: Use serializer to serialize SkImages as well. | 142 * TODO: Use serializer to serialize SkImages as well. |
| 145 */ | 143 */ |
| 146 void serialize(SkWStream*, SkPixelSerializer* serializer = NULL) const; | 144 void serialize(SkWStream*, SkPixelSerializer* serializer = NULL) const; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 | 290 |
| 293 friend class SkPictureRecorder; // SkRecord-based constructor. | 291 friend class SkPictureRecorder; // SkRecord-based constructor. |
| 294 friend class GrLayerHoister; // access to fRecord | 292 friend class GrLayerHoister; // access to fRecord |
| 295 friend class ReplaceDraw; | 293 friend class ReplaceDraw; |
| 296 friend class SkPictureUtils; | 294 friend class SkPictureUtils; |
| 297 friend class SkRecordedDrawable; | 295 friend class SkRecordedDrawable; |
| 298 }; | 296 }; |
| 299 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); | 297 SK_COMPILE_ASSERT(sizeof(SkPicture) <= 96, SkPictureSize); |
| 300 | 298 |
| 301 #endif | 299 #endif |
| OLD | NEW |