| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 return pr; | 207 return pr; |
| 208 } | 208 } |
| 209 | 209 |
| 210 /** | 210 /** |
| 211 * Implements readPixels API. The caller will ensure that: | 211 * Implements readPixels API. The caller will ensure that: |
| 212 * 1. bitmap has pixel config kARGB_8888_Config. | 212 * 1. bitmap has pixel config kARGB_8888_Config. |
| 213 * 2. bitmap has pixels. | 213 * 2. bitmap has pixels. |
| 214 * 3. The rectangle (x, y, x + bitmap->width(), y + bitmap->height()) is | 214 * 3. The rectangle (x, y, x + bitmap->width(), y + bitmap->height()) is |
| 215 * contained in the device bounds. | 215 * contained in the device bounds. |
| 216 */ | 216 */ |
| 217 #ifdef SK_SUPPORT_LEGACY_READPIXELSCONFIG |
| 217 virtual bool onReadPixels(const SkBitmap&, int x, int y, SkCanvas::Config888
8) SK_OVERRIDE; | 218 virtual bool onReadPixels(const SkBitmap&, int x, int y, SkCanvas::Config888
8) SK_OVERRIDE; |
| 219 #endif |
| 220 virtual bool onReadPixels(const SkImageInfo&, void*, size_t, int x, int y) S
K_OVERRIDE; |
| 218 virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int
) SK_OVERRIDE; | 221 virtual bool onWritePixels(const SkImageInfo&, const void*, size_t, int, int
) SK_OVERRIDE; |
| 219 virtual void* onAccessPixels(SkImageInfo* info, size_t* rowBytes) SK_OVERRID
E; | 222 virtual void* onAccessPixels(SkImageInfo* info, size_t* rowBytes) SK_OVERRID
E; |
| 220 | 223 |
| 221 /** Called when this device is installed into a Canvas. Balanced by a call | 224 /** Called when this device is installed into a Canvas. Balanced by a call |
| 222 to unlockPixels() when the device is removed from a Canvas. | 225 to unlockPixels() when the device is removed from a Canvas. |
| 223 */ | 226 */ |
| 224 virtual void lockPixels() SK_OVERRIDE; | 227 virtual void lockPixels() SK_OVERRIDE; |
| 225 virtual void unlockPixels() SK_OVERRIDE; | 228 virtual void unlockPixels() SK_OVERRIDE; |
| 226 | 229 |
| 227 /** | 230 /** |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 | 282 |
| 280 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; | 283 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; |
| 281 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE; | 284 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE; |
| 282 | 285 |
| 283 SkBitmap fBitmap; | 286 SkBitmap fBitmap; |
| 284 | 287 |
| 285 typedef SkBaseDevice INHERITED; | 288 typedef SkBaseDevice INHERITED; |
| 286 }; | 289 }; |
| 287 | 290 |
| 288 #endif // SkBitmapDevice_DEFINED | 291 #endif // SkBitmapDevice_DEFINED |
| OLD | NEW |