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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 * be drawn to opaquely. Used as an accelerator when drawin
g | 59 * be drawn to opaquely. Used as an accelerator when drawin
g |
60 * these pixels to another device. | 60 * these pixels to another device. |
61 * @param deviceProperties Properties which affect compositing. | 61 * @param deviceProperties Properties which affect compositing. |
62 */ | 62 */ |
63 SkBitmapDevice(SkBitmap::Config config, int width, int height, bool isOpaque
, | 63 SkBitmapDevice(SkBitmap::Config config, int width, int height, bool isOpaque
, |
64 const SkDeviceProperties& deviceProperties); | 64 const SkDeviceProperties& deviceProperties); |
65 #endif | 65 #endif |
66 static SkBitmapDevice* Create(const SkImageInfo&, | 66 static SkBitmapDevice* Create(const SkImageInfo&, |
67 const SkDeviceProperties* = NULL); | 67 const SkDeviceProperties* = NULL); |
68 | 68 |
69 virtual uint32_t getDeviceCapabilities() SK_OVERRIDE { return 0; } | |
70 | |
71 /** Return the width of the device (in pixels). | 69 /** Return the width of the device (in pixels). |
72 */ | 70 */ |
73 virtual int width() const SK_OVERRIDE { return fBitmap.width(); } | 71 virtual int width() const SK_OVERRIDE { return fBitmap.width(); } |
74 /** Return the height of the device (in pixels). | 72 /** Return the height of the device (in pixels). |
75 */ | 73 */ |
76 virtual int height() const SK_OVERRIDE { return fBitmap.height(); } | 74 virtual int height() const SK_OVERRIDE { return fBitmap.height(); } |
77 | 75 |
78 /** 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 |
79 implicitly opaque. | 77 implicitly opaque. |
80 */ | 78 */ |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 | 279 |
282 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; | 280 virtual SkSurface* newSurface(const SkImageInfo&) SK_OVERRIDE; |
283 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE; | 281 virtual const void* peekPixels(SkImageInfo*, size_t* rowBytes) SK_OVERRIDE; |
284 | 282 |
285 SkBitmap fBitmap; | 283 SkBitmap fBitmap; |
286 | 284 |
287 typedef SkBaseDevice INHERITED; | 285 typedef SkBaseDevice INHERITED; |
288 }; | 286 }; |
289 | 287 |
290 #endif // SkBitmapDevice_DEFINED | 288 #endif // SkBitmapDevice_DEFINED |
OLD | NEW |