| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2010 The Android Open Source Project | 3 * Copyright 2010 The Android Open Source Project |
| 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 | 9 |
| 10 #ifndef SkDevice_DEFINED | 10 #ifndef SkDevice_DEFINED |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 const SkIPoint& origin = this->getOrigin(); | 75 const SkIPoint& origin = this->getOrigin(); |
| 76 bounds->setXYWH(origin.x(), origin.y(), this->width(), this->height()); | 76 bounds->setXYWH(origin.x(), origin.y(), this->width(), this->height()); |
| 77 } | 77 } |
| 78 | 78 |
| 79 | 79 |
| 80 /** Returns true if the device's bitmap's config treats every pixel as | 80 /** Returns true if the device's bitmap's config treats every pixel as |
| 81 implicitly opaque. | 81 implicitly opaque. |
| 82 */ | 82 */ |
| 83 virtual bool isOpaque() const = 0; | 83 virtual bool isOpaque() const = 0; |
| 84 | 84 |
| 85 #ifdef SK_SUPPORT_LEGACY_DEVICE_CONFIG |
| 85 /** Return the bitmap config of the device's pixels | 86 /** Return the bitmap config of the device's pixels |
| 86 */ | 87 */ |
| 87 virtual SkBitmap::Config config() const = 0; | 88 virtual SkBitmap::Config config() const = 0; |
| 89 #endif |
| 88 | 90 |
| 89 /** Return the bitmap associated with this device. Call this each time you n
eed | 91 /** Return the bitmap associated with this device. Call this each time you n
eed |
| 90 to access the bitmap, as it notifies the subclass to perform any flushin
g | 92 to access the bitmap, as it notifies the subclass to perform any flushin
g |
| 91 etc. before you examine the pixels. | 93 etc. before you examine the pixels. |
| 92 @param changePixels set to true if the caller plans to change the pixels | 94 @param changePixels set to true if the caller plans to change the pixels |
| 93 @return the device's bitmap | 95 @return the device's bitmap |
| 94 */ | 96 */ |
| 95 const SkBitmap& accessBitmap(bool changePixels); | 97 const SkBitmap& accessBitmap(bool changePixels); |
| 96 | 98 |
| 97 bool writePixels(const SkImageInfo&, const void*, size_t rowBytes, int x, in
t y); | 99 bool writePixels(const SkImageInfo&, const void*, size_t rowBytes, int x, in
t y); |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 SkMetaData* fMetaData; | 398 SkMetaData* fMetaData; |
| 397 | 399 |
| 398 #ifdef SK_DEBUG | 400 #ifdef SK_DEBUG |
| 399 bool fAttachedToCanvas; | 401 bool fAttachedToCanvas; |
| 400 #endif | 402 #endif |
| 401 | 403 |
| 402 typedef SkRefCnt INHERITED; | 404 typedef SkRefCnt INHERITED; |
| 403 }; | 405 }; |
| 404 | 406 |
| 405 #endif | 407 #endif |
| OLD | NEW |