Merge lp:~kdub/mir/client-resize-logic into lp:mir
| Status: | Merged |
|---|---|
| Approved by: | Kevin DuBois on 2015-08-25 |
| Approved revision: | 2853 |
| Merged at revision: | 2878 |
| Proposed branch: | lp:~kdub/mir/client-resize-logic |
| Merge into: | lp:mir |
| Diff against target: |
251 lines (+113/-14) 3 files modified
src/client/buffer_vault.cpp (+26/-6) src/client/buffer_vault.h (+3/-1) tests/unit-tests/client/test_buffer_vault.cpp (+84/-7) |
| To merge this branch: | bzr merge lp:~kdub/mir/client-resize-logic |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| PS Jenkins bot | continuous-integration | Approve on 2015-08-25 | |
| Alexandros Frantzis (community) | Approve on 2015-08-25 | ||
| Chris Halse Rogers | 2015-08-17 | Approve on 2015-08-21 | |
|
Review via email:
|
|||
Commit Message
client: add logic to free and allocate buffers of the proper size after a buffer size change.
Description of the Change
client: add logic to free and allocate buffers of the proper size after a buffer size change.
There's a bit of plumbing to pass the resize messages to the stream that goes along with this; but its dependent on other yet-unlanded branches.
I tried a few places in the buffer lifecycle to free and allocate. Between the compositor release and the client usage is where we currently do this for exchange-semantics, and this place is the analogous place on the client side. Its a good place to avoid spamming the server with allocation and free requests when rapid resizing occurs.
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2848
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Chris Halse Rogers (raof) wrote : | # |
«Insert obligatory comment about how I'm pretty sure this all goes away after transition ☺»
186 +TEST_F(
207 +TEST_F(
There doesn't seem to be any reason why these use InSequence tests. The implementation happens to free before allocating, but would be perfectly correct to allocate before free; the InSequence isn't protecting a useful invariant of the code.
207 +TEST_F(
There doesn't seem to be any reason to expect an allocation here? We're testing that the buffer is freed, right? We have
226 +TEST_F(
to test that we actually get correctly-sized buffers.
The code itself looks sane ;).
- 2849. By Kevin DuBois on 2015-08-20
-
merge in mir
- 2850. By Kevin DuBois on 2015-08-20
-
no need to use InSequence
- 2851. By Kevin DuBois on 2015-08-20
-
rename test to say that reallocates instead of just frees
| Kevin DuBois (kdub) wrote : | # |
@InSequence
Removed the requirement, it could free or allocate in either order.
@allocation expectation
It is useful to test where the allocation happens. Another (bad) approach could be to allocate a new buffer on the resize() and this would create some buffers that may not get used if rapidly resizing. Opted to change the test name instead.
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2851
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
| Alexandros Frantzis (afrantzis) wrote : | # |
Looks good overall.
55 + lk.unlock();
56 + server_
57 + server_
58 + lk.lock();
I am bit wary of unlocking to perform the reallocation, as, in theory at least, it could allow other threads to come and mess up the state. Not sure if this could happen in practice in this case, but it would be good to know.
- 2852. By Kevin DuBois on 2015-08-25
-
merge in mir
- 2853. By Kevin DuBois on 2015-08-25
-
make sure buffers is only accessed under lock
| PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:2853
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://

FAILED: Continuous integration, rev:2848 jenkins. qa.ubuntu. com/job/ mir-ci/ 4591/ jenkins. qa.ubuntu. com/job/ mir-android- vivid-i386- build/3555 s-jenkins. ubuntu- ci:8080/ job/mir- clang-ts- wily-amd64- build/417/ console jenkins. qa.ubuntu. com/job/ mir-clang- wily-amd64- build/1089/ console jenkins. qa.ubuntu. com/job/ mir-mediumtests -vivid- touch/3503/ console jenkins. qa.ubuntu. com/job/ mir-wily- amd64-ci/ 740/console jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 3503 jenkins. qa.ubuntu. com/job/ mir-mediumtests -builder- vivid-armhf/ 3503/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -runner- mako/6280/ console s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 22631
http://
Executed test runs:
SUCCESS: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
FAILURE: http://
SUCCESS: http://
deb: http://
FAILURE: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- ci/4591/ rebuild
http://