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

Interface to an output framebuffer. More...

#include <display_buffer.h>

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

Public Member Functions

virtual ~DisplayBuffer ()
 
virtual geometry::Rectangle view_area () const =0
 The area the DisplayBuffer occupies in the virtual screen space. More...
 
virtual void make_current ()=0
 Makes the DisplayBuffer the current GL rendering target. More...
 
virtual void release_current ()=0
 Releases the current GL rendering target. More...
 
virtual void post_update ()=0
 This will trigger OpenGL rendering and post the result to the screen. More...
 
virtual void render_and_post_update (RenderableList const &renderlist, std::function< void(Renderable const &)> const &render_fn)=0
 This will render renderlist to the screen and post the result to the screen. More...
 
virtual bool can_bypass () const =0
 to be deprecated More...
 
virtual void post_update (std::shared_ptr< Buffer >)
 
virtual MirOrientation orientation () const =0
 Returns the orientation of the display buffer relative to how the user should see it (the orientation of the output). More...
 

Protected Member Functions

 DisplayBuffer ()=default
 
 DisplayBuffer (DisplayBuffer const &c)=delete
 
DisplayBufferoperator= (DisplayBuffer const &c)=delete
 

Detailed Description

Interface to an output framebuffer.

Examples:
render_surfaces.cpp.

Constructor & Destructor Documentation

virtual mir::graphics::DisplayBuffer::~DisplayBuffer ( )
inlinevirtual
mir::graphics::DisplayBuffer::DisplayBuffer ( )
protecteddefault
mir::graphics::DisplayBuffer::DisplayBuffer ( DisplayBuffer const &  c)
protecteddelete

Member Function Documentation

virtual bool mir::graphics::DisplayBuffer::can_bypass ( ) const
pure virtual
virtual void mir::graphics::DisplayBuffer::make_current ( )
pure virtual
DisplayBuffer& mir::graphics::DisplayBuffer::operator= ( DisplayBuffer const &  c)
protecteddelete
virtual MirOrientation mir::graphics::DisplayBuffer::orientation ( ) const
pure virtual

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".

Implemented in mir::graphics::offscreen::DisplayBuffer, mir::compositor::ScreencastDisplayBuffer, mir::graphics::nested::detail::NestedOutput, mir::graphics::mesa::DisplayBuffer, mir::test::doubles::StubConfigurableDisplayBuffer, and mir::test::doubles::NullDisplayBuffer.

virtual void mir::graphics::DisplayBuffer::post_update ( )
pure virtual
virtual void mir::graphics::DisplayBuffer::post_update ( std::shared_ptr< Buffer )
inlinevirtual
virtual void mir::graphics::DisplayBuffer::release_current ( )
pure virtual
virtual void mir::graphics::DisplayBuffer::render_and_post_update ( RenderableList const &  renderlist,
std::function< void(Renderable const &)> const &  render_fn 
)
pure virtual

This will render renderlist to the screen and post the result to the screen.

For each renderable, the DisplayBuffer will decide if its more efficient to render that Renderable via OpenGL, or via another method. If the Renderable is to be rendered via OpenGL, render_fn will be invoked on that Renderable.

Implemented in mir::graphics::offscreen::DisplayBuffer, mir::graphics::nested::detail::NestedOutput, and mir::graphics::mesa::DisplayBuffer.

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

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

Copyright © 2012,2013 Canonical Ltd.
Generated on Fri Apr 11 21:14:53 UTC 2014