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

Side by Side Diff: dm/DM.cpp

Issue 1849463002: rename sk_gpu_test::GLContext to sk_gpu_test::GLTestContext (Closed) Base URL: https://chromium.googlesource.com/skia.git@move
Patch Set: readd gpu.gypi 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 | « bench/nanobench.cpp ('k') | samplecode/SampleApp.cpp » ('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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
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; 73 using sk_gpu_test::GrContextFactory;
74 using sk_gpu_test::GLContext; 74 using sk_gpu_test::GLTestContext;
75 75
76 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/ 76 /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~*/
77 77
78 static const double kStartMs = SkTime::GetMSecs(); 78 static const double kStartMs = SkTime::GetMSecs();
79 79
80 static FILE* gVLog; 80 static FILE* gVLog;
81 81
82 template <typename... Args> 82 template <typename... Args>
83 static void vlog(const char* fmt, Args&&... args) { 83 static void vlog(const char* fmt, Args&&... args) {
84 if (gVLog) { 84 if (gVLog) {
(...skipping 1326 matching lines...) Expand 10 before | Expand all | Expand 10 after
1411 print_status(); 1411 print_status();
1412 info("Finished!\n"); 1412 info("Finished!\n");
1413 return 0; 1413 return 0;
1414 } 1414 }
1415 1415
1416 // 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.
1417 // Thus we export the empty RunWithGPUTestContexts when SK_SUPPORT_GPU=0. 1417 // Thus we export the empty RunWithGPUTestContexts when SK_SUPPORT_GPU=0.
1418 namespace skiatest { 1418 namespace skiatest {
1419 namespace { 1419 namespace {
1420 typedef void(*TestWithGrContext)(skiatest::Reporter*, GrContext*); 1420 typedef void(*TestWithGrContext)(skiatest::Reporter*, GrContext*);
1421 typedef void(*TestWithGrContextAndGLContext)(skiatest::Reporter*, GrContext*, GL Context*); 1421 typedef void(*TestWithGrContextAndGLContext)(skiatest::Reporter*, GrContext*, GL TestContext*);
1422 #if SK_SUPPORT_GPU 1422 #if SK_SUPPORT_GPU
1423 template<typename T> 1423 template<typename T>
1424 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);
1425 template<> 1425 template<>
1426 void call_test(TestWithGrContext test, skiatest::Reporter* reporter, 1426 void call_test(TestWithGrContext test, skiatest::Reporter* reporter,
1427 const GrContextFactory::ContextInfo& context) { 1427 const GrContextFactory::ContextInfo& context) {
1428 test(reporter, context.fGrContext); 1428 test(reporter, context.fGrContext);
1429 } 1429 }
1430 template<> 1430 template<>
1431 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
1500 Reporter* reporter, 1500 Reporter* reporter,
1501 GrContextFactory* fac tory); 1501 GrContextFactory* fac tory);
1502 } // namespace skiatest 1502 } // namespace skiatest
1503 1503
1504 #if !defined(SK_BUILD_FOR_IOS) 1504 #if !defined(SK_BUILD_FOR_IOS)
1505 int main(int argc, char** argv) { 1505 int main(int argc, char** argv) {
1506 SkCommandLineFlags::Parse(argc, argv); 1506 SkCommandLineFlags::Parse(argc, argv);
1507 return dm_main(); 1507 return dm_main();
1508 } 1508 }
1509 #endif 1509 #endif
OLDNEW
« no previous file with comments | « bench/nanobench.cpp ('k') | samplecode/SampleApp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698