DisplaySyncGroup represents a group of displays that need to be output in unison as a single post() call.
More...
#include <display.h>
DisplaySyncGroup represents a group of displays that need to be output in unison as a single post() call.
This is only appropriate for platforms whose post() calls are non-blocking and not synchronous with the screen hardware (e.g. virtual machines or Android). Using a DisplaySyncGroup with multiple screens on a platform whose post() blocks for vsync often results in stuttering, and so should be avoided. Although using DisplaySyncGroup with a single DisplayBuffer remains safe for any platform.
- Examples:
- render_surfaces.cpp.
virtual mir::graphics::DisplaySyncGroup::~DisplaySyncGroup |
( |
| ) |
|
|
virtualdefault |
mir::graphics::DisplaySyncGroup::DisplaySyncGroup |
( |
| ) |
|
|
protecteddefault |
virtual void mir::graphics::DisplaySyncGroup::for_each_display_buffer |
( |
std::function< void(DisplayBuffer &)> const & |
f | ) |
|
|
pure virtual |
virtual void mir::graphics::DisplaySyncGroup::post |
( |
| ) |
|
|
pure virtual |
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.
virtual std::chrono::milliseconds mir::graphics::DisplaySyncGroup::recommended_sleep |
( |
| ) |
const |
|
pure virtual |
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.
This is equivalent to: https://www.opengl.org/registry/specs/NV/glx_delay_before_swap.txt
The documentation for this class was generated from the following file:
Copyright © 2012-2016 Canonical Ltd.
Generated on Wed Oct 11 22:26:23 UTC 2017