• liberato@chromium.org's avatar
    Allow VideoFrameProvider::Client to avoid driving frame updates. · f14f5166
    liberato@chromium.org authored
    Previously, VideoFrameCompositor assumed that, if it had a client,
    that the client would drive VideoFrame updates based on the vsync
    clock.  If an external consumer (e.g., WebGL) painted the frame,
    VFC would still not update the current frame, since the client would
    take care of it.
    
    VideoFrameSubmitter is a client that sometimes elides frame updates,
    if it believes that no consumer is present (e.g., if the
    corresponding SurfaceLayer is not in the layer tree, or is not
    visible).  However, this would break external consumers, since they
    would no longer get current VideoFrames.
    
    This CL allows a VideoFrameProvider::Client to signal that it isn't
    doing frame updates.  In this case, VFC will still try to move the
    frame forward to match the wall clock, so that external consumers
    get current frames.
    
    Additionally, this CL causes SurfaceLayerImpl to signal that it's
    no longer visible upon destruction.  This catches cases where a
    video element is removed from the DOM.
    
    Bug: 869277
    Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel
    Change-Id: Ia53a349af4add6d4792ef16e0306aa7c139ab70c
    Reviewed-on: https://chromium-review.googlesource.com/1159274Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
    Reviewed-by: default avatarFady Samuel <fsamuel@chromium.org>
    Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
    Reviewed-by: default avatarMounir Lamouri <mlamouri@chromium.org>
    Commit-Queue: Frank Liberato <liberato@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#581605}
    f14f5166
surface_layer_impl.cc 10.1 KB