Merge lp:~vanvugt/mir/resize-events into lp:mir
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Alan Griffiths | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 1259 | ||||
Proposed branch: | lp:~vanvugt/mir/resize-events | ||||
Merge into: | lp:mir | ||||
Diff against target: |
275 lines (+131/-8) 7 files modified
examples/eglapp.c (+19/-4) examples/fingerpaint.c (+12/-0) include/shared/mir_toolkit/event.h (+12/-1) src/server/frontend/event_sender.cpp (+1/-1) src/server/scene/surface_impl.cpp (+9/-0) tests/unit-tests/frontend/test_event_sender.cpp (+36/-0) tests/unit-tests/scene/test_surface_impl.cpp (+42/-2) |
||||
To merge this branch: | bzr merge lp:~vanvugt/mir/resize-events | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
PS Jenkins bot (community) | continuous-integration | Approve | |
Alan Griffiths | Approve | ||
Alexandros Frantzis (community) | Approve | ||
Review via email:
|
Commit message
Add mir_event_
immediately to surface resizing. (LP: #1227744)
Description of the change
You will see FIXME comments in the example code. I spent several days prototyping solutions to bug 1194384 to avoid the FIXMEs, before realizing it's a much bigger can of worms and beyond this scope of this work. Most importantly, the design of resize events is not affected by the presence of a fix for bug 1194384. So any sufficiently powerful toolkit (one with its own event queue and/or locking primitives) will be able to utilize MirResizeEvent immediately, without needing a fix for bug 1194384.
I admit, this was not my first choice of design. I started with "size" being a MirSurfaceAttrib with value:
int value = (width << 16) | height;
However as nice as that was reusing the existing logic and maintaining "size" as an "attribute", it was a bit kludgy and I feared reviewers would disapprove of the shifting. Not to mention the 4-gigapixel limitation ;)
I also prototyped a solution where size was a multi-value MirSurfaceAttrib. However modifying all the code to support multi-value MirSurfaceAttrib's resulted in a mess that I did not like at all.
And then there were several other possible designs I disliked so much I did not even prototype. So this is a compromise, which I think more people will approve of.
PASSED: Continuous integration, rev:1260 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- ci/448/ jenkins. qa.ubuntu. com/job/ mir-android- trusty- i386-build/ 299 jenkins. qa.ubuntu. com/job/ mir-clang- trusty- amd64-build/ 296 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- amd64-ci/ 177 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- amd64-ci/ 177/artifact/ work/output/ *zip*/output. zip jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- armhf-ci/ 177 jenkins. qa.ubuntu. com/job/ mir-team- mir-development -branch- trusty- armhf-ci/ 177/artifact/ work/output/ *zip*/output. zip
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
deb: http://
Click here to trigger a rebuild: s-jenkins. ubuntu- ci:8080/ job/mir- team-mir- development- branch- ci/448/ rebuild
http://