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 27 matching lines...) Expand all Loading... |
38 virtual int width() const SK_OVERRIDE { return fBitmap.width(); } | 38 virtual int width() const SK_OVERRIDE { return fBitmap.width(); } |
39 /** Return the height of the device (in pixels). | 39 /** Return the height of the device (in pixels). |
40 */ | 40 */ |
41 virtual int height() const SK_OVERRIDE { return fBitmap.height(); } | 41 virtual int height() const SK_OVERRIDE { return fBitmap.height(); } |
42 | 42 |
43 /** Returns true if the device's bitmap's config treats every pixels as | 43 /** Returns true if the device's bitmap's config treats every pixels as |
44 implicitly opaque. | 44 implicitly opaque. |
45 */ | 45 */ |
46 virtual bool isOpaque() const SK_OVERRIDE { return fBitmap.isOpaque(); } | 46 virtual bool isOpaque() const SK_OVERRIDE { return fBitmap.isOpaque(); } |
47 | 47 |
| 48 #ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG |
48 /** Return the bitmap config of the device's pixels | 49 /** Return the bitmap config of the device's pixels |
49 */ | 50 */ |
50 virtual SkBitmap::Config config() const SK_OVERRIDE { return fBitmap.config(
); } | 51 virtual SkBitmap::Config config() const SK_OVERRIDE { return fBitmap.config(
); } |
| 52 #endif |
51 | 53 |
52 virtual SkImageInfo imageInfo() const SK_OVERRIDE; | 54 virtual SkImageInfo imageInfo() const SK_OVERRIDE; |
53 | 55 |
54 /** | 56 /** |
55 * Return the device's associated gpu render target, or NULL. | 57 * Return the device's associated gpu render target, or NULL. |
56 */ | 58 */ |
57 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE { return NULL; } | 59 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE { return NULL; } |
58 | 60 |
59 protected: | 61 protected: |
60 /** | 62 /** |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 | 217 |
216 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; | 218 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; |
217 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE; | 219 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE; |
218 | 220 |
219 SkBitmap fBitmap; | 221 SkBitmap fBitmap; |
220 | 222 |
221 typedef SkBaseDevice INHERITED; | 223 typedef SkBaseDevice INHERITED; |
222 }; | 224 }; |
223 | 225 |
224 #endif // SkBitmapDevice_DEFINED | 226 #endif // SkBitmapDevice_DEFINED |
OLD | NEW |