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

Unified Diff: dm/DM.cpp

Issue 1076923002: SkJpegCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@gif-real
Patch Set: SkJpegCodec Created 5 years, 8 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 | « no previous file | dm/DMSrcSink.cpp » ('j') | dm/DMSrcSink.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dm/DM.cpp
diff --git a/dm/DM.cpp b/dm/DM.cpp
index 2a71500605bef7ddbc7fafa9f45b8f4bd014dfc6..959f79c92773403d20f6d88231e515e957df7df2 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -197,8 +197,10 @@ static void push_codec_srcs(Path path) {
CodecSrc::kGrayscale_Always_DstColorType));
push_src("image", "scanline kGray8", new CodecSrc(path, CodecSrc::kScanline_Mode,
CodecSrc::kGrayscale_Always_DstColorType));
- // Intentional fall through
- // FIXME: Is this a long term solution for testing wbmps decodes to kIndex8?
+ break;
+ // Disallowing fall through
+ // FIXME: Without fall through we skip testing wbmp decodes to kIndex8.
+ // With fall through we test jpg decodes to kIndex8, which are disallowed.
scroggo 2015/04/10 17:19:05 Won't we just return Error::Nonfatal?
msarett 2015/04/13 20:54:04 This code from my last CL was actually buggy. It
// Further discussion on this topic is at skbug.com/3683
case kIndex_8_SkColorType:
push_src("image", "codec kIndex8", new CodecSrc(path, CodecSrc::kNormal_Mode,
@@ -222,8 +224,8 @@ static bool codec_supported(const char* ext) {
// FIXME: Once other versions of SkCodec are available, we can add them to this
// list (and eventually we can remove this check once they are all supported).
static const char* const exts[] = {
- "bmp", "gif", "png", "ico", "wbmp",
- "BMP", "GIF", "PNG", "ICO", "WBMP"
+ "bmp", "gif", "jpg", "jpeg", "png", "ico", "wbmp",
+ "BMP", "GIF", "JPG", "JPEG", "PNG", "ICO", "WBMP"
};
for (uint32_t i = 0; i < SK_ARRAY_COUNT(exts); i++) {
« no previous file with comments | « no previous file | dm/DMSrcSink.cpp » ('j') | dm/DMSrcSink.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698