Mir

Merge lp:~raof/mir/fix-invalid-bufferstream-id into lp:mir

Proposed by Chris Halse Rogers on 2017-05-25
Status: Merged
Approved by: Gerry Boland on 2017-05-26
Approved revision: 4183
Merged at revision: 4178
Proposed branch: lp:~raof/mir/fix-invalid-bufferstream-id
Merge into: lp:mir
Prerequisite: lp:~raof/mir/better-eglstream-detection
Diff against target: 23 lines (+0/-2)
2 files modified
src/client/mir_connection.cpp (+0/-1)
tests/unit-tests/client/test_mir_connection.cpp (+0/-1)
To merge this branch: bzr merge lp:~raof/mir/fix-invalid-bufferstream-id
Reviewer Review Type Date Requested Status
Gerry Boland Approve on 2017-05-26
Alan Griffiths 2017-05-25 Approve on 2017-05-25
Mir CI Bot continuous-integration Approve on 2017-05-25
Review via email: mp+324600@code.launchpad.net

Commit message

client: Don't set BufferStreamID to an invalid value when allocating a buffer.

We have code in mf::SessionMediator to check if a BufferStreamID is set on a allocation request. This code never exectues, though, because for some reason MirConnection will always set the BufferStreamID on an allocation request.

And if there isn't a reasonable BufferStreamID to set (ie: we're allocating a buffer via mir_connection_allocate_buffer) then it sets -1, an invalid ID.

To post a comment you must log in.
Mir CI Bot (mir-ci-bot) wrote :

PASSED: Continuous integration, rev:4183
https://mir-jenkins.ubuntu.com/job/mir-ci/3412/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4640
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4772
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4761
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4761
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4672
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4672/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4672
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4672/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4672
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4672/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4672
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4672/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4672
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4672/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Alan Griffiths (alan-griffiths) wrote :

LGTM

review: Approve
Gerry Boland (gerboland) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/client/mir_connection.cpp'
2--- src/client/mir_connection.cpp 2017-05-17 04:48:46 +0000
3+++ src/client/mir_connection.cpp 2017-05-25 06:40:14 +0000
4@@ -1287,7 +1287,6 @@
5 MirBufferCallback callback, void* context)
6 {
7 mp::BufferAllocation request;
8- request.mutable_id()->set_value(-1);
9 auto buffer_request = request.add_buffer_requests();
10 buffer_request->set_width(size.width.as_int());
11 buffer_request->set_height(size.height.as_int());
12
13=== modified file 'tests/unit-tests/client/test_mir_connection.cpp'
14--- tests/unit-tests/client/test_mir_connection.cpp 2017-05-17 04:48:46 +0000
15+++ tests/unit-tests/client/test_mir_connection.cpp 2017-05-25 06:40:14 +0000
16@@ -854,7 +854,6 @@
17 auto format = mir_pixel_format_abgr_8888;
18 auto usage = mir_buffer_usage_software;
19 mp::BufferAllocation mp_alloc;
20- mp_alloc.mutable_id()->set_value(-1);
21 auto params = mp_alloc.add_buffer_requests();
22 params->set_width(size.width.as_int());
23 params->set_height(size.height.as_int());

Subscribers

People subscribed via source and target branches