Mir
Public Member Functions | Protected Member Functions | List of all members
mir::graphics::GraphicBufferAllocator Class Referenceabstract

Interface to graphic buffer allocation. More...

#include <graphic_buffer_allocator.h>

Public Member Functions

virtual ~GraphicBufferAllocator ()=default
 
virtual std::shared_ptr< Bufferalloc_buffer (BufferProperties const &buffer_properties)=0
 Allocates a buffer. More...
 
virtual std::vector< MirPixelFormatsupported_pixel_formats ()=0
 The supported buffer pixel formats. More...
 
virtual std::shared_ptr< Bufferalloc_buffer (geometry::Size size, uint32_t native_format, uint32_t native_flags)=0
 allocates a buffer with the native flags and format specified More...
 
virtual std::shared_ptr< Bufferalloc_software_buffer (geometry::Size size, MirPixelFormat)=0
 allocates a 'software' (cpu-accessible) buffer note: mesa and eglstreams use ShmBuffer, android uses ANW with software usage bits. More...
 

Protected Member Functions

 GraphicBufferAllocator ()=default
 
 GraphicBufferAllocator (const GraphicBufferAllocator &)=delete
 
GraphicBufferAllocatoroperator= (const GraphicBufferAllocator &)=delete
 

Detailed Description

Interface to graphic buffer allocation.

Constructor & Destructor Documentation

virtual mir::graphics::GraphicBufferAllocator::~GraphicBufferAllocator ( )
virtualdefault
mir::graphics::GraphicBufferAllocator::GraphicBufferAllocator ( )
protecteddefault
mir::graphics::GraphicBufferAllocator::GraphicBufferAllocator ( const GraphicBufferAllocator )
protecteddelete

Member Function Documentation

virtual std::shared_ptr<Buffer> mir::graphics::GraphicBufferAllocator::alloc_buffer ( BufferProperties const &  buffer_properties)
pure virtual

Allocates a buffer.

Deprecated:
. use the other alloc_buffer functions
Parameters
[in]buffer_propertiesthe properties the allocated buffer should have
virtual std::shared_ptr<Buffer> mir::graphics::GraphicBufferAllocator::alloc_buffer ( geometry::Size  size,
uint32_t  native_format,
uint32_t  native_flags 
)
pure virtual

allocates a buffer with the native flags and format specified

virtual std::shared_ptr<Buffer> mir::graphics::GraphicBufferAllocator::alloc_software_buffer ( geometry::Size  size,
MirPixelFormat   
)
pure virtual

allocates a 'software' (cpu-accessible) buffer note: mesa and eglstreams use ShmBuffer, android uses ANW with software usage bits.

GraphicBufferAllocator& mir::graphics::GraphicBufferAllocator::operator= ( const GraphicBufferAllocator )
protecteddelete
virtual std::vector<MirPixelFormat> mir::graphics::GraphicBufferAllocator::supported_pixel_formats ( )
pure virtual

The supported buffer pixel formats.

Note
: once the above is deprecated, this is really only (marginally) useful for the software allocation path. (and we could probably move software/cpu buffers up to libmirserver)

The documentation for this class was generated from the following file:

Copyright © 2012-2016 Canonical Ltd.
Generated on Mon Jun 5 13:49:26 UTC 2017