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

Issue 2541683004: Add/remove surface references via MojoCompositorFrameSink. (Closed)

Created:
4 years ago by kylechar
Modified:
4 years ago
CC:
chromium-reviews, rjkroege, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, jam, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin-cc_chromium.org, cc-bugs_chromium.org, darin (slow to review), Saman Sami
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add/remove surface references via MojoCompositorFrameSink. Both adding/removing surface references and submitting compositor frames happen via IPC. There needs to be synchronization so that a reference is added before a CompositorFrame is submitted that embeds the Surface. Likewise, a reference should only be removed after a new CompositorFrame is submitted that doesn't embed the Surfacee. Having add/remove references on the same Mojo interface as submitting CompositorFrames is the simplest way to achieve this synchronization. Remove the old IPCs from mojom::DisplayCompositor and add new IPCs to mojom::MojoCompositorFrameSink. Also add OnDisplayCompositorCreated() to mojom::DisplayCompositorClient. This is sent as the first message to the DisplayCompositorClient and it contains the top level root surface id. This allows the privileged process to add references to the display roots. This also makes it impossible for non-privileged clients to add references from the top level root, since the SurfaceId is unguessable. BUG=659227 TBR=junov@chromium.org Committed: https://crrev.com/2255ff5852f6d1ab187601fc18231f97409d3031 Cr-Commit-Position: refs/heads/master@{#436705}

Patch Set 1 #

Total comments: 2

Patch Set 2 : WIP #

Total comments: 2

Patch Set 3 : Update CL. #

Patch Set 4 : Cleanup. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+244 lines, -174 lines) Patch
M cc/ipc/display_compositor.mojom View 1 2 2 chunks +5 lines, -9 lines 0 comments Download
M cc/ipc/mojo_compositor_frame_sink.mojom View 1 2 2 chunks +7 lines, -0 lines 0 comments Download
M content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.h View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M content/browser/renderer_host/offscreen_canvas_compositor_frame_sink.cc View 1 2 3 1 chunk +10 lines, -0 lines 0 comments Download
M services/ui/surfaces/display_compositor.h View 1 2 3 2 chunks +20 lines, -14 lines 0 comments Download
M services/ui/surfaces/display_compositor.cc View 1 2 3 chunks +57 lines, -51 lines 0 comments Download
M services/ui/surfaces/display_compositor_unittest.cc View 1 2 7 chunks +22 lines, -4 lines 0 comments Download
M services/ui/surfaces/gpu_compositor_frame_sink.h View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M services/ui/surfaces/gpu_compositor_frame_sink.cc View 1 2 1 chunk +10 lines, -0 lines 0 comments Download
M services/ui/ws/frame_generator.h View 1 2 3 5 chunks +14 lines, -19 lines 0 comments Download
M services/ui/ws/frame_generator.cc View 1 2 3 8 chunks +56 lines, -69 lines 0 comments Download
M services/ui/ws/server_window_delegate.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M services/ui/ws/test_server_window_delegate.h View 1 2 3 3 chunks +4 lines, -3 lines 0 comments Download
M services/ui/ws/test_server_window_delegate.cc View 2 chunks +7 lines, -5 lines 0 comments Download
M services/ui/ws/window_server.h View 1 2 3 chunks +5 lines, -0 lines 0 comments Download
M services/ui/ws/window_server.cc View 1 2 3 2 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (15 generated)
Fady Samuel
https://codereview.chromium.org/2541683004/diff/1/cc/ipc/display_compositor.mojom File cc/ipc/display_compositor.mojom (right): https://codereview.chromium.org/2541683004/diff/1/cc/ipc/display_compositor.mojom#newcode41 cc/ipc/display_compositor.mojom:41: OnRootSurfaceId(cc.mojom.SurfaceId surface_id); OnDisplayCompositorCreated? "OnRootSurfaceId" doesn't tell me what just ...
4 years ago (2016-12-04 23:30:13 UTC) #3
kylechar
https://codereview.chromium.org/2541683004/diff/1/cc/ipc/display_compositor.mojom File cc/ipc/display_compositor.mojom (right): https://codereview.chromium.org/2541683004/diff/1/cc/ipc/display_compositor.mojom#newcode41 cc/ipc/display_compositor.mojom:41: OnRootSurfaceId(cc.mojom.SurfaceId surface_id); On 2016/12/04 23:30:12, Fady Samuel wrote: > ...
4 years ago (2016-12-05 20:26:45 UTC) #4
kylechar
fsamuel: services/ui/surfaces/* sky: services/ui/ws/* tsepez: *.mojom junov: chrome/browser/renderer_host/offscreen_canvas*
4 years ago (2016-12-06 14:31:06 UTC) #6
sky
LGTM
4 years ago (2016-12-06 17:35:22 UTC) #10
Fady Samuel
lgtm
4 years ago (2016-12-06 17:56:10 UTC) #11
Tom Sepez
mojom lgtm
4 years ago (2016-12-06 17:56:20 UTC) #12
kylechar
Thanks! TBR junov.
4 years ago (2016-12-06 20:27:14 UTC) #18
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/2541683004/60001
4 years ago (2016-12-06 20:28:11 UTC) #20
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years ago (2016-12-06 20:43:05 UTC) #23
commit-bot: I haz the power
4 years ago (2016-12-06 20:46:41 UTC) #25
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/2255ff5852f6d1ab187601fc18231f97409d3031
Cr-Commit-Position: refs/heads/master@{#436705}

Powered by Google App Engine
This is Rietveld 408576698