~raof/mir/maybe-fix-deadlocking-mesa-test

« back to all changes in this revision

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

Use the pixel format of the individual buffer stream to infer shaped()
  
It is a valid scenario to have an opaque buffer (or buffer stream) for the first layer in a surface and have further transparent or also opaque layers on top. This change removes the constant "non_rectangular" parameter of BasicSurface, and instead looks at the actual streams that are attached to surface.
  
With mir_presentation_queue it might be worth thinking about going one step further and actually look at the mg::Buffer that would be drawn next. An attempt to do so showed that it would require a few further refactoring steps in our integration test setup.
.

Approved by Kevin DuBois, mir-ci-bot, Alexandros Frantzis.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
            {},
44
44
            {{},{}},
45
45
            mir_pointer_unconfined,
46
 
            true,
47
46
            { { std::make_shared<testing::NiceMock<MockBufferStream>>(), {0, 0}, {} } },
48
47
            std::make_shared<StubInputChannel>(),
49
48
            {},