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;
44 Framebuffers(std::shared_ptr<GraphicBufferAllocator>
const& buffer_allocator,
45 std::shared_ptr<hwc_composer_device_1>
const& hwc,
unsigned int num_framebuffers);
46 Framebuffers(std::shared_ptr<GraphicBufferAllocator>
const& buffer_allocator,
47 std::shared_ptr<framebuffer_device_t>
const& fb);
59 double refresh_rate_hz;
61 std::mutex queue_lock;
62 std::shared_ptr<Buffer> buffer_being_rendered;
63 std::condition_variable cv;
64 std::queue<std::shared_ptr<graphics::Buffer>> queue;
All things Mir.
Definition: aging_buffer.h:24
std::shared_ptr< Buffer > buffer_for_render()
Definition: framebuffers.cpp:150
Definition: framebuffers.h:41
geometry::Size fb_size()
Definition: framebuffers.cpp:140
Framebuffers(std::shared_ptr< GraphicBufferAllocator > const &buffer_allocator, std::shared_ptr< hwc_composer_device_1 > const &hwc, unsigned int num_framebuffers)
std::shared_ptr< Buffer > last_rendered_buffer()
Definition: framebuffers.cpp:170
Definition: framebuffer_bundle.h:36
double fb_refresh_rate()
Definition: framebuffers.cpp:145
Definition: android_input_receiver.h:32
void wait_for_consumed_buffer(bool)
Definition: framebuffers.cpp:176
MirPixelFormat fb_format()
Definition: framebuffers.cpp:136