Mir

Merge lp://qastaging/~vanvugt/mir/manual-vsync-api-v2 into lp://qastaging/mir

Proposed by Daniel van Vugt
Status: Work in progress
Proposed branch: lp://qastaging/~vanvugt/mir/manual-vsync-api-v2
Merge into: lp://qastaging/mir
Diff against target: 233 lines (+103/-2)
9 files modified
examples/eglapp.c (+15/-1)
include/client/mir_toolkit/mir_window.h (+16/-0)
src/client/frame_clock.cpp (+10/-0)
src/client/frame_clock.h (+8/-0)
src/client/mir_surface.cpp (+16/-0)
src/client/mir_surface.h (+2/-0)
src/client/mir_surface_api.cpp (+5/-0)
src/client/symbols.map (+6/-1)
tests/unit-tests/client/test_frame_clock.cpp (+25/-0)
To merge this branch: bzr merge lp://qastaging/~vanvugt/mir/manual-vsync-api-v2
Reviewer Review Type Date Requested Status
Mir CI Bot continuous-integration Approve
Mir development team Pending
Review via email: mp+323313@code.qastaging.launchpad.net

Commit message

Introducing a trivial API function that allows clients to throttle
themselves without ever blocking inside thirdparty code:
mir_window_get_microseconds_till_vblank

The intended methodology is for a client to set swap interval zero
and then use this new function to throttle its own swaps.

The intended use cases are:
 * Toolkits/apps that have an existing event loop (particularly
   single threaded ones) and don't want anything that complicates
   that architecture, but do want synchronized/throttled rendering.
 * Existing single-threaded users (Xmir only?) of the asynchronous
   mir_buffer_stream_swap_buffers(), can continue to have vsync and
   asynchronous buffer returns, and single-threaded simplicity,
   without putting a queuing/threading burden on libmirclient to
   throttle buffer returns at all. The existing client event loop can
   be used instead.

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

PASSED: Continuous integration, rev:4167
https://mir-jenkins.ubuntu.com/job/mir-ci/3380/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4574
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4700
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4689
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4689
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4606
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4606/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/4606
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4606/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4606
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4606/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/4606
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=mesa,release=zesty/4606/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/4606
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4606/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)

Unmerged revisions

4167. By Daniel van Vugt

Rename the new unit test to match what it actually does

4166. By Daniel van Vugt

Use the new feature in examples and fix up C symbol exports.

4165. By Daniel van Vugt

And use the new function

4164. By Daniel van Vugt

Implement a new FrameClock method for the new API, which eases unit
testing and is crucially also right... so the test now passes.

4163. By Daniel van Vugt

Reintroduce and rewrite the unit test

4162. By Daniel van Vugt

Revert back to a simpler algorithm

4161. By Daniel van Vugt

A little progress

4160. By Daniel van Vugt

A new approach. Needs testing...

4159. By Daniel van Vugt

Drop the new unit test

4158. By Daniel van Vugt

Add a unit test for the expected behaviour from the new MirWindow
function... presently failing.

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