Mir
|
#include <display_buffer.h>
Public Member Functions | |
DisplayBuffer (BypassOption bypass_options, std::shared_ptr< helpers::DRMHelper > const &drm, std::shared_ptr< helpers::GBMHelper > const &gbm, std::shared_ptr< DisplayReport > const &listener, std::vector< std::shared_ptr< KMSOutput >> const &outputs, GBMSurfaceUPtr surface_gbm, geometry::Rectangle const &area, MirOrientation rot, GLConfig const &gl_config, EGLContext shared_context) | |
~DisplayBuffer () | |
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 | release_current () override |
Releases the current GL render target. More... | |
void | swap_buffers () override |
Swap buffers for OpenGL rendering. More... | |
bool | post_renderables_if_optimizable (RenderableList const &renderlist) 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 | bind () override |
Binds any necessary resources (fbos, textures if any) in preparation for drawing. More... | |
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... | |
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... | |
NativeDisplayBuffer * | native_display_buffer () override |
Returns a pointer to the native display buffer object backing this display buffer. More... | |
void | set_orientation (MirOrientation const rot, geometry::Rectangle const &a) |
void | schedule_set_crtc () |
void | wait_for_page_flip () |
![]() | |
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 |
![]() | |
virtual | ~RenderTarget ()=default |
Additional Inherited Members | |
![]() | |
DisplayBuffer ()=default | |
DisplayBuffer (DisplayBuffer const &c)=delete | |
DisplayBuffer & | operator= (DisplayBuffer const &c)=delete |
![]() | |
DisplaySyncGroup ()=default | |
DisplaySyncGroup (DisplaySyncGroup const &)=delete | |
DisplaySyncGroup & | operator= (DisplaySyncGroup const &)=delete |
![]() | |
NativeDisplayBuffer ()=default | |
virtual | ~NativeDisplayBuffer ()=default |
NativeDisplayBuffer (NativeDisplayBuffer const &)=delete | |
NativeDisplayBuffer | operator= (NativeDisplayBuffer const &)=delete |
![]() | |
RenderTarget ()=default | |
RenderTarget (RenderTarget const &)=delete | |
RenderTarget & | operator= (RenderTarget const &)=delete |
mir::graphics::mesa::DisplayBuffer::DisplayBuffer | ( | BypassOption | bypass_options, |
std::shared_ptr< helpers::DRMHelper > const & | drm, | ||
std::shared_ptr< helpers::GBMHelper > const & | gbm, | ||
std::shared_ptr< DisplayReport > const & | listener, | ||
std::vector< std::shared_ptr< KMSOutput >> const & | outputs, | ||
GBMSurfaceUPtr | surface_gbm, | ||
geometry::Rectangle const & | area, | ||
MirOrientation | rot, | ||
GLConfig const & | gl_config, | ||
EGLContext | shared_context | ||
) |
|
virtual |
Reimplemented from mir::graphics::DisplayBuffer.
|
overridevirtual |
Binds any necessary resources (fbos, textures if any) in preparation for drawing.
Implements mir::renderer::gl::RenderTarget.
|
override |
|
overridevirtual |
Makes GL render target current to calling thread.
Implements mir::renderer::gl::RenderTarget.
|
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.
|
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.
|
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.
|
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.
|
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.
[in] | renderlist | The 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() |
Implements mir::graphics::DisplayBuffer.
|
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.
|
overridevirtual |
Releases the current GL render target.
Implements mir::renderer::gl::RenderTarget.
void mir::graphics::mesa::DisplayBuffer::schedule_set_crtc | ( | ) |
void mir::graphics::mesa::DisplayBuffer::set_orientation | ( | MirOrientation const | rot, |
geometry::Rectangle const & | a | ||
) |
|
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.
|
overridevirtual |
The area the DisplayBuffer occupies in the virtual screen space.
Implements mir::graphics::DisplayBuffer.
void mir::graphics::mesa::DisplayBuffer::wait_for_page_flip | ( | ) |
Copyright © 2012-2015 Canonical Ltd.
Generated on Thu Sep 8 14:50:19 UTC 2016