20 #ifndef MIR_PLATFORM_ANDROID_ANDROID_BUFFER_ALLOCATOR_H_
21 #define MIR_PLATFORM_ANDROID_ANDROID_BUFFER_ALLOCATOR_H_
23 #include <hardware/hardware.h>
34 class BufferInitializer;
40 class GraphicAllocAdaptor;
42 class AndroidGraphicBufferAllocator:
public GraphicBufferAllocator,
public graphics::GraphicBufferAllocator
45 AndroidGraphicBufferAllocator(
46 std::shared_ptr<BufferInitializer>
const& buffer_initializer);
49 graphics::BufferProperties
const& buffer_properties);
51 std::shared_ptr<graphics::Buffer> alloc_buffer_platform(
60 std::shared_ptr<GraphicAllocAdaptor> alloc_device;
61 std::shared_ptr<BufferInitializer>
const buffer_initializer;
62 std::shared_ptr<EGLExtensions>
const egl_extensions;
BufferUsage
How a buffer is going to be used.
Definition: buffer_properties.h:36
virtual std::vector< MirPixelFormat > supported_pixel_formats()=0
The supported buffer pixel formats.
virtual std::shared_ptr< Buffer > alloc_buffer(BufferProperties const &buffer_properties)=0
Allocates a buffer.
struct hw_module_t hw_module
Definition: mock_android_hw.h:35