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

Unified Diff: dm/DM.cpp

Issue 1240143002: Add the ability to decode a subset to SkCodec. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix some conversion warning/errors. Created 5 years, 5 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.h » ('j') | no next file with comments »
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 dd072dcec6d86fbf87fa1970175b5ce645f79024..d472be69d93374cb0e9a5d81085e534642b2182a 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -257,6 +257,11 @@ static void push_codec_srcs(Path path) {
CodecSrc::kGetFromCanvas_DstColorType, scale));
push_src("image", "stripe", new CodecSrc(path, CodecSrc::kStripe_Mode,
CodecSrc::kGetFromCanvas_DstColorType, scale));
+ // Note: The only codec which supports subsets natively is SkWebpCodec, which will never
+ // report kIndex_8 or kGray_8, so there is no need to test kSubset_mode with those color
+ // types specifically requested.
+ push_src("image", "codec_subset", new CodecSrc(path, CodecSrc::kSubset_Mode,
+ CodecSrc::kGetFromCanvas_DstColorType, scale));
}
}
« no previous file with comments | « no previous file | dm/DMSrcSink.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698