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