Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
embedder_test_context_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_PLATFORM_EMBEDDER_TESTS_EMBEDDER_TEST_CONTEXT_VULKAN_H_
6#define FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_TEST_CONTEXT_VULKAN_H_
7
8#include <memory>
9#include "flutter/shell/platform/embedder/tests/embedder_test_context.h"
10#include "flutter/testing/test_vulkan_context.h"
11#include "flutter/vulkan/vulkan_application.h"
13
14namespace flutter {
15namespace testing {
16
18 public:
19 explicit EmbedderTestContextVulkan(std::string assets_path = "");
20
22
23 // |EmbedderTestContext|
25
26 // |EmbedderTestContext|
27 size_t GetSurfacePresentCount() const override;
28
29 // |EmbedderTestContext|
30 void SetupCompositor() override;
31
32 VkImage GetNextImage(const SkISize& size);
33
34 bool PresentImage(VkImage image);
35
36 static void* InstanceProcAddr(void* user_data,
38 const char* name);
39
40 private:
41 std::unique_ptr<TestVulkanSurface> surface_;
42
43 SkISize surface_size_ = SkISize::MakeEmpty();
44 size_t present_count_ = 0;
45
46 void SetupSurface(SkISize surface_size) override;
47
49
51};
52
53} // namespace testing
54} // namespace flutter
55
56#endif // FLUTTER_SHELL_PLATFORM_EMBEDDER_TESTS_EMBEDDER_TEST_CONTEXT_VULKAN_H_
static void * InstanceProcAddr(void *user_data, FlutterVulkanInstanceHandle instance, const char *name)
EmbedderTestContextType GetContextType() const override
void * FlutterVulkanInstanceHandle
Alias for VkInstance.
Definition embedder.h:706
VkInstance instance
Definition main.cc:48
sk_sp< SkImage > image
Definition examples.cpp:29
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
Definition macros.h:27
DEF_SWITCHES_START aot vmservice shared library name
Definition switches.h:32
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
static constexpr SkISize MakeEmpty()
Definition SkSize.h:22