Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Issue 2731743002: Decouple FrameSink Hierarchy registration from SurfaceFactoryClient registration (Closed)

Created:
3 years, 9 months ago by Fady Samuel
Modified:
3 years, 9 months ago
Reviewers:
enne (OOO)
CC:
cc-bugs_chromium.org, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Decouple FrameSink Hierarchy registration from SurfaceFactoryClient Prior to this patch, FrameSink hierarchy registration and SurfaceFactoryClient registration were tightly coupled in SurfaceManager. In SurfaceManager's destructor, it verified that the frame_sink_source_map_ is empty. This proved problematic in Mus+Ash because the Mus window server tries to unregister the framesink hierarchy at shutdown by issuing IPCs to Mus-GPU. Thus, there is no guarantee these IPCs will arrive in the gpu process prior to SurfaceManager destruction. By design, Mojo provides no guarantees on process shutdown order, and even if a process tries to override the behavior, Mojo may someday decide to force quit processes and so we cannot guarantee Mus-WS will outlive Mus-GPU. Currently, in Mus+Ash, the BeginFrame hierarchy can be much larger than the set of FrameSinkIds with an associated SurfaceFactoryClient (an associated CompositorFrameSink), in order to facilitate reparenting windows in an environment where not all windows submit CompositorFrames (a single client may embed only a single CompositorFrame that embeds a bunch of local window concepts for performance reasons). It seems to make sense to decouple the BeginFrame hierarchy from the SurfaceFactoryClient hierarchy, in that case. Furthermore, the DCHECK in the SurfaceManager destructor exists to verify that there are no lingering clients and we haven't been wastefully ticking BeginFrames. By decoupling client registration and BeginFrame registration, we can continue to guard against that potential bug while allowing Mus+Ash to have a clean shutdown. BUG=697116 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2731743002 Cr-Commit-Position: refs/heads/master@{#454641} Committed: https://chromium.googlesource.com/chromium/src/+/462ef8c3894d3dc1eceb4a2327006b372737f749

Patch Set 1 #

Patch Set 2 : Fix some SurfaceManager unit tests #

Patch Set 3 : Fixed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+72 lines, -73 lines) Patch
M cc/surfaces/surface_manager.h View 1 chunk +5 lines, -3 lines 0 comments Download
M cc/surfaces/surface_manager.cc View 1 2 7 chunks +33 lines, -36 lines 0 comments Download
M cc/surfaces/surface_manager_unittest.cc View 1 6 chunks +34 lines, -34 lines 0 comments Download

Messages

Total messages: 25 (20 generated)
Fady Samuel
3 years, 9 months ago (2017-03-03 17:30:11 UTC) #12
Fady Samuel
PTAL Enne!
3 years, 9 months ago (2017-03-03 17:31:25 UTC) #16
enne (OOO)
lgtm, thanks for working through all of this. :)
3 years, 9 months ago (2017-03-03 18:29:23 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2731743002/10003
3 years, 9 months ago (2017-03-03 19:07:51 UTC) #22
commit-bot: I haz the power
3 years, 9 months ago (2017-03-03 19:12:53 UTC) #25
Message was sent while issue was closed.
Committed patchset #3 (id:10003) as
https://chromium.googlesource.com/chromium/src/+/462ef8c3894d3dc1eceb4a232700...

Powered by Google App Engine
This is Rietveld 408576698