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 | |
49 /** Return the bitmap config of the device's pixels | |
50 */ | |
51 virtual SkBitmap::Config config() const SK_OVERRIDE { return fBitmap.config(
); } | |
52 #endif | |
53 | |
54 virtual SkImageInfo imageInfo() const SK_OVERRIDE; | 48 virtual SkImageInfo imageInfo() const SK_OVERRIDE; |
55 | 49 |
56 /** | 50 /** |
57 * Return the device's associated gpu render target, or NULL. | 51 * Return the device's associated gpu render target, or NULL. |
58 */ | 52 */ |
59 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE { return NULL; } | 53 virtual GrRenderTarget* accessRenderTarget() SK_OVERRIDE { return NULL; } |
60 | 54 |
61 protected: | 55 protected: |
62 /** | 56 /** |
63 * Device may filter the text flags for drawing text here. If it wants to | 57 * Device may filter the text flags for drawing text here. If it wants to |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 | 211 |
218 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; | 212 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; |
219 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE; | 213 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE; |
220 | 214 |
221 SkBitmap fBitmap; | 215 SkBitmap fBitmap; |
222 | 216 |
223 typedef SkBaseDevice INHERITED; | 217 typedef SkBaseDevice INHERITED; |
224 }; | 218 }; |
225 | 219 |
226 #endif // SkBitmapDevice_DEFINED | 220 #endif // SkBitmapDevice_DEFINED |
OLD | NEW |