diff options
author | 2016-02-15 10:18:45 -0800 | |
---|---|---|
committer | 2016-02-15 10:18:45 -0800 | |
commit | b30d6984e6dfc185bf1eebf927343563057a7bb3 (patch) | |
tree | b019dea2fb2de94a32aaf87e4cb106e812fc182b /src/codec/SkCodec.cpp | |
parent | 8681e60b2ccd4cea37128a129f1adf6a6d59bb7d (diff) |
Fix colorType/alphaType checks in SkCodec
Make getPixels() and startScanlineDecode() behave
consistently.
Require that kGray8 decodes are opaque.
Assert that creating the swizzler succeeds.
BUG=skia:4203
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1695473002
Committed: https://skia.googlesource.com/skia/+/c7578b6cdd03b61f076ffc7956efd952d6c301c0
Review URL: https://codereview.chromium.org/1695473002
Diffstat (limited to 'src/codec/SkCodec.cpp')
-rw-r--r-- | src/codec/SkCodec.cpp | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp index 0da36bb171..bb7b26529b 100644 --- a/src/codec/SkCodec.cpp +++ b/src/codec/SkCodec.cpp @@ -162,15 +162,6 @@ SkCodec::Result SkCodec::getPixels(const SkImageInfo& info, void* pixels, size_t ctable = nullptr; } - { - SkAlphaType canonical; - if (!SkColorTypeValidateAlphaType(info.colorType(), info.alphaType(), &canonical) - || canonical != info.alphaType()) - { - return kInvalidConversion; - } - } - if (!this->rewindIfNeeded()) { return kCouldNotRewind; } |