19 #ifndef MIR_GRAPHICS_ANDROID_DISPLAY_RESOURCE_FACTORY_H_
20 #define MIR_GRAPHICS_ANDROID_DISPLAY_RESOURCE_FACTORY_H_
22 #include <system/window.h>
23 #include <hardware/hwcomposer.h>
36 class FramebufferBundle;
38 class DisplayResourceFactory
41 virtual ~DisplayResourceFactory() =
default;
43 virtual std::shared_ptr<hwc_composer_device_1> create_hwc_native_device()
const = 0;
44 virtual std::shared_ptr<framebuffer_device_t> create_fb_native_device()
const = 0;
46 virtual std::shared_ptr<ANativeWindow> create_native_window(
47 std::shared_ptr<FramebufferBundle>
const& device)
const = 0;
49 virtual std::shared_ptr<DisplayDevice> create_fb_device(
50 std::shared_ptr<framebuffer_device_t>
const& fb_native_device)
const = 0;
51 virtual std::shared_ptr<DisplayDevice> create_hwc_device(
52 std::shared_ptr<hwc_composer_device_1>
const& hwc_native_device)
const = 0;
53 virtual std::shared_ptr<DisplayDevice> create_hwc_fb_device(
54 std::shared_ptr<hwc_composer_device_1>
const& hwc_native_device,
55 std::shared_ptr<framebuffer_device_t>
const& fb_native_device)
const = 0;
58 DisplayResourceFactory() =
default;
59 DisplayResourceFactory& operator=(DisplayResourceFactory
const&) =
delete;
60 DisplayResourceFactory(DisplayResourceFactory
const&) =
delete;