Surface synchronization: Consider interaction with display scheduler |
|||||||||||
Issue descriptionWork is ongoing to implement BeginFrameAcks. With BeginFrameAcks, the display scheduler becomes aware of when all clients have completed the work they need to complete on BeginFrame, and it's a good time to trigger the generation of a display frame. With surface synchronization, a client may not ACK a BeginFrame until the CompositorFrame is activated. This is potentially problematic because this means that we'll never start display frame generation early. My worry is surface synchronization effectively defeats this optimization.
,
Apr 3 2017
One idea: Maybe we could acknowledge no-damage for blocked Surfaces/CFSSupports as soon as all CFFSSupports are either blocked or have acknowledged the same BeginFrame? That should capture cases where a Surface is blocked on a CompositorFrame producer that already finished the same BeginFrame, I think.
,
Apr 3 2017
Hi, please set Available/Feature on this type of tracking issue so we don't have to go through them in our triage.
,
Apr 20 2017
,
May 3 2017
Assigning to eseckler@ since he's actively thinking about this.
,
May 3 2017
,
May 23 2017
,
May 26 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e356c64f253923983248656d304d8aa471aad5f0 commit e356c64f253923983248656d304d8aa471aad5f0 Author: eseckler <eseckler@chromium.org> Date: Fri May 26 12:59:36 2017 [cc] Plumb BeginFrameAcks through SurfaceManager to DisplayScheduler. Plumbs the BeginFrameAcks from DidNotProduceFrame and SubmitCompositorFrame through new SurfaceObserver methods from CompositorFrameSinks to the DisplayScheduler. Also replaces the expected surface damage heuristics previously used by DisplayScheduler with tracking BeginFrame(Ack)s and surface damage. This is work towards unified BeginFrame acknowledgments, see: Tracking bug: https://crbug.com/697086 Design doc: http://bit.ly/beginframeacks BUG= 697086 , 646774, 678119 , 703079 , 707513 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_site_isolation Review-Url: https://codereview.chromium.org/2854163003 Cr-Commit-Position: refs/heads/master@{#474989} [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/BUILD.gn [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/compositor_frame_sink_support.cc [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/compositor_frame_sink_support_unittest.cc [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/direct_compositor_frame_sink_unittest.cc [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/display.cc [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/display.h [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/display_scheduler.cc [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/display_scheduler.h [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/display_scheduler_unittest.cc [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/display_unittest.cc [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/surface.cc [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/surface.h [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/surface_manager.cc [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/surface_manager.h [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/surface_observer.h [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/surfaces/surface_synchronization_unittest.cc [add] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/test/fake_surface_observer.cc [add] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/cc/test/fake_surface_observer.h [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/components/viz/frame_sinks/mojo_frame_sink_manager.cc [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/components/viz/frame_sinks/mojo_frame_sink_manager.h [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/content/browser/frame_host/render_widget_host_view_child_frame_unittest.cc [modify] https://crrev.com/e356c64f253923983248656d304d8aa471aad5f0/content/browser/renderer_host/render_widget_host_view_aura_unittest.cc
,
Jun 12 2017
I'm marking this as FIXED. Please reopen if you disagree.
,
Jun 13 2017
,
Oct 3 2017
I think we need to think about this again for the --run-all-compositing-stages-before-draw mode. Currently, we extend the DisplayScheduler's BeginFrame deadline for surfaces with pending CompositorFrames. For this mode, that means blocking indefinitely. However, AFAIU, pending CompositorFrames may only activate in future BeginFrames, even in --run-all-.. mode. For examples, because a surface dependency's frame sink is CompositorFrameAck-throttled on an older surface. Thus, I think we'll have to consider surfaces with pending CompositorFrames as ready in DisplayScheduler. (We were already thinking about this before in https://codereview.chromium.org/2854163003/.)
,
Dec 19 2017
As it turns out, in full-pipeline mode, pending CompositorFrames are almost guaranteed to activate in the same BeginFrame - and so considering them as blocking is actually beneficial for the full-pipeline mode. See also: https://docs.google.com/document/d/1PppegrpXhOzKKAuNlP6XOEnviXFGUiX2hop00Cxcv4o/edit#heading=h.96vuopjnyc7s .
,
Feb 26 2018
|
|||||||||||
►
Sign in to add a comment |
|||||||||||
Comment 1 by eseckler@chromium.org
, Apr 3 2017