Mir

Merge lp:~vanvugt/mir/swap-then-drop into lp:mir

Proposed by Daniel van Vugt
Status: Merged
Approved by: Chris Halse Rogers
Approved revision: no longer in the source branch.
Merged at revision: 4093
Proposed branch: lp:~vanvugt/mir/swap-then-drop
Merge into: lp:mir
Diff against target: 17 lines (+4/-2)
1 file modified
src/renderers/gl/renderer.cpp (+4/-2)
To merge this branch: bzr merge lp:~vanvugt/mir/swap-then-drop
Reviewer Review Type Date Requested Status
Chris Halse Rogers Approve
Alan Griffiths Approve
Mir CI Bot continuous-integration Approve
Review via email: mp+320015@code.launchpad.net

Commit message

Reorder gl::Renderer::render so that GL calls which don't affect screen
contents are not in the way of swap_buffers.

The difference is probably never noticeable but theoretically this gets
swap_buffers started marginally earlier.

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

PASSED: Continuous integration, rev:4090
https://mir-jenkins.ubuntu.com/job/mir-ci/3174/
Executed test runs:
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-mir/4265
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-0-fetch/4352
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=vivid+overlay/4342
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=xenial+overlay/4342
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-1-sourcepkg/release=zesty/4342
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4292
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=clang,platform=mesa,release=zesty/4292/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/4292
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=xenial+overlay/4292/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4292
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=amd64,compiler=gcc,platform=mesa,release=zesty/4292/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4292
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=cross-armhf,compiler=gcc,platform=android,release=vivid+overlay/4292/artifact/output/*zip*/output.zip
    SUCCESS: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4292
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=android,release=vivid+overlay/4292/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/4292
        deb: https://mir-jenkins.ubuntu.com/job/build-2-binpkg-mir/arch=i386,compiler=gcc,platform=mesa,release=xenial+overlay/4292/artifact/output/*zip*/output.zip

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

review: Approve (continuous-integration)
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

Sure, why not.

review: Approve
Revision history for this message
Chris Halse Rogers (raof) wrote :

Indeed.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/renderers/gl/renderer.cpp'
2--- src/renderers/gl/renderer.cpp 2017-02-15 09:38:53 +0000
3+++ src/renderers/gl/renderer.cpp 2017-03-16 04:16:06 +0000
4@@ -212,9 +212,11 @@
5 for (auto const& r : renderables)
6 draw(*r, r->alpha() < 1.0f ? alpha_program : default_program);
7
8+ render_target.swap_buffers();
9+
10+ // Deleting unused textures only requires the GL context. This clean-up
11+ // does not affect screen contents so can happen after swap_buffers...
12 texture_cache->drop_unused();
13-
14- render_target.swap_buffers();
15 }
16
17 void mrg::Renderer::draw(mg::Renderable const& renderable,

Subscribers

People subscribed via source and target branches