Mir
Public Types | Public Member Functions | List of all members
mir::graphics::android::DisplayGroup Class Reference

#include <display_group.h>

Inheritance diagram for mir::graphics::android::DisplayGroup:
[legend]

Public Types

using ExceptionHandler = std::function< void()>
 

Public Member Functions

 DisplayGroup (std::shared_ptr< DisplayDevice > const &device, std::unique_ptr< ConfigurableDisplayBuffer > primary_buffer, ExceptionHandler const &handler)
 
 DisplayGroup (std::shared_ptr< DisplayDevice > const &device, std::unique_ptr< ConfigurableDisplayBuffer > primary_buffer)
 
void for_each_display_buffer (std::function< void(graphics::DisplayBuffer &)> const &f) override
 
void post () override
 Post the content of the DisplayBuffers associated with this DisplaySyncGroup. More...
 
std::chrono::milliseconds recommended_sleep () const override
 Returns a recommendation to the compositor as to how long it should wait before sampling the scene for the next frame. More...
 
void add (DisplayName name, std::unique_ptr< ConfigurableDisplayBuffer > buffer)
 
void remove (DisplayName name)
 
void configure (DisplayName name, MirPowerMode, MirOrientation, geometry::Displacement)
 
bool display_present (DisplayName name) const
 
- Public Member Functions inherited from mir::graphics::DisplaySyncGroup
virtual void for_each_display_buffer (std::function< void(DisplayBuffer &)> const &f)=0
 Executes a functor that allows the DisplayBuffer contents to be updated. More...
 
virtual ~DisplaySyncGroup ()=default
 

Additional Inherited Members

- Protected Member Functions inherited from mir::graphics::DisplaySyncGroup
 DisplaySyncGroup ()=default
 
 DisplaySyncGroup (DisplaySyncGroup const &)=delete
 
DisplaySyncGroupoperator= (DisplaySyncGroup const &)=delete
 

Member Typedef Documentation

Constructor & Destructor Documentation

mir::graphics::android::DisplayGroup::DisplayGroup ( std::shared_ptr< DisplayDevice > const &  device,
std::unique_ptr< ConfigurableDisplayBuffer primary_buffer,
ExceptionHandler const &  handler 
)
mir::graphics::android::DisplayGroup::DisplayGroup ( std::shared_ptr< DisplayDevice > const &  device,
std::unique_ptr< ConfigurableDisplayBuffer primary_buffer 
)

Member Function Documentation

void mir::graphics::android::DisplayGroup::add ( DisplayName  name,
std::unique_ptr< ConfigurableDisplayBuffer buffer 
)
void mir::graphics::android::DisplayGroup::configure ( DisplayName  name,
MirPowerMode  mode,
MirOrientation  orientation,
geometry::Displacement  offset 
)
bool mir::graphics::android::DisplayGroup::display_present ( DisplayName  name) const
void mir::graphics::android::DisplayGroup::for_each_display_buffer ( std::function< void(graphics::DisplayBuffer &)> const &  f)
override
void mir::graphics::android::DisplayGroup::post ( )
overridevirtual

Post the content of the DisplayBuffers associated with this DisplaySyncGroup.

The content of all the DisplayBuffers in this DisplaySyncGroup are guaranteed to be onscreen in the near future. On some platforms, this may wait a potentially long time for vsync.

Implements mir::graphics::DisplaySyncGroup.

std::chrono::milliseconds mir::graphics::android::DisplayGroup::recommended_sleep ( ) const
overridevirtual

Returns a recommendation to the compositor as to how long it should wait before sampling the scene for the next frame.

Sampling the scene too early results in up to one whole frame of extra lag if rendering is fast or skipped altogether (bypass/overlays). But sampling too late and we might miss the deadline. If unsure just return zero.

Implements mir::graphics::DisplaySyncGroup.

void mir::graphics::android::DisplayGroup::remove ( DisplayName  name)

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

Copyright © 2012-2015 Canonical Ltd.
Generated on Wed Mar 30 00:29:56 UTC 2016