OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
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 #ifndef SkBitmapDevice_DEFINED | 9 #ifndef SkBitmapDevice_DEFINED |
10 #define SkBitmapDevice_DEFINED | 10 #define SkBitmapDevice_DEFINED |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 | 211 |
212 /** | 212 /** |
213 * Implements readPixels API. The caller will ensure that: | 213 * Implements readPixels API. The caller will ensure that: |
214 * 1. bitmap has pixel config kARGB_8888_Config. | 214 * 1. bitmap has pixel config kARGB_8888_Config. |
215 * 2. bitmap has pixels. | 215 * 2. bitmap has pixels. |
216 * 3. The rectangle (x, y, x + bitmap->width(), y + bitmap->height()) is | 216 * 3. The rectangle (x, y, x + bitmap->width(), y + bitmap->height()) is |
217 * contained in the device bounds. | 217 * contained in the device bounds. |
218 */ | 218 */ |
219 virtual bool onReadPixels(const SkBitmap&, int x, int y, SkCanvas::Config888
8) SK_OVERRIDE; | 219 virtual bool onReadPixels(const SkBitmap&, int x, int y, SkCanvas::Config888
8) SK_OVERRIDE; |
220 virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int
) SK_OVERRIDE; | 220 virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int
) SK_OVERRIDE; |
| 221 virtual void* onAccessPixels(SkImageInfo* info, size_t* rowBytes) SK_OVERRID
E; |
221 | 222 |
222 /** Called when this device is installed into a Canvas. Balanced by a call | 223 /** Called when this device is installed into a Canvas. Balanced by a call |
223 to unlockPixels() when the device is removed from a Canvas. | 224 to unlockPixels() when the device is removed from a Canvas. |
224 */ | 225 */ |
225 virtual void lockPixels() SK_OVERRIDE; | 226 virtual void lockPixels() SK_OVERRIDE; |
226 virtual void unlockPixels() SK_OVERRIDE; | 227 virtual void unlockPixels() SK_OVERRIDE; |
227 | 228 |
228 /** | 229 /** |
229 * Returns true if the device allows processing of this imagefilter. If | 230 * Returns true if the device allows processing of this imagefilter. If |
230 * false is returned, then the filter is ignored. This may happen for | 231 * false is returned, then the filter is ignored. This may happen for |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
280 | 281 |
281 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; | 282 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; |
282 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE; | 283 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE; |
283 | 284 |
284 SkBitmap fBitmap; | 285 SkBitmap fBitmap; |
285 | 286 |
286 typedef SkBaseDevice INHERITED; | 287 typedef SkBaseDevice INHERITED; |
287 }; | 288 }; |
288 | 289 |
289 #endif // SkBitmapDevice_DEFINED | 290 #endif // SkBitmapDevice_DEFINED |
OLD | NEW |