~alan-griffiths/mir/workaround-lp1602199

« back to all changes in this revision

Viewing changes to tests/integration-tests/test_exchange_buffer.cpp

  • 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:
110
110
    {}
111
111
 
112
112
    std::shared_ptr<mc::BufferStream> create_buffer_stream(
113
 
        mf::BufferStreamId i, std::shared_ptr<mf::BufferSink> const& s,
 
113
        mf::BufferStreamId i, std::shared_ptr<mf::ClientBuffers> const& s,
114
114
        int, mg::BufferProperties const& p) override
115
115
    { return create_buffer_stream(i, s, p); }
116
116
    std::shared_ptr<mc::BufferStream> create_buffer_stream(
117
 
        mf::BufferStreamId, std::shared_ptr<mf::BufferSink> const&, mg::BufferProperties const&) override
 
117
        mf::BufferStreamId, std::shared_ptr<mf::ClientBuffers> const&, mg::BufferProperties const&) override
118
118
    { return std::make_shared<mc::BufferStreamSurfaces>(std::make_shared<StubBundle>(buffer_id_seq)); }
 
119
    std::shared_ptr<mf::ClientBuffers> create_buffer_map(std::shared_ptr<mf::BufferSink> const&)
 
120
    { return nullptr; }
119
121
    std::vector<mg::BufferID> const buffer_id_seq;
120
122
};
121
123