23 const std::shared_ptr<AndroidContextVKImpeller>& android_context) {
24 is_valid_ = android_context->IsValid();
28 surface_context_vk_ = context_vk.CreateSurfaceContext();
38 surface_context_vk_->TeardownSwapchain();
42 GrDirectContext* gr_context) {
47 if (!native_window_ || !native_window_->IsValid()) {
51 std::unique_ptr<GPUSurfaceVulkanImpeller> gpu_surface =
52 std::make_unique<GPUSurfaceVulkanImpeller>(
nullptr, surface_context_vk_);
54 if (!gpu_surface->IsValid()) {
62 surface_context_vk_->UpdateSurfaceSize(
77 const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade) {
82 native_window_ =
nullptr;
89 FML_CHECK(jni_facade) <<
"JNI was nullptr";
90 ASurfaceTransaction* tx = jni_facade->createTransaction();
98 std::reinterpret_pointer_cast<impeller::Context>(
99 surface_context_vk_->GetParent()),
102 if (surface_context_vk_->SetSwapchain(std::move(
swapchain))) {
103 native_window_ = std::move(
window);
110std::shared_ptr<impeller::Context>
112 return surface_context_vk_;
bool IsValid() const override
std::unique_ptr< Surface > CreateGPUSurface(GrDirectContext *gr_context) override
bool ResourceContextMakeCurrent() override
~AndroidSurfaceVKImpeller() override
bool SetNativeWindow(fml::RefPtr< AndroidNativeWindow > window, const std::shared_ptr< PlatformViewAndroidJNI > &jni_facade) override
bool OnScreenSurfaceResize(const DlISize &size) override
std::shared_ptr< impeller::Context > GetImpellerContext() override
AndroidSurfaceVKImpeller(const std::shared_ptr< AndroidContextVKImpeller > &android_context)
bool ResourceContextClearCurrent() override
void TeardownOnScreenContext() 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)
A wrapper for ASurfaceTransaction. https://developer.android.com/ndk/reference/group/native-activity#...
#define FML_CHECK(condition)
it will be possible to load the file into Perfetto s trace viewer use test Running tests that layout and measure text will not yield consistent results across various platforms Enabling this option will make font resolution default to the Ahem test font on all 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
std::function< android::SurfaceTransaction()> CreateTransactionCB