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

Unified Diff: dm/DM.cpp

Issue 1990173003: Reduce the number of BRDSrcs run in DM (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 | no next file » | 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 8685ec55670a669ddf545ab7bb5b3bca41ce7101..9051d5b2feb824ce91fe91543fac1d2f4feb7085 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -646,6 +646,16 @@ static void push_brd_src(Path path, CodecSrc::DstColorType dstColorType, BRDSrc:
}
static void push_brd_srcs(Path path) {
+ // Only run Index8 and grayscale to one sampleSize and Mode. Though interesting
+ // to test these color types, they should not reveal anything across various
+ // sampleSizes and Modes
+ for (auto type : { CodecSrc::kIndex8_Always_DstColorType,
+ CodecSrc::kGrayscale_Always_DstColorType }) {
+ // Arbitrarily choose Mode and sampleSize.
+ push_brd_src(path, type, BRDSrc::kFullImage_Mode, 2);
+ }
+
+
// Test on a variety of sampleSizes, making sure to include:
// - 2, 4, and 8, which are natively supported by jpeg
// - multiples of 2 which are not divisible by 4 (analogous for 4)
@@ -653,24 +663,14 @@ static void push_brd_srcs(Path path) {
// We will only produce output for the larger sizes on large images.
const uint32_t sampleSizes[] = { 1, 2, 3, 4, 5, 6, 7, 8, 12, 16, 24, 32, 64 };
- // 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,
- };
-
const BRDSrc::Mode modes[] = {
BRDSrc::kFullImage_Mode,
BRDSrc::kDivisor_Mode,
};
for (uint32_t sampleSize : sampleSizes) {
- for (CodecSrc::DstColorType dstColorType : dstColorTypes) {
- for (BRDSrc::Mode mode : modes) {
- push_brd_src(path, dstColorType, mode, sampleSize);
- }
+ for (BRDSrc::Mode mode : modes) {
+ push_brd_src(path, CodecSrc::kGetFromCanvas_DstColorType, mode, sampleSize);
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698