31 GrDirectContext*
gr_context()
const override {
return nullptr; }
35 const SkISize& size)
override;
39 const SkISize& size)
override;
43 std::vector<std::unique_ptr<SurfaceProducerSurface>> surfaces)
override;
46 void SubmitSurface(std::unique_ptr<SurfaceProducerSurface> surface);
47 std::unique_ptr<SoftwareSurface> CreateSurface(
const SkISize& size);
48 void RecycleSurface(std::unique_ptr<SoftwareSurface> surface);
50 void RecyclePendingSurface(uintptr_t surface_key);
52 void AgeAndCollectOldBuffers();
56 fuchsia::sysmem2::AllocatorSyncPtr sysmem_allocator_;
57 fuchsia::ui::composition::AllocatorPtr flatland_allocator_;
60 std::vector<std::unique_ptr<SoftwareSurface>> available_surfaces_;
63 std::unordered_map<uintptr_t, std::unique_ptr<SoftwareSurface>>
66 size_t trace_surfaces_created_ = 0;
67 size_t trace_surfaces_reused_ = 0;