| Index: src/images/SkDecodingImageGenerator.cpp
|
| diff --git a/src/images/SkDecodingImageGenerator.cpp b/src/images/SkDecodingImageGenerator.cpp
|
| index e7a775e264b8e9181f5ddaad6e4f57299f10afbe..b8e91e4e8baf066bf568a3a85d667c2a97afa0c2 100644
|
| --- a/src/images/SkDecodingImageGenerator.cpp
|
| +++ b/src/images/SkDecodingImageGenerator.cpp
|
| @@ -42,11 +42,10 @@ protected:
|
| *info = fInfo;
|
| return true;
|
| }
|
| - virtual bool onGetPixels(const SkImageInfo& info,
|
| - void* pixels, size_t rowBytes,
|
| - SkPMColor ctable[], int* ctableCount) SK_OVERRIDE;
|
| - virtual bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3],
|
| - SkYUVColorSpace* colorSpace) SK_OVERRIDE;
|
| + bool onGetPixels(const SkImageInfo&, void* pixels, size_t rowBytes, SkPMColor ctable[],
|
| + int* ctableCount) SK_OVERRIDE;
|
| + bool onQueryYUV8(SkISize logical[3], SkISize optimal[3]) SK_OVERRIDE;
|
| + bool onGetYUV8(const SkISize sizes[3], void* planes[3], SkYUVColorSpace*) SK_OVERRIDE;
|
|
|
| private:
|
| typedef SkImageGenerator INHERITED;
|
| @@ -204,8 +203,7 @@ bool DecodingImageGenerator::onGetPixels(const SkImageInfo& info,
|
| return true;
|
| }
|
|
|
| -bool DecodingImageGenerator::onGetYUV8Planes(SkISize sizes[3], void* planes[3],
|
| - size_t rowBytes[3], SkYUVColorSpace* colorSpace) {
|
| +bool DecodingImageGenerator::onQueryYUV8(SkISize logical[3], SkISize optimal[3]) {
|
| if (!fStream->rewind()) {
|
| return false;
|
| }
|
| @@ -215,9 +213,23 @@ bool DecodingImageGenerator::onGetYUV8Planes(SkISize sizes[3], void* planes[3],
|
| return false;
|
| }
|
|
|
| - return decoder->decodeYUV8Planes(fStream, sizes, planes, rowBytes, colorSpace);
|
| + return false;//decoder->decodeYUV8Planes(fStream, sizes, planes, rowBytes, colorSpace);
|
| }
|
|
|
| +bool DecodingImageGenerator::onGetYUV8(const SkISize sizes[3], void* planes[3],
|
| + SkYUVColorSpace* colorSpace) {
|
| + if (!fStream->rewind()) {
|
| + return false;
|
| + }
|
| +
|
| + SkAutoTDelete<SkImageDecoder> decoder(SkImageDecoder::Factory(fStream));
|
| + if (NULL == decoder.get()) {
|
| + return false;
|
| + }
|
| +
|
| + return false;//decoder->decodeYUV8Planes(fStream, sizes, planes, rowBytes, colorSpace);
|
| +}
|
| +
|
| // A contructor-type function that returns NULL on failure. This
|
| // prevents the returned SkImageGenerator from ever being in a bad
|
| // state. Called by both Create() functions
|
|
|