| Index: src/ports/SkImageGenerator_skia.cpp
|
| diff --git a/src/ports/SkImageGenerator_skia.cpp b/src/ports/SkImageGenerator_skia.cpp
|
| index 1dbc9a5f33e491cecc3fbde18f7e60e1e8331194..72480b8f6849be1fe5b3607efd7f5c40f22b20aa 100644
|
| --- a/src/ports/SkImageGenerator_skia.cpp
|
| +++ b/src/ports/SkImageGenerator_skia.cpp
|
| @@ -46,14 +46,8 @@ protected:
|
| SkData* onRefEncodedData() override {
|
| return SkRef(fData.get());
|
| }
|
| -#ifdef SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
|
| - Result onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
|
| - const Options&,
|
| - SkPMColor ctableEntries[], int* ctableCount) override {
|
| -#else
|
| bool onGetPixels(const SkImageInfo& info, void* pixels, size_t rowBytes,
|
| SkPMColor ctableEntries[], int* ctableCount) override {
|
| -#endif
|
| SkMemoryStream stream(fData->data(), fData->size(), false);
|
| SkAutoTUnref<BareMemoryAllocator> allocator(SkNEW_ARGS(BareMemoryAllocator,
|
| (info, pixels, rowBytes)));
|
| @@ -64,11 +58,7 @@ protected:
|
| const SkImageDecoder::Result result = fDecoder->decode(&stream, &bm, info.colorType(),
|
| SkImageDecoder::kDecodePixels_Mode);
|
| if (SkImageDecoder::kFailure == result) {
|
| -#ifdef SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
|
| - return kInvalidInput;
|
| -#else
|
| return false;
|
| -#endif
|
| }
|
|
|
| SkASSERT(info.colorType() == bm.info().colorType());
|
| @@ -78,24 +68,13 @@ protected:
|
|
|
| SkColorTable* ctable = bm.getColorTable();
|
| if (NULL == ctable) {
|
| -#ifdef SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
|
| - return kInvalidConversion;
|
| -#else
|
| return false;
|
| -#endif
|
| }
|
| const int count = ctable->count();
|
| memcpy(ctableEntries, ctable->readColors(), count * sizeof(SkPMColor));
|
| *ctableCount = count;
|
| }
|
| -#ifdef SK_LEGACY_IMAGE_GENERATOR_ENUMS_AND_OPTIONS
|
| - if (SkImageDecoder::kPartialSuccess == result) {
|
| - return kIncompleteInput;
|
| - }
|
| - return kSuccess;
|
| -#else
|
| return true;
|
| -#endif
|
| }
|
|
|
| bool onGetYUV8Planes(SkISize sizes[3], void* planes[3], size_t rowBytes[3],
|
|
|