~alan-griffiths/mir/workaround-lp1602199

« back to all changes in this revision

Viewing changes to tests/include/mir/test/doubles/mock_buffer_stream.h

  • Committer: Tarmac
  • Author(s): Kevin DuBois
  • Date: 2016-05-03 09:49:54 UTC
  • mfrom: (3369.2.31 server-side-alloc)
  • Revision ID: tarmac-20160503094954-6l9jtr20mydxs3l7
server: Change point of frontend-facing buffer allocation from the mf::BufferStream to the msc::Session to prepare for NBS connection-allocated buffers.

We were previously allocating from the streams, but to accommodate mir_connection_allocate_buffer(), we will have to allocate via msc::Session.

This exposes mf::ClientBuffers(), as the streams need to reflect that buffers came from the same Session/connection. (cross-connection/cross-process mirclient-allocated-buffers are not supported). render_surfaces has an example of a 'floating' shell buffer stream that didn't originate from IPC.

Approved by mir-ci-bot, Cemil Azizoglu, Chris Halse Rogers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
78
78
    MOCK_METHOD1(with_most_recent_buffer_do, void(std::function<void(graphics::Buffer&)> const&));
79
79
    MOCK_CONST_METHOD0(pixel_format, MirPixelFormat());
80
80
    MOCK_CONST_METHOD0(has_submitted_buffer, bool());
81
 
    MOCK_METHOD1(allocate_buffer, graphics::BufferID(graphics::BufferProperties const&));
82
 
    MOCK_METHOD1(remove_buffer, void(graphics::BufferID));
83
 
    MOCK_METHOD2(with_buffer, void(graphics::BufferID, std::function<void(graphics::Buffer&)> const&));
 
81
    MOCK_METHOD1(disassociate_buffer, void(graphics::BufferID));
 
82
    MOCK_METHOD1(associate_buffer, void(graphics::BufferID));
84
83
    MOCK_METHOD1(set_scale, void(float));
85
84
};
86
85
}