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

Unified Diff: src/codec/SkCodec.cpp

Issue 1694023002: Revert of Fix colorType/alphaType checks in SkCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « src/codec/SkBmpStandardCodec.cpp ('k') | src/codec/SkCodecPriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkCodec.cpp
diff --git a/src/codec/SkCodec.cpp b/src/codec/SkCodec.cpp
index 50c172927ee02762f3aaa2a96aceb232966dfdd0..f5a6d36e3b981a31efba661ba05447f4611c575e 100644
--- a/src/codec/SkCodec.cpp
+++ b/src/codec/SkCodec.cpp
@@ -166,6 +166,15 @@
ctable = nullptr;
}
+ {
+ SkAlphaType canonical;
+ if (!SkColorTypeValidateAlphaType(info.colorType(), info.alphaType(), &canonical)
+ || canonical != info.alphaType())
+ {
+ return kInvalidConversion;
+ }
+ }
+
if (!this->rewindIfNeeded()) {
return kCouldNotRewind;
}
« no previous file with comments | « src/codec/SkBmpStandardCodec.cpp ('k') | src/codec/SkCodecPriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698