Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
mir::graphics::offscreen::DisplayBuffer Class Reference

#include <display_buffer.h>

Inheritance diagram for mir::graphics::offscreen::DisplayBuffer:
[legend]

Public Member Functions

 DisplayBuffer (SurfacelessEGLContext egl_context, geometry::Rectangle const &area)
 
geometry::Rectangle view_area () const
 The area the DisplayBuffer occupies in the virtual screen space. More...
 
void make_current ()
 Makes the DisplayBuffer the current GL rendering target. More...
 
void release_current ()
 Releases the current GL rendering target. More...
 
void post_update ()
 This will trigger OpenGL rendering and post the result to the screen. More...
 
MirOrientation orientation () const override
 Returns the orientation of the display buffer relative to how the user should see it (the orientation of the output). More...
 
bool uses_alpha () const override
 Returns true if the display buffer has an alpha channel and the alpha channel will be read from at some point - in which case the renderer must produce valid alpha channel content. More...
 
bool post_renderables_if_optimizable (RenderableList const &renderlist) override
 This will render renderlist to the screen and post the result to the screen if there is a hardware optimization that can be done. More...
 
- Public Member Functions inherited from mir::graphics::DisplayBuffer
virtual ~DisplayBuffer ()
 

Additional Inherited Members

- Protected Member Functions inherited from mir::graphics::DisplayBuffer
 DisplayBuffer ()=default
 
 DisplayBuffer (DisplayBuffer const &c)=delete
 
DisplayBufferoperator= (DisplayBuffer const &c)=delete
 

Constructor & Destructor Documentation

mir::graphics::offscreen::DisplayBuffer::DisplayBuffer ( SurfacelessEGLContext  egl_context,
geometry::Rectangle const &  area 
)

Member Function Documentation

void mir::graphics::offscreen::DisplayBuffer::make_current ( )
virtual

Makes the DisplayBuffer the current GL rendering target.

Implements mir::graphics::DisplayBuffer.

MirOrientation mir::graphics::offscreen::DisplayBuffer::orientation ( ) const
overridevirtual

Returns the orientation of the display buffer relative to how the user should see it (the orientation of the output).

This tells us how much (if any) rotation the renderer needs to do. If your DisplayBuffer can do the rotation itself then this will always return mir_orientation_normal. If the DisplayBuffer does not implement the rotation itself then this function will return the amount of rotation the renderer must do to make things "look right".

Implements mir::graphics::DisplayBuffer.

bool mir::graphics::offscreen::DisplayBuffer::post_renderables_if_optimizable ( RenderableList const &  renderlist)
overridevirtual

This will render renderlist to the screen and post the result to the screen if there is a hardware optimization that can be done.

Parameters
[in]renderlistThe renderables that should appear on the screen if the hardware is capable of optmizing that list somehow. If what you want displayed on the screen cannot be represented by a RenderableList, then you should draw using OpenGL and use post_update()
Returns
true if the hardware can optimize the rendering of the list. When this call completes, the renderlist will have been posted to the screen. false if the hardware platform cannot optimize the list. The screen will not be updated. The caller should render the list another way, and post using post_update()

Implements mir::graphics::DisplayBuffer.

void mir::graphics::offscreen::DisplayBuffer::post_update ( )
virtual

This will trigger OpenGL rendering and post the result to the screen.

Implements mir::graphics::DisplayBuffer.

void mir::graphics::offscreen::DisplayBuffer::release_current ( )
virtual

Releases the current GL rendering target.

Implements mir::graphics::DisplayBuffer.

bool mir::graphics::offscreen::DisplayBuffer::uses_alpha ( ) const
overridevirtual

Returns true if the display buffer has an alpha channel and the alpha channel will be read from at some point - in which case the renderer must produce valid alpha channel content.

Implements mir::graphics::DisplayBuffer.

geometry::Rectangle mir::graphics::offscreen::DisplayBuffer::view_area ( ) const
virtual

The area the DisplayBuffer occupies in the virtual screen space.

Implements mir::graphics::DisplayBuffer.


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

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Oct 10 14:07:14 UTC 2014