New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 689719 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 672962



Sign in to add a comment

Surface Synchronization: Scope deadlines to a surface subtree

Project Member Reported by fsam...@chromium.org, Feb 7 2017

Issue description

Currently, as of https://codereview.chromium.org/2676373004, there is a single global deadline that is set when a CompositorFrame is submitted with unresolved dependencies. We should like to synchronize parts the display independently of one another. For example: Exo wants an unlimited deadline, whereas a renderer might not want to wait much for an out of process iframe.

To implement deadline scoping, the display compositor needs to have an understanding of the embedding hierarchy. This is blocked on a full implementation of surface references.
 
Status: Available (was: Untriaged)
In a nutshell, the way this might work is every cc::Surface has an associated cc::DependencyDeadline object that is perhaps owned by the object that creates it, and passed along to cc::Surfaces within cc::Surfaces in its subtree.

When a pending CompositorFrame is submitted to a cc::Surface, we walk up the reference tree to determine the nearest parent with a deadline. If none exist, then that Surface creates a new DependencyDeadline. Otherwise, it assumes the same deadline as its ancestor.

One question is what do we do if there isn't yet a reference to a parent?

Perhaps a simple solution is to simply create a new DependencyDeadline at that point. Ultimately, the goal of this unified deadline system is to ensure that during best-effort multi-client synchronized operations such resize, the parent's deadline doesn't hit before the child's. If it does, then we end up placing the fallback behavior higher up in the embedding hierarchy which is undesirable.
I should add a point for implementers that this DependencyDeadline inheritance mechanism will probably look a lot like the way BeginFrameSources propagate the FrameSinkSourceMapping tree.
Owner: fsam...@chromium.org
Status: Assigned (was: Available)
Assigning to myself.
Blocking: 672962

Comment 6 by danakj@chromium.org, Jun 12 2017

Owner: ----
Status: Available (was: Assigned)
Blocking: -601863
Project Member

Comment 8 by bugdroid1@chromium.org, Jul 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6d5c478a360a4eaeb258940e199b871be506bb7d

commit 6d5c478a360a4eaeb258940e199b871be506bb7d
Author: Fady Samuel <fsamuel@chromium.org>
Date: Thu Jul 06 01:41:55 2017

Surface Synchronization: Implement per-surface deadlines

This CL moves SurfaceDependencyDeadline to Surface. Each surface
can now have its own independent deadline and activate independently.
Deadlines are inherited from the direct parent if the direct
parent already has a deadline set.

This introduces a bit of complexity for determining whether a
CompositorFrame is late to activate it immediately. This complexity
occurs because once a surface is activated due to a deadline it is
no longer tracked by SurfaceDependencyTracker but a surface doesn't
know its parents' dependencies.

This is addressed in this CL by tracking late activation dependencies
in a separate set in each surface. SurfaceDependencyTracker is informed
about when a surface is activated due to a deadline and that it is
missing dependencies. When a CompositorFrame arrives with pending
activation dependencies, then we walk through the set of surfaces with
missing dependencies at activation time and see if they were blocked
on the incoming CompositorFrame. If they were blocked then we activate
the frame immediately.

Bug:  689719 
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel
Change-Id: Iec742c6fd5ca2e8212c37113ba4911e8411238fd
Reviewed-on: https://chromium-review.googlesource.com/553177
Commit-Queue: Fady Samuel <fsamuel@chromium.org>
Reviewed-by: Vladimir Levin <vmpstr@chromium.org>
Reviewed-by: Saman Sami <samans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484440}
[modify] https://crrev.com/6d5c478a360a4eaeb258940e199b871be506bb7d/cc/surfaces/surface.cc
[modify] https://crrev.com/6d5c478a360a4eaeb258940e199b871be506bb7d/cc/surfaces/surface.h
[modify] https://crrev.com/6d5c478a360a4eaeb258940e199b871be506bb7d/cc/surfaces/surface_dependency_deadline.cc
[modify] https://crrev.com/6d5c478a360a4eaeb258940e199b871be506bb7d/cc/surfaces/surface_dependency_deadline.h
[modify] https://crrev.com/6d5c478a360a4eaeb258940e199b871be506bb7d/cc/surfaces/surface_dependency_tracker.cc
[modify] https://crrev.com/6d5c478a360a4eaeb258940e199b871be506bb7d/cc/surfaces/surface_dependency_tracker.h
[modify] https://crrev.com/6d5c478a360a4eaeb258940e199b871be506bb7d/cc/surfaces/surface_manager.cc
[modify] https://crrev.com/6d5c478a360a4eaeb258940e199b871be506bb7d/cc/surfaces/surface_manager.h
[modify] https://crrev.com/6d5c478a360a4eaeb258940e199b871be506bb7d/cc/surfaces/surface_synchronization_unittest.cc
[modify] https://crrev.com/6d5c478a360a4eaeb258940e199b871be506bb7d/components/viz/service/frame_sinks/frame_sink_manager_impl.cc

Comment 9 by fsamuel@google.com, Sep 13 2017

Owner: fsam...@chromium.org
Status: Fixed (was: Available)
Components: -Internals>MUS Internals>Services>WindowService

Sign in to add a comment