14 std::shared_ptr<AndroidContextDynamicImpeller>& android_context)
15 : android_context_(android_context) {}
24 if (vulkan_surface_) {
25 vulkan_surface_->TeardownOnScreenContext();
26 }
else if (gl_surface_) {
27 gl_surface_->TeardownOnScreenContext();
32 GrDirectContext* gr_context) {
33 if (vulkan_surface_) {
35 vulkan_surface_->SetNativeWindow(window_, jni_facade_);
37 return vulkan_surface_->CreateGPUSurface(gr_context);
41 gl_surface_->SetNativeWindow(window_, jni_facade_);
43 return gl_surface_->CreateGPUSurface(gr_context);
51 vulkan_surface_ = std::make_unique<AndroidSurfaceVKImpeller>(
52 android_context_->GetVKContext());
54 gl_surface_ = std::make_unique<AndroidSurfaceGLImpeller>(
55 android_context_->GetGLContext());
62 if (vulkan_surface_) {
63 return vulkan_surface_->OnScreenSurfaceResize(
size);
66 return gl_surface_->OnScreenSurfaceResize(
size);
72 if (vulkan_surface_) {
73 return vulkan_surface_->ResourceContextMakeCurrent();
76 return gl_surface_->ResourceContextMakeCurrent();
82 if (vulkan_surface_) {
83 return vulkan_surface_->ResourceContextClearCurrent();
86 return gl_surface_->ResourceContextClearCurrent();
93 const std::shared_ptr<PlatformViewAndroidJNI>& jni_facade) {
94 if (vulkan_surface_) {
95 return vulkan_surface_->SetNativeWindow(
window, jni_facade);
98 return gl_surface_->SetNativeWindow(
window, jni_facade);
101 jni_facade_ = jni_facade;
105std::unique_ptr<Surface>
107 if (vulkan_surface_) {
108 return vulkan_surface_->CreateSnapshotSurface();
111 return gl_surface_->CreateSnapshotSurface();
116std::shared_ptr<impeller::Context>
118 return android_context_->GetImpellerContext();
bool OnScreenSurfaceResize(const DlISize &size) override
std::unique_ptr< Surface > CreateGPUSurface(GrDirectContext *gr_context) override
bool ResourceContextClearCurrent() override
void TeardownOnScreenContext() override
bool IsValid() const override
bool ResourceContextMakeCurrent() override
~AndroidSurfaceDynamicImpeller() override
bool SetNativeWindow(fml::RefPtr< AndroidNativeWindow > window, const std::shared_ptr< PlatformViewAndroidJNI > &jni_facade) override
AndroidSurfaceDynamicImpeller(std::shared_ptr< AndroidContextDynamicImpeller > &android_context)
std::shared_ptr< impeller::Context > GetImpellerContext() override
std::unique_ptr< Surface > CreateSnapshotSurface() override
void SetupImpellerSurface() override
#define FML_UNREACHABLE()
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