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

Issue 709840 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Surface Synchronization: Rethink and simplify relationship with surface references

Project Member Reported by fsam...@chromium.org, Apr 10 2017

Issue description

Currently, the set of surface references from a CompositorFrame includes both primary and fallback SurfaceDrawQuads.

This is perhaps a mistake. Consider the parent P, referencing the child C.

P1(C1, C2) means parent P submits a CompositorFrame P1 that references the child C where the first param is the fallback surface ID (C1), and the second is the primary surface ID (C2)

C1 is the fallback which means the display compositor already knows about it. C2 is not known yet. Today what we'll do is create a surface reference to a thing that does not yet exist.

Today, when the surface ID C2 becomes available we do not create a temporary reference for it because it is already referenced by the parent in a previous CompositorFrame.

Suppose that immediately after C2 activates (and SurfaceManager does not give it a temp reference), the parent submits P2(C1, C3).

Notice that P2 no longer refers to C2. Thus, it may get garbage collected before the parent finds out about it through "OnWindowSurfaceChanged" in Aura-Mus.

P2(C2, C3) thus, has an invalid fallback surface. If we hit a deadline, and C3 has not resolved, then we will fallback to a surface that no longer exists and we white flashing :-(

I think maybe a simple fix here is not not add "primary SurfaceDrawQuads" to the "embedded_clients" vector in CompositorFrameMetadata. We should only add fallback SurfaceDrawQuads to embedded_clients.

One way to think about this is primary SurfaceInfos are "requests" for synchronization, and fallback SurfaceInfos are "real references".

If the primary Surface is available by the time the parent embeds, then it'll eventually become the fallback Surface and all is good. WDYT?
 
Doh! A few things I said incorrectly when I filed this bug:

1. embedded_clients => embedded_surfaces.

I guess what I REALLY want is for embedded_surfaces to be just the set of of primary surfaces and referenced_surfaces to refer to everything else.

In the future, referenced_surfaces will only refer to fallback surface Ids in fallback SurfaceDrawQuads.
Surface synchronization will use embedded_surfaces for synchronization and uses referenced_surfaces for references.
Owner: fsam...@chromium.org
This has been addressed in this patch: https://codereview.chromium.org/2811813004/

I forgot to add the bug to the issue. I'm marking this as FIXED.
Status: Fixed (was: Available)
Blocking: -601863
Components: -Internals>MUS Internals>Services>WindowService

Sign in to add a comment