Mir
Public Member Functions | List of all members
mir::graphics::offscreen::detail::DisplaySyncGroup Class Reference

#include <display.h>

Inheritance diagram for mir::graphics::offscreen::detail::DisplaySyncGroup:
[legend]

Public Member Functions

 DisplaySyncGroup (std::unique_ptr< DisplayBuffer > output)
 
void for_each_display_buffer (std::function< void(DisplayBuffer &)> const &) 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...
 
- 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
 

Constructor & Destructor Documentation

mir::graphics::offscreen::detail::DisplaySyncGroup::DisplaySyncGroup ( std::unique_ptr< DisplayBuffer output)

Member Function Documentation

void mir::graphics::offscreen::detail::DisplaySyncGroup::for_each_display_buffer ( std::function< void(DisplayBuffer &)> const &  )
override
void mir::graphics::offscreen::detail::DisplaySyncGroup::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::offscreen::detail::DisplaySyncGroup::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.


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

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