• Fady Samuel's avatar
    Surface Synchronization: Throttle child synchronization events · f96f0ea3
    Fady Samuel authored
    This CL enables throttling of child synchronization events. In a child-
    initiated synchronization, the child's frame will likely activate
    before the dependent parent's CompositorFrame arrives. Upon activation,
    the child will see that the new surface does not cause any damage to the
    display (because it's not embedded by any parent yet) and calls the
    draw callback immediately, thereby sending back a DidReceiveCompositorFrameAck
    to the client immediately.
    
    This, in turn, results in the client sending another CompositorFrame to Viz,
    and another and so on, letting the child get further and further ahead of the
    parent. This results in a lot of wasted work because the child's surface will
    not be shown on screen until the parent embeds it and so multiple child
    initiated synchronization events are pointless.
    
    This CL throttles DidReceiveCompositorFrameAck of the child on child-initiated
    synchronization events until the parent references the child.
    
    Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel
    Change-Id: I62416d87f8d871b32f4caad565cff515a9c55445
    Bug: 672962, 879207
    Reviewed-on: https://chromium-review.googlesource.com/1236931
    Commit-Queue: Fady Samuel <fsamuel@chromium.org>
    Reviewed-by: default avatarSaman Sami <samans@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#596300}
    f96f0ea3
surface.h 13.6 KB