Mir

Merge lp://qastaging/~raof/mir/fix-drm-buffer-multiple-attach into lp://qastaging/mir

Proposed by Chris Halse Rogers
Status: Merged
Approved by: Gerry Boland
Approved revision: no longer in the source branch.
Merged at revision: 4261
Proposed branch: lp://qastaging/~raof/mir/fix-drm-buffer-multiple-attach
Merge into: lp://qastaging/mir
Diff against target: 224 lines (+82/-56)
3 files modified
include/platform/mir/graphics/wayland_allocator.h (+1/-1)
src/platforms/mesa/server/buffer_allocator.cpp (+80/-54)
src/platforms/mesa/server/buffer_allocator.h (+1/-1)
To merge this branch: bzr merge lp://qastaging/~raof/mir/fix-drm-buffer-multiple-attach
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Approve
Gerry Boland (community) Approve
Alan Griffiths Approve
Review via email: mp+331123@code.qastaging.launchpad.net

Commit message

mgm::BufferAllocator: Handle a wl_buffer being attached multiple times.

As with the WlShmBuffer, it's valid for a wl_buffer to be wl_surface.attach()ed to multiple wl_surface-s at the same time. If a buffer is attached twice then the buffer.release() event needs to be sent exactly once, when the compositor is finished with *all* submissions.

So, do what we do with WlShmBuffer - associate a shared_ptr<WaylandBuffer> with each wl_buffer, and hand out references to it rather than creating a new WaylandBuffer on each (committed) attach().

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Nice

review: Approve
Revision history for this message
Gerry Boland (gerboland) wrote :

lgtm

review: Approve
Revision history for this message
Mir CI Bot (mir-ci-bot) wrote :

FAILED: Continuous integration, rev:4258
https://mir-jenkins.ubuntu.com/job/mir-ci/3674/
Executed test runs:
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-mir/5033/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/5269
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=artful/5257
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial/5257
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/5257
    FAILURE: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=artful/5076/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5076
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/5076/artifact/output/*zip*/output.zip
    ABORTED: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=artful/5076/console
    ABORTED: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial/5076/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5076
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=artful/5076/artifact/output/*zip*/output.zip
    ABORTED: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/5076/console
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5076
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial/5076/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://mir-jenkins.ubuntu.com/job/mir-ci/3674/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
Mir CI Bot (mir-ci-bot) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches