Clutter patches for frame synchronization



Here are a couple of Clutter patches that go along with the Cogl
patch set I just posted. The need for clutter_stage_set_sync_delay()
is a little bit obscure - what it's handling is that if you have
an application with a strict need for predictable latency running
under Mutter, you don't want to get different behaviors if:

 a) it draws and the Clutter master clock within Mutter is idle.

 b) it draws and the Clutter master clock is waiting for the
    last frame to be processed before it draws again. (Because
    somoe other application did an update, say.)

Currently Clutter draws immediately immediately in case a) giving
a latency of 0-16ms, but in case b) you get a latency of
16-32ms. This really messes up trying to get frame accurate
display of a 24 or 30fps video if there is anything else going on
on the system - not because of loading but because of switching
between the two cases.

But just adding an alternate mode is not enough because if you have
an app that is limited by rendering (instead of one that is limited
by the number of frames it has to display) adding a delay in the
compositor is fatal - it means that the GPU/CPU stay in power saving
mode and you get 30fps when you could get 60fps. So
clutter_stage_skip_sync_delay() is added as well for when Mutter gets
an update from such a client. (See the Mutter wip/frame-synchronization
branch for full details.)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]