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

Unified Diff: dm/DM.cpp

Issue 1402863002: Implementation of SkBitmapRegionDecoder using SkAndroidCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@split1
Patch Set: Add AndroidCodec strategy to benchmark Created 5 years, 2 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 | « bench/nanobench.cpp ('k') | dm/DMSrcSink.cpp » ('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 c51a6fb8aab4156c522c034368b0e25240722671..f1f54d3f4c4b6579e48fb64973c6474fb24a5502 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -392,6 +392,15 @@ static bool brd_color_type_supported(SkBitmapRegionDecoderInterface::Strategy st
default:
return false;
}
+ case SkBitmapRegionDecoderInterface::kAndroidCodec_Strategy:
+ switch (dstColorType) {
+ case CodecSrc::kGetFromCanvas_DstColorType:
+ case CodecSrc::kIndex8_Always_DstColorType:
+ case CodecSrc::kGrayscale_Always_DstColorType:
+ return true;
+ default:
+ return false;
+ }
default:
SkASSERT(false);
return false;
@@ -408,6 +417,9 @@ static void push_brd_src(Path path, SkBitmapRegionDecoderInterface::Strategy str
case SkBitmapRegionDecoderInterface::kOriginal_Strategy:
folder.append("brd_sample");
break;
+ case SkBitmapRegionDecoderInterface::kAndroidCodec_Strategy:
+ folder.append("brd_android_codec");
+ break;
default:
SkASSERT(false);
return;
@@ -450,7 +462,8 @@ static void push_brd_srcs(Path path) {
const SkBitmapRegionDecoderInterface::Strategy strategies[] = {
SkBitmapRegionDecoderInterface::kCanvas_Strategy,
- SkBitmapRegionDecoderInterface::kOriginal_Strategy
+ SkBitmapRegionDecoderInterface::kOriginal_Strategy,
+ SkBitmapRegionDecoderInterface::kAndroidCodec_Strategy,
};
const uint32_t sampleSizes[] = { 1, 2, 3, 4, 5, 6, 7, 8 };
@@ -458,14 +471,14 @@ static void push_brd_srcs(Path path) {
// We will only test to one backend (8888), but we will test all of the
// color types that we need to decode to on this backend.
const CodecSrc::DstColorType dstColorTypes[] = {
- CodecSrc::kGetFromCanvas_DstColorType,
- CodecSrc::kIndex8_Always_DstColorType,
- CodecSrc::kGrayscale_Always_DstColorType,
+ CodecSrc::kGetFromCanvas_DstColorType,
+ CodecSrc::kIndex8_Always_DstColorType,
+ CodecSrc::kGrayscale_Always_DstColorType,
};
const BRDSrc::Mode modes[] = {
- BRDSrc::kFullImage_Mode,
- BRDSrc::kDivisor_Mode
+ BRDSrc::kFullImage_Mode,
+ BRDSrc::kDivisor_Mode,
};
for (SkBitmapRegionDecoderInterface::Strategy strategy : strategies) {
« no previous file with comments | « bench/nanobench.cpp ('k') | dm/DMSrcSink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698