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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
308 static int N = 0; | 308 static int N = 0; |
309 return N++ % FLAGS_shards == FLAGS_shard; | 309 return N++ % FLAGS_shards == FLAGS_shard; |
310 } | 310 } |
311 | 311 |
312 static void push_src(const char* tag, ImplicitString options, Src* s) { | 312 static void push_src(const char* tag, ImplicitString options, Src* s) { |
313 SkAutoTDelete<Src> src(s); | 313 SkAutoTDelete<Src> src(s); |
314 if (in_shard() && | 314 if (in_shard() && |
315 FLAGS_src.contains(tag) && | 315 FLAGS_src.contains(tag) && |
316 !SkCommandLineFlags::ShouldSkip(FLAGS_match, src->name().c_str())) { | 316 !SkCommandLineFlags::ShouldSkip(FLAGS_match, src->name().c_str())) { |
317 TaggedSrc& s = gSrcs.push_back(); | 317 TaggedSrc& s = gSrcs.push_back(); |
318 s.reset(src.detach()); | 318 s.reset(src.release()); |
319 s.tag = tag; | 319 s.tag = tag; |
320 s.options = options; | 320 s.options = options; |
321 } | 321 } |
322 } | 322 } |
323 | 323 |
324 static void push_codec_src(Path path, CodecSrc::Mode mode, CodecSrc::DstColorTyp
e dstColorType, | 324 static void push_codec_src(Path path, CodecSrc::Mode mode, CodecSrc::DstColorTyp
e dstColorType, |
325 SkAlphaType dstAlphaType, float scale) { | 325 SkAlphaType dstAlphaType, float scale) { |
326 if (FLAGS_simpleCodec) { | 326 if (FLAGS_simpleCodec) { |
327 if (mode != CodecSrc::kCodec_Mode || dstColorType != CodecSrc::kGetFromC
anvas_DstColorType | 327 if (mode != CodecSrc::kCodec_Mode || dstColorType != CodecSrc::kGetFromC
anvas_DstColorType |
328 || scale != 1.0f) | 328 || scale != 1.0f) |
(...skipping 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
784 SkBitmap bitmap; | 784 SkBitmap bitmap; |
785 SkDynamicMemoryWStream stream; | 785 SkDynamicMemoryWStream stream; |
786 SkString log; | 786 SkString log; |
787 Error err = sink->draw(justOneRect, &bitmap, &stream, &log); | 787 Error err = sink->draw(justOneRect, &bitmap, &stream, &log); |
788 if (err.isFatal()) { | 788 if (err.isFatal()) { |
789 info("Could not run %s: %s\n", config.getTag().c_str(), err.c_str()); | 789 info("Could not run %s: %s\n", config.getTag().c_str(), err.c_str()); |
790 exit(1); | 790 exit(1); |
791 } | 791 } |
792 | 792 |
793 TaggedSink& ts = gSinks.push_back(); | 793 TaggedSink& ts = gSinks.push_back(); |
794 ts.reset(sink.detach()); | 794 ts.reset(sink.release()); |
795 ts.tag = config.getTag(); | 795 ts.tag = config.getTag(); |
796 } | 796 } |
797 | 797 |
798 static bool gpu_supported() { | 798 static bool gpu_supported() { |
799 #if SK_SUPPORT_GPU | 799 #if SK_SUPPORT_GPU |
800 return FLAGS_gpu; | 800 return FLAGS_gpu; |
801 #else | 801 #else |
802 return false; | 802 return false; |
803 #endif | 803 #endif |
804 } | 804 } |
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1486 Reporter* reporter, | 1486 Reporter* reporter, |
1487 GrContextFactory* fac
tory); | 1487 GrContextFactory* fac
tory); |
1488 } // namespace skiatest | 1488 } // namespace skiatest |
1489 | 1489 |
1490 #if !defined(SK_BUILD_FOR_IOS) | 1490 #if !defined(SK_BUILD_FOR_IOS) |
1491 int main(int argc, char** argv) { | 1491 int main(int argc, char** argv) { |
1492 SkCommandLineFlags::Parse(argc, argv); | 1492 SkCommandLineFlags::Parse(argc, argv); |
1493 return dm_main(); | 1493 return dm_main(); |
1494 } | 1494 } |
1495 #endif | 1495 #endif |
OLD | NEW |