| Index: include/core/SkImageGenerator.h
|
| diff --git a/include/core/SkImageGenerator.h b/include/core/SkImageGenerator.h
|
| index 21ebcbb3f26ba835b16cadfdc28874cf7731bb80..f399ab538e9ea05d125ab1b21ec387640d69ffc3 100644
|
| --- a/include/core/SkImageGenerator.h
|
| +++ b/include/core/SkImageGenerator.h
|
| @@ -9,7 +9,6 @@
|
| #define SkImageGenerator_DEFINED
|
|
|
| #include "SkImageInfo.h"
|
| -#include "SkColor.h"
|
|
|
| class SkBitmap;
|
| class SkData;
|
| @@ -48,13 +47,6 @@
|
| */
|
| virtual ~SkImageGenerator() { }
|
|
|
| -#ifdef SK_SUPPORT_LEGACY_IMAGEGENERATORAPI
|
| - virtual bool refEncodedData() { return this->onRefEncodedData(); }
|
| - virtual bool getInfo(SkImageInfo* info) { return this->onGetInfo(info); }
|
| - virtual bool getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes) {
|
| - return this->onGetPixels(info, pixels, rowBytes, NULL, NULL);
|
| - }
|
| -#else
|
| /**
|
| * Return a ref to the encoded (i.e. compressed) representation,
|
| * of this data.
|
| @@ -62,7 +54,7 @@
|
| * If non-NULL is returned, the caller is responsible for calling
|
| * unref() on the data when it is finished.
|
| */
|
| - SkData* refEncodedData() { return this->onRefEncodedData(); }
|
| + virtual SkData* refEncodedData() { return NULL; }
|
|
|
| /**
|
| * Return some information about the image, allowing the owner of
|
| @@ -73,7 +65,7 @@
|
| *
|
| * @return false if anything goes wrong.
|
| */
|
| - bool getInfo(SkImageInfo* info);
|
| + virtual bool getInfo(SkImageInfo* info) = 0;
|
|
|
| /**
|
| * Decode into the given pixels, a block of memory of size at
|
| @@ -91,31 +83,12 @@
|
| * different output-configs, which the implementation can
|
| * decide to support or not.
|
| *
|
| - * If info is kIndex8_SkColorType, then the caller must provide storage for up to 256
|
| - * SkPMColor values in ctable. On success the generator must copy N colors into that storage,
|
| - * (where N is the logical number of table entries) and set ctableCount to N.
|
| - *
|
| - * If info is not kIndex8_SkColorType, then the last two parameters may be NULL. If ctableCount
|
| - * is not null, it will be set to 0.
|
| - *
|
| * @return false if anything goes wrong or if the image info is
|
| * unsupported.
|
| */
|
| - bool getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
|
| - SkPMColor ctable[], int* ctableCount);
|
| -
|
| - /**
|
| - * Simplified version of getPixels() that asserts that info is NOT kIndex8_SkColorType.
|
| - */
|
| - bool getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes);
|
| -#endif
|
| -
|
| -protected:
|
| - virtual SkData* onRefEncodedData();
|
| - virtual bool onGetInfo(SkImageInfo* info);
|
| - virtual bool onGetPixels(const SkImageInfo& info,
|
| - void* pixels, size_t rowBytes,
|
| - SkPMColor ctable[], int* ctableCount);
|
| + virtual bool getPixels(const SkImageInfo& info,
|
| + void* pixels,
|
| + size_t rowBytes) = 0;
|
| };
|
|
|
| #endif // SkImageGenerator_DEFINED
|
|
|