It does seem strange that ms::Surface has:
std::shared_ptr<graphics::Buffer> snapshot_buffer() const;
and
void ms::BasicSurface::with_most_recent_buffer_do(std::function<void(mg::Buffer&)> const& exec)
with_most_recent_buffer_do() seems like it avoids ownership questions a bit better than handing out a shared_ptr, so I'd favor removing snapshot_buffer() from ms::Surface (snapshot_buffer should be private or removed)
It does seem strange that ms::Surface has: :shared_ ptr<graphics: :Buffer> snapshot_buffer() const; e::with_ most_recent_ buffer_ do(std: :function< void(mg: :Buffer& )> const& exec)
std:
and
void ms::BasicSurfac
with_most_ recent_ buffer_ do() seems like it avoids ownership questions a bit better than handing out a shared_ptr, so I'd favor removing snapshot_buffer() from ms::Surface (snapshot_buffer should be private or removed)