// Copyright 2013 The Flutter Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include "flutter/shell/common/shell_test_platform_view_vulkan.h" #include "flutter/shell/gpu/gpu_surface_vulkan.h" namespace flutter { namespace testing { ShellTestPlatformViewVulkan::ShellTestPlatformViewVulkan( PlatformView::Delegate& delegate, TaskRunners task_runners, std::shared_ptr vsync_clock, CreateVsyncWaiter create_vsync_waiter) : ShellTestPlatformView(delegate, std::move(task_runners)), create_vsync_waiter_(std::move(create_vsync_waiter)), vsync_clock_(vsync_clock), proc_table_(fml::MakeRefCounted()) {} ShellTestPlatformViewVulkan::~ShellTestPlatformViewVulkan() = default; std::unique_ptr ShellTestPlatformViewVulkan::CreateVSyncWaiter() { return create_vsync_waiter_(); } void ShellTestPlatformViewVulkan::SimulateVSync() { vsync_clock_->SimulateVSync(); } // |PlatformView| std::unique_ptr ShellTestPlatformViewVulkan::CreateRenderingSurface() { return std::make_unique(this, nullptr, true); } // |PlatformView| PointerDataDispatcherMaker ShellTestPlatformViewVulkan::GetDispatcherMaker() { return [](DefaultPointerDataDispatcher::Delegate& delegate) { return std::make_unique(delegate); }; } // |GPUSurfaceVulkanDelegate| fml::RefPtr ShellTestPlatformViewVulkan::vk() { return proc_table_; } } // namespace testing } // namespace flutter