Mir
Public Member Functions | List of all members
mir::compositor::ScreencastDisplayBuffer Class Reference

#include <screencast_display_buffer.h>

Inheritance diagram for mir::compositor::ScreencastDisplayBuffer:
[legend]

Public Member Functions

 ScreencastDisplayBuffer (geometry::Rectangle const &rect, geometry::Size const &size, MirMirrorMode mirror_mode, Schedule &free_queue, Schedule &ready_queue, graphics::Display &display)
 
 ~ScreencastDisplayBuffer ()
 
geometry::Rectangle view_area () const override
 The area the DisplayBuffer occupies in the virtual screen space. More...
 
void make_current () override
 Makes GL render target current to calling thread. More...
 
void bind () override
 Binds any necessary resources (fbos, textures if any) in preparation for drawing. More...
 
void release_current () override
 Releases the current GL render target. More...
 
bool post_renderables_if_optimizable (graphics::RenderableList const &) 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...
 
void swap_buffers () override
 Swap buffers for OpenGL rendering. 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...
 
MirMirrorMode mirror_mode () const override
 Returns the mirror mode of the display buffer relative to orientation. More...
 
NativeDisplayBuffernative_display_buffer () override
 Returns a pointer to the native display buffer object backing this display buffer. More...
 
- Public Member Functions inherited from mir::graphics::DisplayBuffer
virtual ~DisplayBuffer ()=default
 
- Public Member Functions inherited from mir::renderer::gl::RenderTarget
virtual ~RenderTarget ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from mir::graphics::DisplayBuffer
 DisplayBuffer ()=default
 
 DisplayBuffer (DisplayBuffer const &c)=delete
 
DisplayBufferoperator= (DisplayBuffer const &c)=delete
 
- Protected Member Functions inherited from mir::graphics::NativeDisplayBuffer
 NativeDisplayBuffer ()=default
 
virtual ~NativeDisplayBuffer ()=default
 
 NativeDisplayBuffer (NativeDisplayBuffer const &)=delete
 
NativeDisplayBuffer operator= (NativeDisplayBuffer const &)=delete
 
- Protected Member Functions inherited from mir::renderer::gl::RenderTarget
 RenderTarget ()=default
 
 RenderTarget (RenderTarget const &)=delete
 
RenderTargetoperator= (RenderTarget const &)=delete
 

Constructor & Destructor Documentation

mir::compositor::ScreencastDisplayBuffer::ScreencastDisplayBuffer ( geometry::Rectangle const &  rect,
geometry::Size const &  size,
MirMirrorMode  mirror_mode,
Schedule free_queue,
Schedule ready_queue,
graphics::Display display 
)
mir::compositor::ScreencastDisplayBuffer::~ScreencastDisplayBuffer ( )

Member Function Documentation

void mir::compositor::ScreencastDisplayBuffer::bind ( )
overridevirtual

Binds any necessary resources (fbos, textures if any) in preparation for drawing.

Implements mir::renderer::gl::RenderTarget.

void mir::compositor::ScreencastDisplayBuffer::make_current ( )
overridevirtual

Makes GL render target current to calling thread.

Implements mir::renderer::gl::RenderTarget.

MirMirrorMode mir::compositor::ScreencastDisplayBuffer::mirror_mode ( ) const
overridevirtual

Returns the mirror mode of the display buffer relative to orientation.

If your DisplayBuffer can do the mirroring itself then this will always return mir_mirror_mode_none. If the DisplayBuffer does not implement the mirroring itself then this function will return the mirror mode the renderer must do after rotation to make things "look right".

Implements mir::graphics::DisplayBuffer.

mg::NativeDisplayBuffer * mir::compositor::ScreencastDisplayBuffer::native_display_buffer ( )
overridevirtual

Returns a pointer to the native display buffer object backing this display buffer.

The pointer to the native display buffer remains valid as long as the display buffer object is valid.

Implements mir::graphics::DisplayBuffer.

MirOrientation mir::compositor::ScreencastDisplayBuffer::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::compositor::ScreencastDisplayBuffer::post_renderables_if_optimizable ( graphics::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::compositor::ScreencastDisplayBuffer::release_current ( )
overridevirtual

Releases the current GL render target.

Implements mir::renderer::gl::RenderTarget.

void mir::compositor::ScreencastDisplayBuffer::swap_buffers ( )
overridevirtual

Swap buffers for OpenGL rendering.

After this method returns is the earliest time that it is safe to free GL-related resources such as textures and buffers.

Implements mir::renderer::gl::RenderTarget.

geom::Rectangle mir::compositor::ScreencastDisplayBuffer::view_area ( ) const
overridevirtual

The area the DisplayBuffer occupies in the virtual screen space.

Implements mir::graphics::DisplayBuffer.


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

Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016