OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "CrashHandler.h" | 8 #include "CrashHandler.h" |
9 #include "DMJsonWriter.h" | 9 #include "DMJsonWriter.h" |
10 #include "DMSrcSink.h" | 10 #include "DMSrcSink.h" |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 return; | 205 return; |
206 } | 206 } |
207 | 207 |
208 // Choose scales for scaling tests. | 208 // Choose scales for scaling tests. |
209 // TODO (msarett): Add more scaling tests as we implement more flexible scal
ing. | 209 // TODO (msarett): Add more scaling tests as we implement more flexible scal
ing. |
210 // TODO (msarett): Implement scaling tests for SkImageDecoder in order to co
mpare with these | 210 // TODO (msarett): Implement scaling tests for SkImageDecoder in order to co
mpare with these |
211 // tests. SkImageDecoder supports downscales by integer fac
tors. | 211 // tests. SkImageDecoder supports downscales by integer fac
tors. |
212 const float scales[] = { 0.125f, 0.25f, 0.375f, 0.5f, 0.625f, 0.750f, 0.875f
, 1.0f }; | 212 const float scales[] = { 0.125f, 0.25f, 0.375f, 0.5f, 0.625f, 0.750f, 0.875f
, 1.0f }; |
213 | 213 |
214 for (float scale : scales) { | 214 for (float scale : scales) { |
| 215 if (scale != 1.0f && (path.endsWith(".webp") || path.endsWith(".WEBP")))
{ |
| 216 // FIXME: skbug.com/4038 Scaling webp seems to leave some pixels uni
nitialized/ |
| 217 // compute their colors based on uninitialized values. |
| 218 continue; |
| 219 } |
215 // Build additional test cases for images that decode natively to non-ca
nvas types | 220 // Build additional test cases for images that decode natively to non-ca
nvas types |
216 switch(codec->getInfo().colorType()) { | 221 switch(codec->getInfo().colorType()) { |
217 case kGray_8_SkColorType: | 222 case kGray_8_SkColorType: |
218 push_src("image", "codec_kGray8", new CodecSrc(path, CodecSrc::k
Normal_Mode, | 223 push_src("image", "codec_kGray8", new CodecSrc(path, CodecSrc::k
Normal_Mode, |
219 CodecSrc::kGrayscale_Always_DstColorType, scale)); | 224 CodecSrc::kGrayscale_Always_DstColorType, scale)); |
220 push_src("image", "scanline_kGray8", new CodecSrc(path, CodecSrc
::kScanline_Mode, | 225 push_src("image", "scanline_kGray8", new CodecSrc(path, CodecSrc
::kScanline_Mode, |
221 CodecSrc::kGrayscale_Always_DstColorType, scale)); | 226 CodecSrc::kGrayscale_Always_DstColorType, scale)); |
222 push_src("image", "scanline_subset_kGray8", new CodecSrc(path, | 227 push_src("image", "scanline_subset_kGray8", new CodecSrc(path, |
223 CodecSrc::kScanline_Subset_Mode, CodecSrc::kGrayscale_Al
ways_DstColorType, | 228 CodecSrc::kScanline_Subset_Mode, CodecSrc::kGrayscale_Al
ways_DstColorType, |
224 scale)); | 229 scale)); |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
821 } | 826 } |
822 return 0; | 827 return 0; |
823 } | 828 } |
824 | 829 |
825 #if !defined(SK_BUILD_FOR_IOS) | 830 #if !defined(SK_BUILD_FOR_IOS) |
826 int main(int argc, char** argv) { | 831 int main(int argc, char** argv) { |
827 SkCommandLineFlags::Parse(argc, argv); | 832 SkCommandLineFlags::Parse(argc, argv); |
828 return dm_main(); | 833 return dm_main(); |
829 } | 834 } |
830 #endif | 835 #endif |
OLD | NEW |