|
Mir
|
Responsible for taking the buffer data sent from the server and wrapping it in a ClientBuffer. More...
#include <client_buffer_depository.h>
Public Member Functions | |
| ClientBufferDepository (std::shared_ptr< ClientBufferFactory > const &factory, int max_buffers) | |
| Constructor. More... | |
| void | deposit_package (std::shared_ptr< MirBufferPackage > const &, int id, geometry::Size, MirPixelFormat) |
| Construct a ClientBuffer from the IPC data, and use it as the current buffer. More... | |
| std::shared_ptr< ClientBuffer > | current_buffer () |
| uint32_t | current_buffer_id () const |
| void | set_max_buffers (unsigned int max_buffers) |
Responsible for taking the buffer data sent from the server and wrapping it in a ClientBuffer.
The ClientBufferDepository is responsible for taking the IPC buffer data and converting it into the more digestible form of a ClientBuffer. It maintains the client-side state necessary to construct a ClientBuffer.
| mir::client::ClientBufferDepository::ClientBufferDepository | ( | std::shared_ptr< ClientBufferFactory > const & | factory, |
| int | max_buffers | ||
| ) |
Constructor.
| factory | is the ClientBufferFactory that will be used to convert IPC data to ClientBuffers |
| max_buffers | is the number of buffers the depository will cache. After the client has received its initial buffers the ClientBufferDepository will always have the last max_buffers buffers cached. |
| std::shared_ptr< mcl::ClientBuffer > mir::client::ClientBufferDepository::current_buffer | ( | ) |
| uint32_t mir::client::ClientBufferDepository::current_buffer_id | ( | ) | const |
| void mir::client::ClientBufferDepository::deposit_package | ( | std::shared_ptr< MirBufferPackage > const & | package, |
| int | id, | ||
| geometry::Size | size, | ||
| MirPixelFormat | pf | ||
| ) |
Construct a ClientBuffer from the IPC data, and use it as the current buffer.
This also marks the previous current buffer (if any) as being submitted to the server.
| void mir::client::ClientBufferDepository::set_max_buffers | ( | unsigned int | max_buffers | ) |
Copyright © 2012-2015 Canonical Ltd.
Generated on Wed Mar 30 00:29:56 UTC 2016