| Index: include/core/SkBitmap.h
|
| diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
|
| index d87f01d2320b759f01fea4fbb138b7125d330fa9..ef59e31f52392add0704cda6fb3e18e1234e1b59 100644
|
| --- a/include/core/SkBitmap.h
|
| +++ b/include/core/SkBitmap.h
|
| @@ -88,6 +88,19 @@ public:
|
| SkColorType colorType() const { return fInfo.fColorType; }
|
| SkAlphaType alphaType() const { return fInfo.fAlphaType; }
|
|
|
| +#ifdef SK_SUPPORT_LEGACY_ASIMAGEINFO
|
| + bool asImageInfo(SkImageInfo* info) const {
|
| + // compatibility: return false for kUnknown
|
| + if (kUnknown_SkColorType == this->colorType()) {
|
| + return false;
|
| + }
|
| + if (info) {
|
| + *info = this->info();
|
| + }
|
| + return true;
|
| + }
|
| +#endif
|
| +
|
| /** Return the number of bytes per pixel based on the config. If the config
|
| does not have at least 1 byte per (e.g. kA1_Config) then 0 is returned.
|
| */
|
| @@ -324,20 +337,6 @@ public:
|
| */
|
| bool installMaskPixels(const SkMask&);
|
|
|
| - /**
|
| - * DEPRECATED: call info().
|
| - */
|
| - bool asImageInfo(SkImageInfo* info) const {
|
| - // compatibility: return false for kUnknown
|
| - if (kUnknown_SkColorType == this->colorType()) {
|
| - return false;
|
| - }
|
| - if (info) {
|
| - *info = this->info();
|
| - }
|
| - return true;
|
| - }
|
| -
|
| /** Use this to assign a new pixel address for an existing bitmap. This
|
| will automatically release any pixelref previously installed. Only call
|
| this if you are handling ownership/lifetime of the pixel memory.
|
|
|