Merge lp:~kdub/mir/share-occlusion-with-examples into lp:mir
Status: | Merged |
---|---|
Merged at revision: | 1813 |
Proposed branch: | lp:~kdub/mir/share-occlusion-with-examples |
Merge into: | lp:mir |
Diff against target: |
213 lines (+36/-22) 5 files modified
examples/CMakeLists.txt (+4/-0) src/server/compositor/default_display_buffer_compositor.cpp (+1/-1) src/server/compositor/occlusion.cpp (+15/-9) src/server/compositor/occlusion.h (+5/-1) tests/unit-tests/compositor/test_occlusion.cpp (+11/-11) |
To merge this branch: | bzr merge lp:~kdub/mir/share-occlusion-with-examples |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Alberto Aguirre (community) | Disapprove | ||
Alexandros Frantzis (community) | Disapprove | ||
Alan Griffiths | Disapprove | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email: mp+222577@code.launchpad.net |
Commit message
share occlusion detection logic with the examples/, and allow for different screen coverage areas to be computed based on a renderable.
Description of the change
share occlusion detection logic with the examples/, and allow for different screen coverage areas to be computed based on a renderable.
note:
I'm aiming for this MP to be preparation for fixing lp: #1299977. It raises a sticky question of how to share useful src/ code with examples/ though, so I'd like to tackle that question in this MP.
I've been trying to read the team's temperature on the question 'how to share production code with examples', and the way this MP shares the code seems the most agreeable. Here are the options I considered for how to do this:
1) place the header file in the public folders (as was done with gl_renderer.h). This has the big disadvantage that these privately-intended classes become public API, so I'd like to shy away from this.
2) have the example code duplicate functionality where it needs to. This is actually what I prefer the most. If my intention is to use the mir API to rewrite the compositor, I should expect to write an occlusion algorithm and a renderer from scratch. This does have the downside of we'd have to maintain one algorithm in the examples/ and one in src/, but the upside that the demos only depend on the major version number and are not locked into the specific mirserver version.
3) allow the examples to access the src/ headers, which is what this MP implements. This keeps the private stuff (like occlusion and renderer) private, but has the downside that examples/ is tied to the specific version of libmirserver.
PASSED: Continuous integration, rev:1692 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- ci/1846/ jenkins. qa.ubuntu. com/job/ mir-android- utopic- i386-build/ 498 jenkins. qa.ubuntu. com/job/ mir-clang- utopic- amd64-build/ 499 jenkins. qa.ubuntu. com/job/ mir-mediumtests -utopic- touch/497 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- utopic- amd64-ci/ 367 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- utopic- amd64-ci/ 367/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- utopic- armhf-ci/ 364 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- utopic- armhf-ci/ 364/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/1439 jenkins. qa.ubuntu. com/job/ generic- mediumtests- builder- utopic- armhf/1439/ artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-mediumtests -runner- mako/1704 s-jenkins. ubuntu- ci:8080/ job/touch- flash-device/ 8265
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
SUCCESS: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- team-mir- development- branch- ci/1846/ rebuild
http://