| Index: include/core/SkImageGenerator.h
|
| diff --git a/include/core/SkImageGenerator.h b/include/core/SkImageGenerator.h
|
| index 157bfdb0010646cc7e82d70466a2d4bbf9fd2d62..17477e37b39701ac84fc4d6a09010f4e24ca1914 100644
|
| --- a/include/core/SkImageGenerator.h
|
| +++ b/include/core/SkImageGenerator.h
|
| @@ -116,12 +116,26 @@ public:
|
| bool getPixels(const SkImageInfo& info, void* pixels, size_t rowBytes);
|
| #endif
|
|
|
| + /**
|
| + * If planes or rowBytes is NULL or if any entry in planes is NULL or if any entry in rowBytes
|
| + * is 0, this imagegenerator should output the sizes and return true if it can efficiently
|
| + * return YUV planar data. If it cannot, it should return false. Note that either planes and
|
| + * rowBytes are both fully defined and non NULL/non 0 or they are both NULL or have NULL or 0
|
| + * entries only. Having only partial planes/rowBytes information is not supported.
|
| + *
|
| + * If all planes and rowBytes entries are non NULL or non 0, then it should copy the
|
| + * associated YUV data into those planes of memory supplied by the caller. It should validate
|
| + * that the sizes match what it expected. If the sizes do not match, it should return false.
|
| + */
|
| + bool getYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3]);
|
| +
|
| 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 onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3]);
|
| };
|
|
|
| #endif // SkImageGenerator_DEFINED
|
|
|