exo: Improve frame callbacks.

Use the compositor frame ack instead of begin-frame callback to
trigger these callbacks. The frame ack is sufficient to prevent
frames from being dropped, and provides minimal latency
back-pressure for clients that implement more advanced
scheduling.

This makes it possible to improve scheduling of frames for
Linux apps significantly. Sommelier can have the next frame
prepared as a dmabuf and ready to commit when we receive the
callback. This minimizes the chance that we'll miss a frame.

BUG=845659
TEST=exo_unittests --gtest_filter=SurfaceTest.RequestFrameCallback
TEST=sommelier /usr/lib/weston/weston-simple-shm
TEST=sommelier -X glxgears

Change-Id: I20f06618d9d550ab501f3945b3d25d4a5c20c218
Reviewed-on: https://chromium-review.googlesource.com/1097776
Reviewed-by: Daniele Castagna <dcastagna@chromium.org>
Commit-Queue: David Reveman <reveman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567301}
5 files changed