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

Unified Diff: dm/DM.cpp

Issue 1472933002: Make SkAndroidCodec support ico (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Response to comments Created 5 years 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 | include/codec/SkCodec.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 7497161369b42788dac022dc8f9eedb534801135..fac1376bcb01870a902451d49f8b6674bf05c1de 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -345,35 +345,17 @@ static void push_codec_srcs(Path path) {
bool subset = false;
// The following image types are supported by BitmapRegionDecoder,
// so we will test full image decodes and subset decodes.
- static const char* const subsetExts[] = {
+ static const char* const exts[] = {
"jpg", "jpeg", "png", "webp",
"JPG", "JPEG", "PNG", "WEBP",
};
- for (const char* ext : subsetExts) {
+ for (const char* ext : exts) {
if (path.endsWith(ext)) {
subset = true;
break;
}
}
- bool full = false;
- // The following image types are only supported by BitmapFactory,
- // so we only need to test full image decodes.
- static const char* fullExts[] = {
- "wbmp", "bmp", "gif",
- "WBMP", "BMP", "GIF",
- };
- for (const char* ext : fullExts) {
- if (path.endsWith(ext)) {
- full = true;
- break;
- }
- }
-
- if (!full && !subset) {
- return;
- }
-
const int sampleSizes[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
for (int sampleSize : sampleSizes) {
« no previous file with comments | « no previous file | include/codec/SkCodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698