Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1863)

Unified Diff: src/codec/SkCodec.cpp

Issue 1695473002: Fix colorType/alphaType checks in SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Consistently require that kGray8 decodes be opaque Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/codec/SkCodec.cpp
diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp
index f5a6d36e3b981a31efba661ba05447f4611c575e..50c172927ee02762f3aaa2a96aceb232966dfdd0 100644
--- a/src/codec/SkCodec.cpp
+++ b/src/codec/SkCodec.cpp
@@ -166,15 +166,6 @@ SkCodec::Result SkCodec::getPixels(const SkImageInfo& info, void* pixels, size_t
ctable = nullptr;
}
- {
- SkAlphaType canonical;
- if (!SkColorTypeValidateAlphaType(info.colorType(), info.alphaType(), &canonical)
scroggo 2016/02/12 17:13:55 What is this redundant with? I started to remove t
msarett 2016/02/12 17:41:31 This just checks that the alphaType matches the co
scroggo 2016/02/12 17:59:00 Ah, got it. So you're just moving this into a comm
- || canonical != info.alphaType())
- {
- return kInvalidConversion;
- }
- }
-
if (!this->rewindIfNeeded()) {
return kCouldNotRewind;
}

Powered by Google App Engine
This is Rietveld 408576698