| 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 continue; | 304 continue; |
| 305 } | 305 } |
| 306 | 306 |
| 307 for (CodecSrc::Mode mode : nativeModes) { | 307 for (CodecSrc::Mode mode : nativeModes) { |
| 308 for (uint32_t i = 0; i < numColorTypes; i++) { | 308 for (uint32_t i = 0; i < numColorTypes; i++) { |
| 309 push_codec_src(path, mode, colorTypes[i], scale); | 309 push_codec_src(path, mode, colorTypes[i], scale); |
| 310 } | 310 } |
| 311 } | 311 } |
| 312 } | 312 } |
| 313 | 313 |
| 314 if (path.endsWith(".ico") || path.endsWith(".ICO")) { |
| 315 // FIXME: skbug.com/4404: ICO does not have the ability to decode scanli
nes, so we cannot |
| 316 // use SkScaledCodec with it. |
| 317 return; |
| 318 } |
| 319 |
| 314 // SkScaledCodec Scales | 320 // SkScaledCodec Scales |
| 315 // The native scales are included to make sure that SkScaledCodec defaults t
o the native | 321 // The native scales are included to make sure that SkScaledCodec defaults t
o the native |
| 316 // scaling strategy when possible. | 322 // scaling strategy when possible. |
| 317 // 0.1, 0.16, 0.2 etc allow us to test SkScaledCodec with sampleSize 10, 6,
5, etc. | 323 // 0.1, 0.16, 0.2 etc allow us to test SkScaledCodec with sampleSize 10, 6,
5, etc. |
| 318 // 0.4, 0.7 etc allow to test what happens when the client requests a scale
that | 324 // 0.4, 0.7 etc allow to test what happens when the client requests a scale
that |
| 319 // does not exactly match a sampleSize or native scaling capability. | 325 // does not exactly match a sampleSize or native scaling capability. |
| 320 const float samplingScales[] = { 0.1f, 0.125f, 0.167f, 0.2f, 0.25f, 0.333f,
0.375f, 0.4f, 0.5f, | 326 const float samplingScales[] = { 0.1f, 0.125f, 0.167f, 0.2f, 0.25f, 0.333f,
0.375f, 0.4f, 0.5f, |
| 321 0.6f, 0.625f, 0.750f, 0.8f, 0.875f, 1.0f }; | 327 0.6f, 0.625f, 0.750f, 0.8f, 0.875f, 1.0f }; |
| 322 | 328 |
| 323 for (float scale : samplingScales) { | 329 for (float scale : samplingScales) { |
| (...skipping 777 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1101 } | 1107 } |
| 1102 return 0; | 1108 return 0; |
| 1103 } | 1109 } |
| 1104 | 1110 |
| 1105 #if !defined(SK_BUILD_FOR_IOS) | 1111 #if !defined(SK_BUILD_FOR_IOS) |
| 1106 int main(int argc, char** argv) { | 1112 int main(int argc, char** argv) { |
| 1107 SkCommandLineFlags::Parse(argc, argv); | 1113 SkCommandLineFlags::Parse(argc, argv); |
| 1108 return dm_main(); | 1114 return dm_main(); |
| 1109 } | 1115 } |
| 1110 #endif | 1116 #endif |
| OLD | NEW |