~andreas-pokorny/mir/fix-1570357

Viewing all changes in revision 3453.

shell: no longer auto-create a 'default stream' on behalf of user creating a surface without specifying a stream. Session::create_surface() was creating two resources, and we were kludging around this by casting the mf::SurfaceId it returns to a mf::BufferStreamId, and assuming that the stream was created.

Now, BufferStreamId and SurfaceId are independent id sequences (whereas previously, every SurfaceId was a BufferStreamId, but not vice-versa)

We got into the situation where create_surface() creates a stream and a surface when we split the stream concept from the surface concept a long time ago. Now that we want to create more elaborate stream configurations at startup (see lp: #1563278), we should just have the user tell us what they want via SurfaceCreationParameters instead of guessing and trying to compensate with an automatically created stream.

Its currently necessary to have some content with a Surface (due to existing interfaces that need changing), but soon enough we could probably have content-less surfaces, if that's useful anywhere...

Downstreams (usc/qtmir) are not using Session to create their own surfaces apart from actual ipc clients, so although its an ABI break, they should be compatible.

Approved by mir-ci-bot, Andreas Pokorny, Cemil Azizoglu, Brandon Schaefer.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: