5#ifndef FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_SOFTWARE_SURFACE_H_
6#define FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_SOFTWARE_SURFACE_H_
8#include <fuchsia/sysmem/cpp/fidl.h>
9#include <fuchsia/ui/composition/cpp/fidl.h>
10#include <lib/async/cpp/wait.h>
11#include <lib/zx/event.h>
12#include <lib/zx/vmo.h>
18#include "flutter/fml/macros.h"
29 fuchsia::ui::composition::AllocatorPtr& flatland_allocator,
50 const std::function<
void(
void)>& on_surface_read_finished)
override;
62 fuchsia::ui::composition::BufferCollectionImportToken
76 void OnSurfaceReadFinished(async_dispatcher_t* dispatcher,
77 async::WaitBase* wait,
79 const zx_packet_signal_t* signal);
81 bool SetupSkiaSurface(
82 fuchsia::sysmem::AllocatorSyncPtr& sysmem_allocator,
83 fuchsia::ui::composition::AllocatorPtr& flatland_allocator,
89 uint32_t image_id_ = 0;
96 async::WaitMethod<SoftwareSurface, &SoftwareSurface::OnSurfaceReadFinished>
97 wait_for_surface_read_finished_;
106 fuchsia::ui::composition::BufferCollectionImportToken import_token_;
109 zx::vmo surface_vmo_;
111 uint32_t surface_size_bytes_;
114 bool needs_cache_clean_{
false};
bool FlushSessionAcquireAndReleaseEvents() override
bool IsValid() const override
uint32_t GetImageId() override
fuchsia::ui::composition::BufferCollectionImportToken GetBufferCollectionImportToken() override
void SetReleaseImageCallback(ReleaseImageCallback release_image_callback) override
zx::event GetReleaseFence() override
~SoftwareSurface() override
zx::event GetAcquireFence() override
SoftwareSurface(fuchsia::sysmem::AllocatorSyncPtr &sysmem_allocator, fuchsia::ui::composition::AllocatorPtr &flatland_allocator, const SkISize &size)
size_t AdvanceAndGetAge() override
sk_sp< SkSurface > GetSkiaSurface() const override
void SetImageId(uint32_t image_id) override
SkISize GetSize() const override
void SignalWritesFinished(const std::function< void(void)> &on_surface_read_finished) override
size_t GetAllocationSize() const
Dart_NativeFunction function
std::function< void()> ReleaseImageCallback
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