Allow VideoFrameProvider::Client to avoid driving frame updates.
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:Chris Harrelson <chrishtr@chromium.org> Reviewed-by:
Fady Samuel <fsamuel@chromium.org> Reviewed-by:
Dale Curtis <dalecurtis@chromium.org> Reviewed-by:
Mounir Lamouri <mlamouri@chromium.org> Commit-Queue: Frank Liberato <liberato@chromium.org> Cr-Commit-Position: refs/heads/master@{#581605}
Showing
Please register or sign in to comment