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

Unified Diff: dm/DM.cpp

Issue 1923533002: Remove redundant tests to make DM a little faster (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Test all alpha modes Created 4 years, 8 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 e77c99c3042740aef3c304024ce0b1c18b8ee14c..586a4e7250c2202fcfb540230684098390bc335b 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -547,6 +547,13 @@ static void push_codec_srcs(Path path) {
continue;
}
+ // Skip kNonNative on different native scales. It won't be interestingly
+ // different.
+ if (CodecSrc::kNonNative8888_Always_DstColorType == colorType && 1.0f != scale)
+ {
+ continue;
+ }
+
push_codec_src(path, mode, colorType, alphaType, scale);
}
}
@@ -577,6 +584,12 @@ static void push_codec_srcs(Path path) {
for (int sampleSize : sampleSizes) {
for (CodecSrc::DstColorType colorType : colorTypes) {
for (SkAlphaType alphaType : alphaModes) {
+ // We can exercise all of the kNonNative support code in the swizzler with just a
+ // few sample sizes. Skip the rest.
+ if (CodecSrc::kNonNative8888_Always_DstColorType == colorType && sampleSize > 3) {
+ continue;
+ }
+
push_android_codec_src(path, AndroidCodecSrc::kFullImage_Mode, colorType,
alphaType, sampleSize);
if (subset) {
« 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