Mir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
mir::test::doubles::FakeRenderable Class Reference

#include <fake_renderable.h>

Inheritance diagram for mir::test::doubles::FakeRenderable:
Inheritance graph
[legend]

Public Member Functions

 FakeRenderable (int x, int y, int width, int height, float opacity=1.0f, bool rectangular=true, bool visible=true, bool posted=true)
 
 opacity (opacity)
 
 rectangular (rectangular)
 
 visible_ (visible)
 
 posted (posted)
 
float alpha () const override
 
glm::mat4 transformation () const override
 Transformation returns the transformation matrix that should be applied to the surface. More...
 
bool visible () const override
 TODO: Its a bit questionable that we have this member function, why not just trim the renderable from the RenderableList? Its convenient to have this function temporarily while refactoring –kdub. More...
 
bool shaped () const override
 
void set_buffer (std::shared_ptr< graphics::Buffer > b)
 
std::shared_ptr< graphics::Bufferbuffer (void const *) const override
 Return the next buffer that should be composited/rendered. More...
 
bool alpha_enabled () const override
 
geometry::Rectangle screen_position () const override
 
int buffers_ready_for_compositor () const override
 

Public Attributes

 width
 
 height
 

Additional Inherited Members

- Protected Member Functions inherited from mir::graphics::Renderable
 Renderable ()=default
 
virtual ~Renderable ()=default
 
 Renderable (Renderable const &)=delete
 
Renderableoperator= (Renderable const &)=delete
 

Constructor & Destructor Documentation

mir::test::doubles::FakeRenderable::FakeRenderable ( int  x,
int  y,
int  width,
int  height,
float  opacity = 1.0f,
bool  rectangular = true,
bool  visible = true,
bool  posted = true 
)
inline

Member Function Documentation

float mir::test::doubles::FakeRenderable::alpha ( ) const
inlineoverridevirtual
bool mir::test::doubles::FakeRenderable::alpha_enabled ( ) const
inlineoverridevirtual
std::shared_ptr<graphics::Buffer> mir::test::doubles::FakeRenderable::buffer ( void const *  user_id) const
inlineoverridevirtual

Return the next buffer that should be composited/rendered.

Parameters
[in]user_idAn arbitrary unique identifier used to distinguish separate threads/monitors/components which need to concurrently receive the same buffer. Calling with the same user_id will return a new (different) buffer to that user each time. For consistency, all callers need to determine their user_id in the same way (e.g. always use "this" pointer).

Implements mir::graphics::Renderable.

int mir::test::doubles::FakeRenderable::buffers_ready_for_compositor ( ) const
inlineoverridevirtual
mir::test::doubles::FakeRenderable::opacity ( opacity  )
mir::test::doubles::FakeRenderable::posted ( posted  )
inline
mir::test::doubles::FakeRenderable::rectangular ( rectangular  )
geometry::Rectangle mir::test::doubles::FakeRenderable::screen_position ( ) const
inlineoverridevirtual
void mir::test::doubles::FakeRenderable::set_buffer ( std::shared_ptr< graphics::Buffer b)
inline
bool mir::test::doubles::FakeRenderable::shaped ( ) const
inlineoverridevirtual
glm::mat4 mir::test::doubles::FakeRenderable::transformation ( ) const
inlineoverridevirtual

Transformation returns the transformation matrix that should be applied to the surface.

By default when there are no transformations this will be the identity matrix.

Warning
As this functionality is presently only used by mir_demo_standalone_render_surfaces for rotations it may be deprecated in future. It is expected that real transformations may become more transient things (e.g. applied by animation logic externally instead of being a semi-permanent attribute of the surface itself).

Implements mir::graphics::Renderable.

bool mir::test::doubles::FakeRenderable::visible ( ) const
inlineoverridevirtual

TODO: Its a bit questionable that we have this member function, why not just trim the renderable from the RenderableList? Its convenient to have this function temporarily while refactoring –kdub.

Implements mir::graphics::Renderable.

mir::test::doubles::FakeRenderable::visible_ ( visible  )

Member Data Documentation

mir::test::doubles::FakeRenderable::height
mir::test::doubles::FakeRenderable::width

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