| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 virtual uint32_t getDeviceCapabilities() SK_OVERRIDE { return 0; } | 67 virtual uint32_t getDeviceCapabilities() SK_OVERRIDE { return 0; } |
| 68 | 68 |
| 69 /** Return the width of the device (in pixels). | 69 /** Return the width of the device (in pixels). |
| 70 */ | 70 */ |
| 71 virtual int width() const SK_OVERRIDE { return fBitmap.width(); } | 71 virtual int width() const SK_OVERRIDE { return fBitmap.width(); } |
| 72 /** Return the height of the device (in pixels). | 72 /** Return the height of the device (in pixels). |
| 73 */ | 73 */ |
| 74 virtual int height() const SK_OVERRIDE { return fBitmap.height(); } | 74 virtual int height() const SK_OVERRIDE { return fBitmap.height(); } |
| 75 | 75 |
| 76 /** | |
| 77 * Return the bounds of the device in the coordinate space of the root | |
| 78 * canvas. The root device will have its top-left at 0,0, but other devices | |
| 79 * such as those associated with saveLayer may have a non-zero origin. | |
| 80 */ | |
| 81 virtual void getGlobalBounds(SkIRect* bounds) const SK_OVERRIDE; | |
| 82 | |
| 83 /** Returns true if the device's bitmap's config treats every pixels as | 76 /** Returns true if the device's bitmap's config treats every pixels as |
| 84 implicitly opaque. | 77 implicitly opaque. |
| 85 */ | 78 */ |
| 86 virtual bool isOpaque() const SK_OVERRIDE { return fBitmap.isOpaque(); } | 79 virtual bool isOpaque() const SK_OVERRIDE { return fBitmap.isOpaque(); } |
| 87 | 80 |
| 88 /** Return the bitmap config of the device's pixels | 81 /** Return the bitmap config of the device's pixels |
| 89 */ | 82 */ |
| 90 virtual SkBitmap::Config config() const SK_OVERRIDE { return fBitmap.config(
); } | 83 virtual SkBitmap::Config config() const SK_OVERRIDE { return fBitmap.config(
); } |
| 91 | 84 |
| 92 /** | 85 /** |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 /** Causes any deferred drawing to the device to be completed. | 274 /** Causes any deferred drawing to the device to be completed. |
| 282 */ | 275 */ |
| 283 virtual void flush() SK_OVERRIDE {} | 276 virtual void flush() SK_OVERRIDE {} |
| 284 | 277 |
| 285 SkBitmap fBitmap; | 278 SkBitmap fBitmap; |
| 286 | 279 |
| 287 typedef SkBaseDevice INHERITED; | 280 typedef SkBaseDevice INHERITED; |
| 288 }; | 281 }; |
| 289 | 282 |
| 290 #endif // SkBitmapDevice_DEFINED | 283 #endif // SkBitmapDevice_DEFINED |
| OLD | NEW |