5#include "flutter/shell/common/shell_test_platform_view.h"
8#include "flutter/shell/common/shell_test_platform_view_gl.h"
10#ifdef SHELL_ENABLE_VULKAN
11#include "flutter/shell/common/shell_test_platform_view_vulkan.h"
13#ifdef SHELL_ENABLE_METAL
14#include "flutter/shell/common/shell_test_platform_view_metal.h"
17#include "flutter/shell/common/vsync_waiter_fallback.h"
25 const std::shared_ptr<ShellTestVsyncClock>& vsync_clock,
28 const std::shared_ptr<ShellTestExternalViewEmbedder>&
29 shell_test_external_view_embedder,
30 const std::shared_ptr<const fml::SyncSwitch>& is_gpu_disabled_sync_switch) {
37 return std::make_unique<ShellTestPlatformViewGL>(
38 delegate, task_runners, vsync_clock, create_vsync_waiter,
39 shell_test_external_view_embedder);
41#ifdef SHELL_ENABLE_VULKAN
43 return std::make_unique<ShellTestPlatformViewVulkan>(
44 delegate, task_runners, vsync_clock, create_vsync_waiter,
45 shell_test_external_view_embedder);
47#ifdef SHELL_ENABLE_METAL
49 return std::make_unique<ShellTestPlatformViewMetal>(
50 delegate, task_runners, vsync_clock, create_vsync_waiter,
51 shell_test_external_view_embedder, is_gpu_disabled_sync_switch);
55 FML_LOG(
FATAL) <<
"No backends supported for ShellTestPlatformView";
61 : config_(
std::move(config)) {}
66 const auto vsync_clock = std::make_shared<ShellTestVsyncClock>();
71 return static_cast<std::unique_ptr<VsyncWaiter>
>(
72 std::make_unique<ShellTestVsyncWaiter>(task_runners, vsync_clock));
74 return static_cast<std::unique_ptr<VsyncWaiter>
>(
75 std::make_unique<VsyncWaiterFallback>(task_runners,
true));
85 shell.GetIsGpuDisabledSyncSwitch()
#define FML_LOG(severity)
std::function< std::unique_ptr< VsyncWaiter >()> CreateVsyncWaiter