Flutter Engine
The Flutter Engine
shell_test_platform_view_vulkan.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_SHELL_COMMON_SHELL_TEST_PLATFORM_VIEW_VULKAN_H_
6#define FLUTTER_SHELL_COMMON_SHELL_TEST_PLATFORM_VIEW_VULKAN_H_
7
8#include "flutter/shell/common/shell_test_external_view_embedder.h"
9#include "flutter/shell/common/shell_test_platform_view.h"
10#include "flutter/shell/gpu/gpu_surface_vulkan_delegate.h"
11#include "flutter/vulkan/vulkan_application.h"
12#include "flutter/vulkan/vulkan_device.h"
13#include "flutter/vulkan/vulkan_skia_proc_table.h"
14
15namespace flutter {
16namespace testing {
17
19 public:
21 const TaskRunners& task_runners,
22 std::shared_ptr<ShellTestVsyncClock> vsync_clock,
23 CreateVsyncWaiter create_vsync_waiter,
24 std::shared_ptr<ShellTestExternalViewEmbedder>
25 shell_test_external_view_embedder);
26
28
29 void SimulateVSync() override;
30
31 private:
32 class OffScreenSurface : public flutter::Surface {
33 public:
35 std::shared_ptr<ShellTestExternalViewEmbedder>
36 shell_test_external_view_embedder);
37
38 ~OffScreenSurface() override;
39
40 // |Surface|
41 bool IsValid() override;
42
43 // |Surface|
44 std::unique_ptr<SurfaceFrame> AcquireFrame(const SkISize& size) override;
45
46 // |Surface|
47 SkMatrix GetRootTransformation() const override;
48
49 // |Surface|
50 GrDirectContext* GetContext() override;
51
52 private:
53 bool valid_ = false;
55 std::shared_ptr<ShellTestExternalViewEmbedder>
56 shell_test_external_view_embedder_;
57 std::unique_ptr<vulkan::VulkanApplication> application_;
58 std::unique_ptr<vulkan::VulkanDevice> logical_device_;
61
62 bool CreateSkiaGrContext();
63 bool CreateSkiaBackendContext(GrVkBackendContext*,
65
66 FML_DISALLOW_COPY_AND_ASSIGN(OffScreenSurface);
67 };
68
69 CreateVsyncWaiter create_vsync_waiter_;
70
71 std::shared_ptr<ShellTestVsyncClock> vsync_clock_;
72
74
75 std::shared_ptr<ShellTestExternalViewEmbedder>
76 shell_test_external_view_embedder_;
77
78 // |PlatformView|
79 std::unique_ptr<Surface> CreateRenderingSurface() override;
80
81 // |PlatformView|
82 std::shared_ptr<ExternalViewEmbedder> CreateExternalViewEmbedder() override;
83
84 // |PlatformView|
85 std::unique_ptr<VsyncWaiter> CreateVSyncWaiter() override;
86
87 // |PlatformView|
88 PointerDataDispatcherMaker GetDispatcherMaker() override;
89
90 FML_DISALLOW_COPY_AND_ASSIGN(ShellTestPlatformViewVulkan);
91};
92
93} // namespace testing
94} // namespace flutter
95
96#endif // FLUTTER_SHELL_COMMON_SHELL_TEST_PLATFORM_VIEW_VULKAN_H_
Used to forward events from the platform view to interested subsystems. This forwarding is done by th...
Definition: platform_view.h:60
Abstract Base Class that represents where we will be rendering content.
Definition: surface.h:24
ShellTestPlatformViewVulkan(PlatformView::Delegate &delegate, const TaskRunners &task_runners, std::shared_ptr< ShellTestVsyncClock > vsync_clock, CreateVsyncWaiter create_vsync_waiter, std::shared_ptr< ShellTestExternalViewEmbedder > shell_test_external_view_embedder)
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition: macros.h:27
SK_API GrDirectContext * GetContext(const SkImage *src)
std::function< std::unique_ptr< VsyncWaiter >()> CreateVsyncWaiter
std::function< std::unique_ptr< PointerDataDispatcher >(PointerDataDispatcher::Delegate &)> PointerDataDispatcherMaker
Signature for constructing PointerDataDispatcher.
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
vk
Definition: malisc.py:42
Definition: SkSize.h:16