Mir
|
DisplaySyncGroup represents a group of displays that need to be output in unison as a single post() call. More...
#include <display.h>
Public Member Functions | |
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 void | post ()=0 |
Post the content of the DisplayBuffers associated with this DisplaySyncGroup. More... | |
virtual std::chrono::milliseconds | recommended_sleep () const =0 |
Returns a recommendation to the compositor as to how long it should wait before sampling the scene for the next frame. More... | |
virtual | ~DisplaySyncGroup ()=default |
Protected Member Functions | |
DisplaySyncGroup ()=default | |
DisplaySyncGroup (DisplaySyncGroup const &)=delete | |
DisplaySyncGroup & | operator= (DisplaySyncGroup const &)=delete |
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.
|
virtualdefault |
|
protecteddefault |
|
protecteddelete |
|
pure virtual |
Executes a functor that allows the DisplayBuffer contents to be updated.
|
protecteddelete |
|
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.
Implemented in mir::graphics::nested::detail::DisplaySyncGroup, mir::graphics::mesa::DisplayBuffer, mir::graphics::offscreen::detail::DisplaySyncGroup, mir::graphics::android::DisplayGroup, and mir::graphics::X::DisplayGroup.
|
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.
Implemented in mir::graphics::nested::detail::DisplaySyncGroup, mir::graphics::mesa::DisplayBuffer, mir::graphics::offscreen::detail::DisplaySyncGroup, mir::graphics::android::DisplayGroup, and mir::graphics::X::DisplayGroup.
Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Oct 8 16:20:16 UTC 2015