forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't process CompositorFrames until their SharedBitmaps are ready
CompositorFrames and SharedBitmaps' memory handles come from two different mojo pipes and currently there is no guarantee that for all SharedBitmaps referenced by a CompositorFrame are available when it arrives. In this CL ClientSharedBitmapManager assigns a sequence number to each SharedBitmap it allocates. These sequence numbers are sent to the browser process along with the CompositorFrame that references those SharedBitmaps. When a CompositorFrame arrives, RenderWidgetHostImpl asks from SharedBitmapAllocationNotifierImpl the latest sequence number from that renderer known to the browser and if the CompositorFrame references higher sequence numbers it won't be processed until SharedBitmapAllocationNotifierImpl notifies RenderWidgetHostImpl through the SharedBitmapAllocationObserver interface that the necessary SharedBitmaps are ready. A few notes: - This CL is meant to be a quick fix for crbug.com/734058. Long term we would like this logic to be in viz and not content, but that's substantially more work. - This CL only fixes the issue for RenderWidgets, which got broken after crrev.com/463845. Everything else including OffscreenCanvas has always been broken and remains broken. - SharedBitmapAllocationNotifier will no longer be associated with RenderMessageFilter. It used to be associated to preserve ordering with respect to CompositorFrames, but after crrev.com/463845 CompositorFrames no longer share a pipe with RenderMessageFilter so there is no point. As a result SharedBitmapAllocationNotifierImpl now has its own separate pipe and it lives on the UI thread which is nicer because that's where the observers (RenderWidgetHostImpls) live and we can avoid doing PostTasks. The separate pipe also prepares us for an out of process display compositor because RenderMessageFilter will always be a browser<->renderer pipe and being associated with it doesn't make much sense. - With SharedBitmapAllocationNotifierImpl living on UI thread, I thought we should be able to get rid of the mutex in ServerSharedBitmapManager, but it seems like OnMemoryDump is still being called from another thread. We should investigate whether something can be done about OnMemoryDump so we can get rid of the lock because it feels very unnecessary now. BUG=734058 Change-Id: I3ba32f1e1cb4fce1589445b2f17e9f9855aa0c40 Reviewed-on: https://chromium-review.googlesource.com/565645 Reviewed-by: Tom Sepez <tsepez@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Saman Sami <samans@chromium.org> Cr-Commit-Position: refs/heads/master@{#486875}
- Loading branch information
Saman Sami
authored and
Commit Bot
committed
Jul 14, 2017
1 parent
4136d11
commit 9b76854
Showing
30 changed files
with
241 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.