20 #ifndef MIR_GRAPHICS_ANDROID_FB_SIMPLE_SWAPPER_H_
21 #define MIR_GRAPHICS_ANDROID_FB_SIMPLE_SWAPPER_H_
25 #include <hardware/gralloc.h>
26 #include <hardware/fb.h>
27 #include <hardware/hwcomposer.h>
28 #include <condition_variable>
39 class GraphicBufferAllocator;
41 class Framebuffers :
public FramebufferBundle
44 Framebuffers(std::shared_ptr<GraphicBufferAllocator>
const& buffer_allocator,
45 std::shared_ptr<hwc_composer_device_1>
const& hwc);
46 Framebuffers(std::shared_ptr<GraphicBufferAllocator>
const& buffer_allocator,
47 std::shared_ptr<framebuffer_device_t>
const& fb);
50 geometry::Size fb_size();
51 std::shared_ptr<Buffer> buffer_for_render();
52 std::shared_ptr<Buffer> last_rendered_buffer();
53 void wait_for_consumed_buffer(
bool);
57 geometry::Size
const size;
59 std::mutex queue_lock;
60 std::shared_ptr<Buffer> buffer_being_rendered;
61 std::condition_variable cv;
62 std::queue<std::shared_ptr<graphics::Buffer>> queue;
int const size
Definition: make_socket_rpc_channel.cpp:50