| 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 |
| 76 /** Returns true if the device's bitmap's config treats every pixels as | 83 /** Returns true if the device's bitmap's config treats every pixels as |
| 77 implicitly opaque. | 84 implicitly opaque. |
| 78 */ | 85 */ |
| 79 virtual bool isOpaque() const SK_OVERRIDE { return fBitmap.isOpaque(); } | 86 virtual bool isOpaque() const SK_OVERRIDE { return fBitmap.isOpaque(); } |
| 80 | 87 |
| 81 /** Return the bitmap config of the device's pixels | 88 /** Return the bitmap config of the device's pixels |
| 82 */ | 89 */ |
| 83 virtual SkBitmap::Config config() const SK_OVERRIDE { return fBitmap.config(
); } | 90 virtual SkBitmap::Config config() const SK_OVERRIDE { return fBitmap.config(
); } |
| 84 | 91 |
| 85 /** | 92 /** |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 /** Causes any deferred drawing to the device to be completed. | 286 /** Causes any deferred drawing to the device to be completed. |
| 280 */ | 287 */ |
| 281 virtual void flush() SK_OVERRIDE {} | 288 virtual void flush() SK_OVERRIDE {} |
| 282 | 289 |
| 283 SkBitmap fBitmap; | 290 SkBitmap fBitmap; |
| 284 | 291 |
| 285 typedef SkBaseDevice INHERITED; | 292 typedef SkBaseDevice INHERITED; |
| 286 }; | 293 }; |
| 287 | 294 |
| 288 #endif // SkBitmapDevice_DEFINED | 295 #endif // SkBitmapDevice_DEFINED |
| OLD | NEW |