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 } | 304 } |
305 } | 305 } |
306 } | 306 } |
307 | 307 |
308 // SkScaledCodec Scales | 308 // SkScaledCodec Scales |
309 // The native scales are included to make sure that SkScaledCodec defaults t
o the native | 309 // The native scales are included to make sure that SkScaledCodec defaults t
o the native |
310 // scaling strategy when possible. | 310 // scaling strategy when possible. |
311 // 0.1, 0.16, 0.2 etc allow us to test SkScaledCodec with sampleSize 10, 6,
5, etc. | 311 // 0.1, 0.16, 0.2 etc allow us to test SkScaledCodec with sampleSize 10, 6,
5, etc. |
312 // 0.4, 0.7 etc allow to test what happens when the client requests a scale
that | 312 // 0.4, 0.7 etc allow to test what happens when the client requests a scale
that |
313 // does not exactly match a sampleSize or native scaling capability. | 313 // does not exactly match a sampleSize or native scaling capability. |
314 const float samplingScales[] = { 0.1f, 0.125f, 0.166f, 0.2f, 0.25f, 0.333f,
0.375f, 0.4f, 0.5f, | 314 const float samplingScales[] = { 0.1f, 0.125f, 0.167f, 0.2f, 0.25f, 0.333f,
0.375f, 0.4f, 0.5f, |
315 0.6f, 0.625f, 0.750f, 0.8f, 0.875f, 1.0f }; | 315 0.6f, 0.625f, 0.750f, 0.8f, 0.875f, 1.0f }; |
316 | 316 |
317 for (float scale : samplingScales) { | 317 for (float scale : samplingScales) { |
318 if (scale != 1.0f && (path.endsWith(".webp") || path.endsWith(".WEBP")))
{ | 318 if (scale != 1.0f && (path.endsWith(".webp") || path.endsWith(".WEBP")))
{ |
319 // FIXME: skbug.com/4038 Scaling webp seems to leave some pixels uni
nitialized/ | 319 // FIXME: skbug.com/4038 Scaling webp seems to leave some pixels uni
nitialized/ |
320 // compute their colors based on uninitialized values. | 320 // compute their colors based on uninitialized values. |
321 continue; | 321 continue; |
322 } | 322 } |
323 | 323 |
324 for (uint32_t i = 0; i < numColorTypes; i++) { | 324 for (uint32_t i = 0; i < numColorTypes; i++) { |
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1094 } | 1094 } |
1095 return 0; | 1095 return 0; |
1096 } | 1096 } |
1097 | 1097 |
1098 #if !defined(SK_BUILD_FOR_IOS) | 1098 #if !defined(SK_BUILD_FOR_IOS) |
1099 int main(int argc, char** argv) { | 1099 int main(int argc, char** argv) { |
1100 SkCommandLineFlags::Parse(argc, argv); | 1100 SkCommandLineFlags::Parse(argc, argv); |
1101 return dm_main(); | 1101 return dm_main(); |
1102 } | 1102 } |
1103 #endif | 1103 #endif |
OLD | NEW |