Mir

Comment 0 for bug 1350725

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Our DisplayBuffer implementation for Mesa/desktop is actually triple buffered, making it one frame more laggy than it needs to be. This was intentional because it's required to allow cloned displays to keep up (waiting for all vblanks may take an extra 16ms).

But we don't need to keep it always-on. We can revert to double buffering in the common case where cloning is not active by adding this to the bottom of mesa::DisplayBuffer::post_update -

    if (outputs.size() <= 1)
        wait_for_page_flip();

Making this change results in a noticeable improvement in responsiveness when dragging windows around.