aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-04-26 13:06:38 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-26 13:06:38 -0700
commitf3dc18851411c4a0f1d5c3ecc17353042e6cd440 (patch)
treeb0f63a3879bfbb7559710da64542ecf9557f1474 /dm
parentc5db972fce6eb3da2362c1e4e502f9fef01968f1 (diff)
Remove redundant tests to make DM a little faster
Diffstat (limited to 'dm')
-rw-r--r--dm/DM.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index e77c99c304..586a4e7250 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) {