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

Side by Side Diff: dm/DM.cpp

Issue 1872283003: Vulkan config in dm (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix no-gpu build 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 | « no previous file | 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 1329 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 } 1340 }
1341 } 1341 }
1342 gather_gold(); 1342 gather_gold();
1343 gather_uninteresting_hashes(); 1343 gather_uninteresting_hashes();
1344 1344
1345 if (!gather_srcs()) { 1345 if (!gather_srcs()) {
1346 return 1; 1346 return 1;
1347 } 1347 }
1348 gather_sinks(); 1348 gather_sinks();
1349 gather_tests(); 1349 gather_tests();
1350
1351 gPending = gSrcs.count() * gSinks.count() + gParallelTests.count() + gSerial Tests.count(); 1350 gPending = gSrcs.count() * gSinks.count() + gParallelTests.count() + gSerial Tests.count();
1352 info("%d srcs * %d sinks + %d tests == %d tasks", 1351 info("%d srcs * %d sinks + %d tests == %d tasks",
1353 gSrcs.count(), gSinks.count(), gParallelTests.count() + gSerialTests.co unt(), gPending); 1352 gSrcs.count(), gSinks.count(), gParallelTests.count() + gSerialTests.co unt(), gPending);
1354 SkAutoTDelete<SkThread> statusThread(start_status_thread()); 1353 SkAutoTDelete<SkThread> statusThread(start_status_thread());
1355 1354
1356 // Kick off as much parallel work as we can, making note of any serial work we'll need to do. 1355 // Kick off as much parallel work as we can, making note of any serial work we'll need to do.
1357 SkTaskGroup parallel; 1356 SkTaskGroup parallel;
1358 SkTArray<Task> serial; 1357 SkTArray<Task> serial;
1359 1358
1360 for (auto& sink : gSinks) 1359 for (auto& sink : gSinks)
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
1413 } 1412 }
1414 1413
1415 // TODO: currently many GPU tests are declared outside SK_SUPPORT_GPU guards. 1414 // TODO: currently many GPU tests are declared outside SK_SUPPORT_GPU guards.
1416 // Thus we export the empty RunWithGPUTestContexts when SK_SUPPORT_GPU=0. 1415 // Thus we export the empty RunWithGPUTestContexts when SK_SUPPORT_GPU=0.
1417 namespace skiatest { 1416 namespace skiatest {
1418 1417
1419 #if SK_SUPPORT_GPU 1418 #if SK_SUPPORT_GPU
1420 bool IsGLContextType(sk_gpu_test::GrContextFactory::ContextType type) { 1419 bool IsGLContextType(sk_gpu_test::GrContextFactory::ContextType type) {
1421 return kOpenGL_GrBackend == GrContextFactory::ContextTypeBackend(type); 1420 return kOpenGL_GrBackend == GrContextFactory::ContextTypeBackend(type);
1422 } 1421 }
1422 bool IsVulkanContextType(sk_gpu_test::GrContextFactory::ContextType type) {
1423 return kVulkan_GrBackend == GrContextFactory::ContextTypeBackend(type);
1424 }
1423 bool IsRenderingGLContextType(sk_gpu_test::GrContextFactory::ContextType type) { 1425 bool IsRenderingGLContextType(sk_gpu_test::GrContextFactory::ContextType type) {
1424 return IsGLContextType(type) && GrContextFactory::IsRenderingContext(type); 1426 return IsGLContextType(type) && GrContextFactory::IsRenderingContext(type);
1425 } 1427 }
1426 bool IsNullGLContextType(sk_gpu_test::GrContextFactory::ContextType type) { 1428 bool IsNullGLContextType(sk_gpu_test::GrContextFactory::ContextType type) {
1427 return type == GrContextFactory::kNullGL_ContextType; 1429 return type == GrContextFactory::kNullGL_ContextType;
1428 } 1430 }
1429 #else 1431 #else
1430 bool IsGLContextType(int) { return false; } 1432 bool IsGLContextType(int) { return false; }
1433 bool IsVulkanContextType(int) { return false; }
1431 bool IsRenderingGLContextType(int) { return false; } 1434 bool IsRenderingGLContextType(int) { return false; }
1432 bool IsNullGLContextType(int) { return false; } 1435 bool IsNullGLContextType(int) { return false; }
1433 #endif 1436 #endif
1434 1437
1435 void RunWithGPUTestContexts(GrContextTestFn* test, GrContextTypeFilterFn* contex tTypeFilter, 1438 void RunWithGPUTestContexts(GrContextTestFn* test, GrContextTypeFilterFn* contex tTypeFilter,
1436 Reporter* reporter, GrContextFactory* factory) { 1439 Reporter* reporter, GrContextFactory* factory) {
1437 #if SK_SUPPORT_GPU 1440 #if SK_SUPPORT_GPU
1438 1441
1439 for (int typeInt = 0; typeInt < GrContextFactory::kContextTypeCnt; ++typeInt ) { 1442 for (int typeInt = 0; typeInt < GrContextFactory::kContextTypeCnt; ++typeInt ) {
1440 GrContextFactory::ContextType contextType = (GrContextFactory::ContextTy pe) typeInt; 1443 GrContextFactory::ContextType contextType = (GrContextFactory::ContextTy pe) typeInt;
(...skipping 21 matching lines...) Expand all
1462 #endif 1465 #endif
1463 } 1466 }
1464 } // namespace skiatest 1467 } // namespace skiatest
1465 1468
1466 #if !defined(SK_BUILD_FOR_IOS) 1469 #if !defined(SK_BUILD_FOR_IOS)
1467 int main(int argc, char** argv) { 1470 int main(int argc, char** argv) {
1468 SkCommandLineFlags::Parse(argc, argv); 1471 SkCommandLineFlags::Parse(argc, argv);
1469 return dm_main(); 1472 return dm_main();
1470 } 1473 }
1471 #endif 1474 #endif
OLDNEW
« no previous file with comments | « no previous file | dm/DMGpuSupport.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698