Chromium Code Reviews| Index: dm/DM.cpp |
| diff --git a/dm/DM.cpp b/dm/DM.cpp |
| index e77c99c3042740aef3c304024ce0b1c18b8ee14c..9878ae8d21f6ae7181ba3fa2fb7581faaed19ec2 100644 |
| --- a/dm/DM.cpp |
| +++ b/dm/DM.cpp |
| @@ -547,6 +547,14 @@ static void push_codec_srcs(Path path) { |
| continue; |
| } |
| + // Only test kNonNative_DstColorType when the alpha type is premul and there is |
|
scroggo
2016/04/26 13:22:33
I found this a little bit confusing. I thought you
msarett
2016/04/26 15:00:54
Yes you're correct. You make a good point that un
|
| + // no native scale. This test won't be interestingly different with different |
| + // alpha types or scales. |
| + if (CodecSrc::kNonNative8888_Always_DstColorType == colorType && |
| + (kPremul_SkAlphaType != alphaType || 1.0f != scale)) { |
| + continue; |
| + } |
| + |
| push_codec_src(path, mode, colorType, alphaType, scale); |
| } |
| } |
| @@ -577,6 +585,14 @@ static void push_codec_srcs(Path path) { |
| for (int sampleSize : sampleSizes) { |
| for (CodecSrc::DstColorType colorType : colorTypes) { |
| for (SkAlphaType alphaType : alphaModes) { |
| + // Only test kNonNative_DstColorType when the alpha type is premul and sample size |
| + // is 1 or 2. This test won't be interestingly different with different |
| + // alpha types or additional sample sizes. |
|
scroggo
2016/04/26 13:22:33
Why not for additional sample sizes? Won't we be e
msarett
2016/04/26 15:00:54
Sampling vs not-sampling will exercise different c
scroggo
2016/04/26 15:31:40
sgtm
|
| + if (CodecSrc::kNonNative8888_Always_DstColorType == colorType && |
| + (kPremul_SkAlphaType != alphaType || sampleSize > 2)) { |
| + continue; |
| + } |
| + |
| push_android_codec_src(path, AndroidCodecSrc::kFullImage_Mode, colorType, |
| alphaType, sampleSize); |
| if (subset) { |