5#ifndef FLUTTER_LIB_GPU_SURFACE_H_
6#define FLUTTER_LIB_GPU_SURFACE_H_
30 DEFINE_WRAPPERTYPEINFO();
53 struct TextureRecord {
54 TextureRecord(std::shared_ptr<impeller::Texture> texture,
59 std::shared_ptr<impeller::Texture>
texture;
63 bool acquired =
false;
64 std::atomic_bool producer_pending =
false;
67 std::shared_ptr<TextureRecord> CreateTextureRecord()
const;
69 bool IsReusable(
const std::shared_ptr<TextureRecord>& record,
72 void PruneTextureRecords();
74 Dart_Handle CreateImage(
const sk_sp<DlImage>&
image)
const;
76 std::shared_ptr<impeller::Context> context_;
79 std::vector<std::shared_ptr<TextureRecord>> records_;
80 std::optional<size_t> current_index_;
105 Dart_Handle texture_wrapper);
int AcquireNextFrame(Dart_Handle texture_wrapper)
Dart_Handle GetCurrentImage() const
size_t GetBackingTextureCount() const
Dart_Handle PresentFrame(size_t texture_index, CommandBuffer &command_buffer)
std::optional< std::string > Resize(impeller::ISize size)
void DiscardFrame(size_t texture_index)
FlutterVulkanImage * image
uint32_t uint32_t * format
#define FML_DISALLOW_COPY_AND_ASSIGN(TypeName)
#define FLUTTER_GPU_EXPORT
FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_Surface_PresentFrame(flutter::gpu::Surface *wrapper, int texture_index, flutter::gpu::CommandBuffer *command_buffer)
FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_Surface_Resize(flutter::gpu::Surface *wrapper, int width, int height)
FLUTTER_GPU_EXPORT void InternalFlutterGpu_Surface_DiscardFrame(flutter::gpu::Surface *wrapper, int texture_index)
FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_Surface_GetCurrentImage(flutter::gpu::Surface *wrapper)
FLUTTER_GPU_EXPORT int InternalFlutterGpu_Surface_AcquireNextFrame(flutter::gpu::Surface *wrapper, Dart_Handle texture_wrapper)
FLUTTER_GPU_EXPORT int InternalFlutterGpu_Surface_GetBackingTextureCount(flutter::gpu::Surface *wrapper)
FLUTTER_GPU_EXPORT Dart_Handle InternalFlutterGpu_Surface_Initialize(Dart_Handle wrapper, flutter::gpu::Context *gpu_context, int width, int height, int format)
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
PixelFormat
The Pixel formats supported by Impeller. The naming convention denotes the usage of the component,...
#define FML_FRIEND_MAKE_REF_COUNTED(T)
std::shared_ptr< ContextGLES > context
std::shared_ptr< CommandBuffer > command_buffer