19 #ifndef MIR_GRAPHICS_ANDROID_RESOURCE_FACTORY_H_
20 #define MIR_GRAPHICS_ANDROID_RESOURCE_FACTORY_H_
35 class GraphicBufferAllocator;
38 class ResourceFactory :
public DisplayResourceFactory
41 explicit ResourceFactory(std::shared_ptr<GraphicBufferAllocator>
const& buffer_allocator);
43 std::shared_ptr<DisplaySupportProvider> create_fb_device()
const;
45 std::shared_ptr<DisplaySupportProvider> create_hwc_1_1(
46 std::shared_ptr<hwc_composer_device_1>
const& hwc_device,
47 std::shared_ptr<DisplaySupportProvider>
const& fb_device)
const;
49 std::shared_ptr<DisplaySupportProvider> create_hwc_1_0(
50 std::shared_ptr<hwc_composer_device_1>
const& hwc_device,
51 std::shared_ptr<DisplaySupportProvider>
const& fb_device)
const;
53 std::shared_ptr<graphics::Display> create_display(
54 std::shared_ptr<DisplaySupportProvider>
const& support_provider,
55 std::shared_ptr<graphics::DisplayReport>
const& report)
const;
58 std::shared_ptr<GraphicBufferAllocator>
const buffer_allocator;
60 virtual std::vector<std::shared_ptr<graphics::Buffer>> create_buffers(
61 std::shared_ptr<DisplaySupportProvider>
const& info_provider)
const;
63 virtual std::shared_ptr<FBSwapper> create_swapper(
64 std::vector<std::shared_ptr<graphics::Buffer>>
const& buffers)
const;