Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: dm/DM.cpp

Issue 1815823002: Move SkGLContext and some GrGLInterface implementations to skgputest module (Closed) Base URL: https://chromium.googlesource.com/skia.git@debugobject
Patch Set: fix windows and android? Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cmake/CMakeLists.txt ('k') | dm/DMGpuSupport.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1409 print_status(); 1411 print_status();
1410 info("Finished!\n"); 1412 info("Finished!\n");
1411 return 0; 1413 return 0;
1412 } 1414 }
1413 1415
1414 // TODO: currently many GPU tests are declared outside SK_SUPPORT_GPU guards. 1416 // TODO: currently many GPU tests are declared outside SK_SUPPORT_GPU guards.
1415 // Thus we export the empty RunWithGPUTestContexts when SK_SUPPORT_GPU=0. 1417 // Thus we export the empty RunWithGPUTestContexts when SK_SUPPORT_GPU=0.
1416 namespace skiatest { 1418 namespace skiatest {
1417 namespace { 1419 namespace {
1418 typedef void(*TestWithGrContext)(skiatest::Reporter*, GrContext*); 1420 typedef void(*TestWithGrContext)(skiatest::Reporter*, GrContext*);
1419 typedef void(*TestWithGrContextAndGLContext)(skiatest::Reporter*, GrContext*, Sk GLContext*); 1421 typedef void(*TestWithGrContextAndGLContext)(skiatest::Reporter*, GrContext*, GL Context*);
1420 #if SK_SUPPORT_GPU 1422 #if SK_SUPPORT_GPU
1421 template<typename T> 1423 template<typename T>
1422 void call_test(T test, skiatest::Reporter* reporter, const GrContextFactory::Con textInfo& context); 1424 void call_test(T test, skiatest::Reporter* reporter, const GrContextFactory::Con textInfo& context);
1423 template<> 1425 template<>
1424 void call_test(TestWithGrContext test, skiatest::Reporter* reporter, 1426 void call_test(TestWithGrContext test, skiatest::Reporter* reporter,
1425 const GrContextFactory::ContextInfo& context) { 1427 const GrContextFactory::ContextInfo& context) {
1426 test(reporter, context.fGrContext); 1428 test(reporter, context.fGrContext);
1427 } 1429 }
1428 template<> 1430 template<>
1429 void call_test(TestWithGrContextAndGLContext test, skiatest::Reporter* reporter, 1431 void call_test(TestWithGrContextAndGLContext test, skiatest::Reporter* reporter,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
1498 Reporter* reporter, 1500 Reporter* reporter,
1499 GrContextFactory* fac tory); 1501 GrContextFactory* fac tory);
1500 } // namespace skiatest 1502 } // namespace skiatest
1501 1503
1502 #if !defined(SK_BUILD_FOR_IOS) 1504 #if !defined(SK_BUILD_FOR_IOS)
1503 int main(int argc, char** argv) { 1505 int main(int argc, char** argv) {
1504 SkCommandLineFlags::Parse(argc, argv); 1506 SkCommandLineFlags::Parse(argc, argv);
1505 return dm_main(); 1507 return dm_main();
1506 } 1508 }
1507 #endif 1509 #endif
OLDNEW
« no previous file with comments | « cmake/CMakeLists.txt ('k') | dm/DMGpuSupport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698