17 const std::shared_ptr<ShellTestVsyncClock>& vsync_clock,
19 const std::shared_ptr<ShellTestExternalViewEmbedder>&
20 shell_test_external_view_embedder,
21 const std::shared_ptr<const fml::SyncSwitch>& is_gpu_disabled_sync_switch) {
25 case BackendType::kGLBackend:
26 return CreateGL(delegate, task_runners, vsync_clock, create_vsync_waiter,
27 shell_test_external_view_embedder,
28 is_gpu_disabled_sync_switch);
29 case BackendType::kMetalBackend:
30 return CreateMetal(delegate, task_runners, vsync_clock,
31 create_vsync_waiter, shell_test_external_view_embedder,
32 is_gpu_disabled_sync_switch);
33 case BackendType::kVulkanBackend:
35 delegate, task_runners, vsync_clock, create_vsync_waiter,
36 shell_test_external_view_embedder, is_gpu_disabled_sync_switch);
40#ifndef SHELL_ENABLE_GL
44 const std::shared_ptr<ShellTestVsyncClock>& vsync_clock,
46 const std::shared_ptr<ShellTestExternalViewEmbedder>&
47 shell_test_external_view_embedder,
48 const std::shared_ptr<const fml::SyncSwitch>& is_gpu_disabled_sync_switch) {
49 FML_LOG(FATAL) <<
"OpenGL backend not enabled in this build";
53#ifndef SHELL_ENABLE_METAL
57 const std::shared_ptr<ShellTestVsyncClock>& vsync_clock,
59 const std::shared_ptr<ShellTestExternalViewEmbedder>&
60 shell_test_external_view_embedder,
61 const std::shared_ptr<const fml::SyncSwitch>& is_gpu_disabled_sync_switch) {
62 FML_LOG(FATAL) <<
"Metal backend not enabled in this build";
66#ifndef SHELL_ENABLE_VULKAN
70 const std::shared_ptr<ShellTestVsyncClock>& vsync_clock,
72 const std::shared_ptr<ShellTestExternalViewEmbedder>&
73 shell_test_external_view_embedder,
74 const std::shared_ptr<const fml::SyncSwitch>& is_gpu_disabled_sync_switch) {
75 FML_LOG(FATAL) <<
"Vulkan backend not enabled in this build";
81 : config_(
std::move(config)) {}
86 const auto vsync_clock = std::make_shared<ShellTestVsyncClock>();
91 return static_cast<std::unique_ptr<VsyncWaiter>
>(
92 std::make_unique<ShellTestVsyncWaiter>(task_runners, vsync_clock));
94 return static_cast<std::unique_ptr<VsyncWaiter>
>(
95 std::make_unique<VsyncWaiterFallback>(task_runners,
true));
const TaskRunners & GetTaskRunners() const override
If callers wish to interact directly with any shell subcomponents, they must (on the platform thread)...
std::shared_ptr< const fml::SyncSwitch > GetIsGpuDisabledSyncSwitch() const override
Accessor for the disable GPU SyncSwitch.
#define FML_LOG(severity)
std::function< std::unique_ptr< VsyncWaiter >()> CreateVsyncWaiter