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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 | 63 |
64 DEFINE_string(uninterestingHashesFile, "", | 64 DEFINE_string(uninterestingHashesFile, "", |
65 "File containing a list of uninteresting hashes. If a result hashes to s
omething in " | 65 "File containing a list of uninteresting hashes. If a result hashes to s
omething in " |
66 "this list, no image is written for that result."); | 66 "this list, no image is written for that result."); |
67 | 67 |
68 DEFINE_int32(shards, 1, "We're splitting source data into this many shards."); | 68 DEFINE_int32(shards, 1, "We're splitting source data into this many shards."); |
69 DEFINE_int32(shard, 0, "Which shard do I run?"); | 69 DEFINE_int32(shard, 0, "Which shard do I run?"); |
70 DEFINE_bool(simpleCodec, false, "Only decode images to native scale"); | 70 DEFINE_bool(simpleCodec, false, "Only decode images to native scale"); |
71 | 71 |
72 using namespace DM; | 72 using namespace DM; |
| 73 using sk_gpu_test::GrContextFactory; |
| 74 using sk_gpu_test::GLContext; |
73 | 75 |
74 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~*/ | 76 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~*/ |
75 | 77 |
76 static const double kStartMs = SkTime::GetMSecs(); | 78 static const double kStartMs = SkTime::GetMSecs(); |
77 | 79 |
78 static FILE* gVLog; | 80 static FILE* gVLog; |
79 | 81 |
80 template <typename... Args> | 82 template <typename... Args> |
81 static void vlog(const char* fmt, Args&&... args) { | 83 static void vlog(const char* fmt, Args&&... args) { |
82 if (gVLog) { | 84 if (gVLog) { |
(...skipping 1321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1404 print_status(); | 1406 print_status(); |
1405 info("Finished!\n"); | 1407 info("Finished!\n"); |
1406 return 0; | 1408 return 0; |
1407 } | 1409 } |
1408 | 1410 |
1409 // TODO: currently many GPU tests are declared outside SK_SUPPORT_GPU guards. | 1411 // TODO: currently many GPU tests are declared outside SK_SUPPORT_GPU guards. |
1410 // Thus we export the empty RunWithGPUTestContexts when SK_SUPPORT_GPU=0. | 1412 // Thus we export the empty RunWithGPUTestContexts when SK_SUPPORT_GPU=0. |
1411 namespace skiatest { | 1413 namespace skiatest { |
1412 namespace { | 1414 namespace { |
1413 typedef void(*TestWithGrContext)(skiatest::Reporter*, GrContext*); | 1415 typedef void(*TestWithGrContext)(skiatest::Reporter*, GrContext*); |
1414 typedef void(*TestWithGrContextAndGLContext)(skiatest::Reporter*, GrContext*, Sk
GLContext*); | 1416 typedef void(*TestWithGrContextAndGLContext)(skiatest::Reporter*, GrContext*, GL
Context*); |
1415 #if SK_SUPPORT_GPU | 1417 #if SK_SUPPORT_GPU |
1416 template<typename T> | 1418 template<typename T> |
1417 void call_test(T test, skiatest::Reporter* reporter, const GrContextFactory::Con
textInfo& context); | 1419 void call_test(T test, skiatest::Reporter* reporter, const GrContextFactory::Con
textInfo& context); |
1418 template<> | 1420 template<> |
1419 void call_test(TestWithGrContext test, skiatest::Reporter* reporter, | 1421 void call_test(TestWithGrContext test, skiatest::Reporter* reporter, |
1420 const GrContextFactory::ContextInfo& context) { | 1422 const GrContextFactory::ContextInfo& context) { |
1421 test(reporter, context.fGrContext); | 1423 test(reporter, context.fGrContext); |
1422 } | 1424 } |
1423 template<> | 1425 template<> |
1424 void call_test(TestWithGrContextAndGLContext test, skiatest::Reporter* reporter, | 1426 void call_test(TestWithGrContextAndGLContext test, skiatest::Reporter* reporter, |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1493 Reporter* reporter, | 1495 Reporter* reporter, |
1494 GrContextFactory* fac
tory); | 1496 GrContextFactory* fac
tory); |
1495 } // namespace skiatest | 1497 } // namespace skiatest |
1496 | 1498 |
1497 #if !defined(SK_BUILD_FOR_IOS) | 1499 #if !defined(SK_BUILD_FOR_IOS) |
1498 int main(int argc, char** argv) { | 1500 int main(int argc, char** argv) { |
1499 SkCommandLineFlags::Parse(argc, argv); | 1501 SkCommandLineFlags::Parse(argc, argv); |
1500 return dm_main(); | 1502 return dm_main(); |
1501 } | 1503 } |
1502 #endif | 1504 #endif |
OLD | NEW |