20 #ifndef MIR_COMPOSITOR_SWITCHING_BUNDLE_H_
21 #define MIR_COMPOSITOR_SWITCHING_BUNDLE_H_
24 #include <condition_variable>
33 class GraphicBufferAllocator;
42 const std::shared_ptr<graphics::GraphicBufferAllocator> &,
49 std::shared_ptr<graphics::Buffer>
53 void snapshot_release(std::shared_ptr<graphics::Buffer>
const& released_buffer);
60 std::shared_ptr<graphics::GraphicBufferAllocator> gralloc;
62 int drop_frames(
int max);
64 int first_free()
const;
65 int next(
int slot)
const;
66 int prev(
int slot)
const;
67 int last_compositor()
const;
69 const std::shared_ptr<graphics::Buffer> &alloc_buffer(
int slot);
71 enum {MAX_NBUFFERS = 5};
74 std::shared_ptr<graphics::Buffer> buf;
77 SharedBuffer ring[MAX_NBUFFERS];
90 std::condition_variable cond;
92 unsigned long last_consumed;
94 bool overlapping_compositors;