Mir
|
#include <display_buffer.h>
Public Member Functions | |
DisplayBuffer (SurfacelessEGLContext egl_context, geometry::Rectangle const &area) | |
geometry::Rectangle | view_area () const override |
The area the DisplayBuffer occupies in the virtual screen space. More... | |
void | make_current () override |
Makes the DisplayBuffer the current GL rendering target. More... | |
void | release_current () override |
Releases the current GL rendering target. More... | |
void | gl_swap_buffers () override |
Swap buffers for OpenGL rendering. More... | |
void | flip () override |
After gl_swap_buffers, flip the new front buffer to the screen This most likely involves a wait for vblank so can be very time consuming. 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... | |
bool | uses_alpha () const override |
Returns true if the display buffer has an alpha channel and the alpha channel will be read from at some point - in which case the renderer must produce valid alpha channel content. 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... | |
![]() | |
virtual | ~DisplayBuffer () |
__attribute__ ((__deprecated__("Use gl_swap_buffers() and flip(), remembering to release all compositor buffers in the middle."))) void post_update() | |
Additional Inherited Members | |
![]() | |
DisplayBuffer ()=default | |
DisplayBuffer (DisplayBuffer const &c)=delete | |
DisplayBuffer & | operator= (DisplayBuffer const &c)=delete |
mir::graphics::offscreen::DisplayBuffer::DisplayBuffer | ( | SurfacelessEGLContext | egl_context, |
geometry::Rectangle const & | area | ||
) |
|
overridevirtual |
After gl_swap_buffers, flip the new front buffer to the screen This most likely involves a wait for vblank so can be very time consuming.
This function is separate to gl_swap_buffers() because in real display systems the act of scanning out (or flipping) the front buffer is a very separate step to the GL buffer swapping. Not least because "flipping" is a hardware operation that is independent of the graphics library (OpenGL or other). Also, flip() can be a dramatically slower operation than gl_swap_buffers() and it would be an unacceptable performance hit to wait for both before freeing GL resources.
Implements mir::graphics::DisplayBuffer.
|
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::graphics::DisplayBuffer.
|
overridevirtual |
Makes the DisplayBuffer the current GL rendering target.
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 |
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 |
Releases the current GL rendering target.
Implements mir::graphics::DisplayBuffer.
|
overridevirtual |
Returns true if the display buffer has an alpha channel and the alpha channel will be read from at some point - in which case the renderer must produce valid alpha channel content.
Implements mir::graphics::DisplayBuffer.
|
overridevirtual |
The area the DisplayBuffer occupies in the virtual screen space.
Implements mir::graphics::DisplayBuffer.
Copyright © 2012,2013 Canonical Ltd.
Generated on Tue Mar 24 16:15:19 UTC 2015