32 GrDirectContext*
gr_context()
const override {
return nullptr; }
36 const SkISize& size)
override;
40 const SkISize& size)
override;
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::sysmem2::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;