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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 | 162 |
163 /** Return the height of the picture's recording canvas. This | 163 /** Return the height of the picture's recording canvas. This |
164 value reflects what was passed to setSize(), and does not necessarily | 164 value reflects what was passed to setSize(), and does not necessarily |
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 SkWriteBuffer. |
173 * Returning NULL will tell the SkOrderedWriteBuffer to use | 173 * Returning NULL will tell the SkWriteBuffer to use |
174 * SkBitmap::flatten() to store the bitmap. | 174 * SkBitmap::flatten() to store the bitmap. |
175 * | 175 * |
176 * @param pixelRefOffset DEPRECATED -- caller assumes it will return 0. | 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 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 */ | 264 */ |
265 class SK_API SkDrawPictureCallback { | 265 class SK_API SkDrawPictureCallback { |
266 public: | 266 public: |
267 SkDrawPictureCallback() {} | 267 SkDrawPictureCallback() {} |
268 virtual ~SkDrawPictureCallback() {} | 268 virtual ~SkDrawPictureCallback() {} |
269 | 269 |
270 virtual bool abortDrawing() = 0; | 270 virtual bool abortDrawing() = 0; |
271 }; | 271 }; |
272 | 272 |
273 #endif | 273 #endif |
OLD | NEW |