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

Unified Diff: dm/DM.cpp

Issue 1976303002: Drop AndroidCodecSrc::kDivisor_Mode (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 566029648b79e3f1c56aac53f8f9715d20318243..b8aed5f166705fac670b6ef6590f163560147eee 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -394,17 +394,10 @@ static void push_codec_src(Path path, CodecSrc::Mode mode, CodecSrc::DstColorTyp
push_src("image", folder, src);
}
-static void push_android_codec_src(Path path, AndroidCodecSrc::Mode mode,
- CodecSrc::DstColorType dstColorType, SkAlphaType dstAlphaType, int sampleSize) {
+static void push_android_codec_src(Path path, CodecSrc::DstColorType dstColorType,
+ SkAlphaType dstAlphaType, int sampleSize) {
SkString folder;
- switch (mode) {
- case AndroidCodecSrc::kFullImage_Mode:
- folder.append("scaled_codec");
- break;
- case AndroidCodecSrc::kDivisor_Mode:
- folder.append("scaled_codec_divisor");
- break;
- }
+ folder.append("scaled_codec");
switch (dstColorType) {
case CodecSrc::kGrayscale_Always_DstColorType:
@@ -438,7 +431,7 @@ static void push_android_codec_src(Path path, AndroidCodecSrc::Mode mode,
folder.appendf("_%.3f", 1.0f / (float) sampleSize);
}
- AndroidCodecSrc* src = new AndroidCodecSrc(path, mode, dstColorType, dstAlphaType, sampleSize);
+ AndroidCodecSrc* src = new AndroidCodecSrc(path, dstColorType, dstAlphaType, sampleSize);
push_src("image", folder, src);
}
@@ -564,21 +557,6 @@ static void push_codec_srcs(Path path) {
return;
}
- // https://bug.skia.org/4428
- 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 exts[] = {
- "jpg", "jpeg", "png", "webp",
- "JPG", "JPEG", "PNG", "WEBP",
- };
- for (const char* ext : exts) {
- if (path.endsWith(ext)) {
- subset = true;
- break;
- }
- }
-
const int sampleSizes[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
for (int sampleSize : sampleSizes) {
@@ -590,12 +568,7 @@ static void push_codec_srcs(Path path) {
continue;
}
- push_android_codec_src(path, AndroidCodecSrc::kFullImage_Mode, colorType,
- alphaType, sampleSize);
- if (subset) {
- push_android_codec_src(path, AndroidCodecSrc::kDivisor_Mode, colorType,
- alphaType, sampleSize);
- }
+ push_android_codec_src(path, colorType, alphaType, sampleSize);
}
}
}
« 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