| 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 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 reflect the bounds of what has been recorded into the picture. | 165 reflect the bounds of what has been recorded into the picture. |
| 166 @return the height of the picture's recording canvas | 166 @return the height of the picture's recording canvas |
| 167 */ | 167 */ |
| 168 int height() const { return fHeight; } | 168 int height() const { return fHeight; } |
| 169 | 169 |
| 170 /** | 170 /** |
| 171 * Function to encode an SkBitmap to an SkData. A function with this | 171 * Function to encode an SkBitmap to an SkData. A function with this |
| 172 * signature can be passed to serialize() and SkOrderedWriteBuffer. | 172 * signature can be passed to serialize() and SkOrderedWriteBuffer. |
| 173 * Returning NULL will tell the SkOrderedWriteBuffer to use | 173 * Returning NULL will tell the SkOrderedWriteBuffer to use |
| 174 * SkBitmap::flatten() to store the bitmap. | 174 * SkBitmap::flatten() to store the bitmap. |
| 175 * @param pixelRefOffset Output parameter, telling the deserializer what | 175 * |
| 176 * offset in the bm's pixelRef corresponds to the encoded data. | 176 * @param pixelRefOffset DEPRECATED -- caller assumes it will return 0. |
| 177 * @return SkData If non-NULL, holds encoded data representing the passed | 177 * @return SkData If non-NULL, holds encoded data representing the passed |
| 178 * in bitmap. The caller is responsible for calling unref(). | 178 * in bitmap. The caller is responsible for calling unref(). |
| 179 */ | 179 */ |
| 180 typedef SkData* (*EncodeBitmap)(size_t* pixelRefOffset, const SkBitmap& bm); | 180 typedef SkData* (*EncodeBitmap)(size_t* pixelRefOffset, const SkBitmap& bm); |
| 181 | 181 |
| 182 /** | 182 /** |
| 183 * Serialize to a stream. If non NULL, encoder will be used to encode | 183 * Serialize to a stream. If non NULL, encoder will be used to encode |
| 184 * any bitmaps in the picture. | 184 * any bitmaps in the picture. |
| 185 * encoder will never be called with a NULL pixelRefOffset. | 185 * encoder will never be called with a NULL pixelRefOffset. |
| 186 */ | 186 */ |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 */ | 265 */ |
| 266 class SK_API SkDrawPictureCallback { | 266 class SK_API SkDrawPictureCallback { |
| 267 public: | 267 public: |
| 268 SkDrawPictureCallback() {} | 268 SkDrawPictureCallback() {} |
| 269 virtual ~SkDrawPictureCallback() {} | 269 virtual ~SkDrawPictureCallback() {} |
| 270 | 270 |
| 271 virtual bool abortDrawing() = 0; | 271 virtual bool abortDrawing() = 0; |
| 272 }; | 272 }; |
| 273 | 273 |
| 274 #endif | 274 #endif |
| OLD | NEW |