5#include "flutter/shell/platform/android/android_surface_vulkan_impeller.h"
10#include "flutter/fml/concurrent_message_loop.h"
11#include "flutter/fml/logging.h"
12#include "flutter/fml/memory/ref_ptr.h"
13#include "flutter/impeller/renderer/backend/vulkan/context_vk.h"
14#include "flutter/impeller/renderer/backend/vulkan/swapchain/swapchain_vk.h"
15#include "flutter/shell/gpu/gpu_surface_vulkan_impeller.h"
16#include "flutter/vulkan/vulkan_native_surface_android.h"
21 const std::shared_ptr<AndroidContextVulkanImpeller>& android_context) {
22 is_valid_ = android_context->IsValid();
26 surface_context_vk_ = context_vk.CreateSurfaceContext();
28 std::make_unique<GPUSurfaceVulkanImpeller>(surface_context_vk_);
47 if (!native_window_ || !native_window_->IsValid()) {
51 if (eager_gpu_surface_) {
52 auto gpu_surface = std::move(eager_gpu_surface_);
53 if (!gpu_surface->IsValid()) {
59 std::unique_ptr<GPUSurfaceVulkanImpeller> gpu_surface =
60 std::make_unique<GPUSurfaceVulkanImpeller>(surface_context_vk_);
62 if (!gpu_surface->IsValid()) {
70 surface_context_vk_->UpdateSurfaceSize(
89 native_window_ =
nullptr;
96 std::reinterpret_pointer_cast<impeller::Context>(
97 surface_context_vk_->GetParent()),
100 if (surface_context_vk_->SetSwapchain(std::move(
swapchain))) {
101 native_window_ = std::move(
window);
108std::shared_ptr<impeller::Context>
110 return surface_context_vk_;
bool SetNativeWindow(fml::RefPtr< AndroidNativeWindow > window) override
bool ResourceContextMakeCurrent() override
AndroidSurfaceVulkanImpeller(const std::shared_ptr< AndroidContextVulkanImpeller > &android_context)
std::unique_ptr< Surface > CreateGPUSurface(GrDirectContext *gr_context) override
void TeardownOnScreenContext() override
std::shared_ptr< impeller::Context > GetImpellerContext() override
~AndroidSurfaceVulkanImpeller() override
bool OnScreenSurfaceResize(const SkISize &size) override
bool ResourceContextClearCurrent() override
bool IsValid() const override
static ContextVK & Cast(Context &base)
static std::shared_ptr< SwapchainVK > Create(const std::shared_ptr< Context > &context, vk::UniqueSurfaceKHR surface, const ISize &size, bool enable_msaa=true)
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