5#include "flutter/shell/platform/embedder/tests/embedder_test_context_vulkan.h"
10#include "flutter/fml/logging.h"
11#include "flutter/shell/platform/embedder/tests/embedder_test_compositor_vulkan.h"
12#include "flutter/testing/test_vulkan_context.h"
13#include "flutter/testing/test_vulkan_surface.h"
14#include "flutter/vulkan/procs/vulkan_proc_table.h"
15#include "flutter/vulkan/vulkan_device.h"
23 vulkan_context_ = fml::MakeRefCounted<TestVulkanContext>();
28void EmbedderTestContextVulkan::SetupSurface(
SkISize surface_size) {
30 surface_size_ = surface_size;
35 return present_count_;
39 return surface_->GetImage();
44 [&]() {
return surface_->GetSurfaceSnapshot(); });
56 <<
"Set up the Vulkan surface before setting up a compositor.";
57 compositor_ = std::make_unique<EmbedderTestCompositorVulkan>(
58 surface_size_, vulkan_context_->GetGrDirectContext());
66 ->vulkan_context_->vk_->GetInstanceProcAddr(
68 return reinterpret_cast<void*
>(proc_addr);
VkImage GetNextImage(const SkISize &size)
bool PresentImage(VkImage image)
EmbedderTestContextVulkan(std::string assets_path="")
static void * InstanceProcAddr(void *user_data, FlutterVulkanInstanceHandle instance, const char *name)
EmbedderTestContextType GetContextType() const override
void SetupCompositor() override
size_t GetSurfacePresentCount() const override
~EmbedderTestContextVulkan() override
std::unique_ptr< EmbedderTestCompositor > compositor_
void FireRootSurfacePresentCallbackIfPresent(const std::function< sk_sp< SkImage >(void)> &image_callback)
static std::unique_ptr< TestVulkanSurface > Create(const TestVulkanContext &context, const SkISize &surface_size)
void * FlutterVulkanInstanceHandle
Alias for VkInstance.
#define FML_CHECK(condition)
sk_sp< const SkImage > image
DEF_SWITCHES_START aot vmservice shared library name
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