5#ifndef FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_SOFTWARE_SURFACE_PRODUCER_H_
6#define FLUTTER_SHELL_PLATFORM_FUCHSIA_FLUTTER_SOFTWARE_SURFACE_PRODUCER_H_
8#include <fuchsia/sysmem/cpp/fidl.h>
9#include <fuchsia/ui/composition/cpp/fidl.h>
11#include <unordered_map>
13#include "flutter/fml/macros.h"
44 std::vector<std::unique_ptr<SurfaceProducerSurface>> surfaces)
override;
47 void SubmitSurface(std::unique_ptr<SurfaceProducerSurface>
surface);
48 std::unique_ptr<SoftwareSurface> CreateSurface(
const SkISize&
size);
49 void RecycleSurface(std::unique_ptr<SoftwareSurface>
surface);
51 void RecyclePendingSurface(uintptr_t surface_key);
53 void AgeAndCollectOldBuffers();
57 fuchsia::sysmem::AllocatorSyncPtr sysmem_allocator_;
58 fuchsia::ui::composition::AllocatorPtr flatland_allocator_;
61 std::vector<std::unique_ptr<SoftwareSurface>> available_surfaces_;
64 std::unordered_map<uintptr_t, std::unique_ptr<SoftwareSurface>>
67 size_t trace_surfaces_created_ = 0;
68 size_t trace_surfaces_reused_ = 0;
GrDirectContext * gr_context() const override
void SubmitSurfaces(std::vector< std::unique_ptr< SurfaceProducerSurface > > surfaces) override
SoftwareSurfaceProducer()
~SoftwareSurfaceProducer() override
static constexpr int kMaxSurfaces
std::unique_ptr< SurfaceProducerSurface > ProduceOffscreenSurface(const SkISize &size) override
std::unique_ptr< SurfaceProducerSurface > ProduceSurface(const SkISize &size) override
static constexpr int kMaxSurfaceAge
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