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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
374 | 374 |
375 if (FLAGS_matrix.count() == 4) { | 375 if (FLAGS_matrix.count() == 4) { |
376 SkMatrix m; | 376 SkMatrix m; |
377 m.reset(); | 377 m.reset(); |
378 m.setScaleX((SkScalar)atof(FLAGS_matrix[0])); | 378 m.setScaleX((SkScalar)atof(FLAGS_matrix[0])); |
379 m.setSkewX ((SkScalar)atof(FLAGS_matrix[1])); | 379 m.setSkewX ((SkScalar)atof(FLAGS_matrix[1])); |
380 m.setSkewY ((SkScalar)atof(FLAGS_matrix[2])); | 380 m.setSkewY ((SkScalar)atof(FLAGS_matrix[2])); |
381 m.setScaleY((SkScalar)atof(FLAGS_matrix[3])); | 381 m.setScaleY((SkScalar)atof(FLAGS_matrix[3])); |
382 VIA("matrix", ViaMatrix, m, wrapped); | 382 VIA("matrix", ViaMatrix, m, wrapped); |
383 VIA("upright", ViaUpright, m, wrapped); | 383 VIA("upright", ViaUpright, m, wrapped); |
384 } else if (FLAGS_matrix.count() == 9) { | |
385 SkMatrix m; | |
386 m.reset(); | |
387 m.setAll((SkScalar)atof(FLAGS_matrix[0]), | |
388 (SkScalar)atof(FLAGS_matrix[1]), | |
389 (SkScalar)atof(FLAGS_matrix[2]), | |
390 (SkScalar)atof(FLAGS_matrix[3]), | |
391 (SkScalar)atof(FLAGS_matrix[4]), | |
392 (SkScalar)atof(FLAGS_matrix[5]), | |
393 (SkScalar)atof(FLAGS_matrix[6]), | |
394 (SkScalar)atof(FLAGS_matrix[7]), | |
395 (SkScalar)atof(FLAGS_matrix[8])); | |
396 | |
397 VIA("matrix", ViaMatrix, m, wrapped); | |
398 VIA("upright", ViaUpright, m, wrapped); | |
mtklein
2015/05/05 15:51:44
I suspect ViaUpright won't really be a useful thin
| |
384 } | 399 } |
385 | 400 |
386 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | 401 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
387 VIA("androidsdk", ViaAndroidSDK, wrapped); | 402 VIA("androidsdk", ViaAndroidSDK, wrapped); |
388 #endif | 403 #endif |
389 | 404 |
390 #undef VIA | 405 #undef VIA |
391 return NULL; | 406 return NULL; |
392 } | 407 } |
393 | 408 |
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
755 } | 770 } |
756 return 0; | 771 return 0; |
757 } | 772 } |
758 | 773 |
759 #if !defined(SK_BUILD_FOR_IOS) | 774 #if !defined(SK_BUILD_FOR_IOS) |
760 int main(int argc, char** argv) { | 775 int main(int argc, char** argv) { |
761 SkCommandLineFlags::Parse(argc, argv); | 776 SkCommandLineFlags::Parse(argc, argv); |
762 return dm_main(); | 777 return dm_main(); |
763 } | 778 } |
764 #endif | 779 #endif |
OLD | NEW |