32#ifndef CAIRO_COMPOSITOR_H_
33#define CAIRO_COMPOSITOR_H_
54 virtual void Resize(
unsigned int aWidth,
unsigned int aHeight )
override;
60 inline virtual unsigned int GetBuffer()
const override
66 virtual void SetBuffer(
unsigned int aBufferHandle )
override;
69 virtual void Begin()
override;
81 void DrawBuffer(
unsigned int aSourceHandle,
unsigned int aDestHandle, cairo_operator_t op );
84 virtual void DrawBuffer(
unsigned int aBufferHandle )
override;
87 virtual void Present()
override;
94 case CAIRO_ANTIALIAS_FAST:
96 case CAIRO_ANTIALIAS_GOOD:
unsigned int m_bufferSize
Amount of memory needed to store a buffer.
virtual ~CAIRO_COMPOSITOR()
virtual void Present() override
Call this to present the output buffer to the screen.
unsigned int m_stride
Stride to use given the desired format and width.
cairo_antialias_t m_currentAntialiasingMode
virtual unsigned int CreateBuffer() override
Prepare a new buffer that may be used as a rendering target.
cairo_t * m_mainContext
Rendering target used for compositing (the main display)
virtual void ClearBuffer(const COLOR4D &aColor) override
Clear the selected buffer (set by the SetBuffer() function).
virtual void Begin() override
Call this at the beginning of each frame.
void clean()
Perform freeing of resources.
void DrawBuffer(unsigned int aSourceHandle, unsigned int aDestHandle, cairo_operator_t op)
Paints source to destination using the cairo operator.
unsigned int usedBuffers()
Return number of currently used buffers.
cairo_matrix_t m_matrix
Transformation matrix.
cairo_t ** m_currentContext
Pointer to the current context, so it can be changed.
void SetAntialiasingMode(CAIRO_ANTIALIASING_MODE aMode)
std::deque< CAIRO_BUFFER > CAIRO_BUFFERS
unsigned int m_current
Currently used buffer handle.
virtual unsigned int GetBuffer() const override
Return currently used buffer handle.
CAIRO_BUFFERS m_buffers
Stores information about initialized buffers.
CAIRO_ANTIALIASING_MODE GetAntialiasingMode() const
virtual void Resize(unsigned int aWidth, unsigned int aHeight) override
Clear the state of COMPOSITOR, so it has to be reinitialized again with the new dimensions.
virtual void SetMainContext(cairo_t *aMainContext)
Set a context to be treated as the main context (ie.
virtual void SetBuffer(unsigned int aBufferHandle) override
Set the selected buffer as the rendering target.
virtual void Initialize() override
Perform primary initialization, necessary to use the object.
A color representation with 4 components: red, green, blue, alpha.
Class that handles multitarget rendering (ie.
The Cairo implementation of the graphics abstraction layer.
cairo_surface_t * surface
Point to which an image from texture is attached.
cairo_t * context
Main texture handle.
BitmapPtr bitmap
Pixel storage.