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

Issue 2715663007: Implement temporary reference assignment with DisplayCompositor. (Closed)

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

Description

Implement temporary reference assignment with DisplayCompositor. This CL implements the temporary reference assignment via DisplayCompositor. When DisplayCompositorClient finds out a new surface has been created, it tries to find the CompositorFrameSink that will embed the new surface. This is done in mus-ws as it is both fully trusted and has the full ServerWindow heirarchy. If a parent is found an IPC is sent back to DisplayCompositor to assign ownership of the temporary reference. If the CompositorFrameSink that owns a temporary reference is invalidated, the temporary reference is removed because the owner can't add a real reference after invalidation. If no parent is found, for example if the ServerWindow no longer exists or isn't parented to something visible, then an IPC is sent back to DisplayCompositor to drop the temporary reference. In this case mus-ws doesn't expect anything to embed the new surface. BUG=683738 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel Review-Url: https://codereview.chromium.org/2715663007 Cr-Commit-Position: refs/heads/master@{#454389} Committed: https://chromium.googlesource.com/chromium/src/+/5c97d3ea18174c41ad3ab15f0a9c5fe14717829d

Patch Set 1 #

Patch Set 2 : Cleanup. #

Total comments: 8

Patch Set 3 : Rebase + fixes. #

Total comments: 5

Patch Set 4 : . #

Total comments: 3

Patch Set 5 : Improve documentation. #

Patch Set 6 : Rebase. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+113 lines, -16 lines) Patch
M cc/ipc/display_compositor.mojom View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M cc/ipc/mojo_compositor_frame_sink.mojom View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M cc/surfaces/compositor_frame_sink_support.h View 1 2 3 2 chunks +2 lines, -0 lines 0 comments Download
M cc/surfaces/compositor_frame_sink_support.cc View 1 2 3 2 chunks +5 lines, -1 line 0 comments Download
M components/display_compositor/gpu_compositor_frame_sink.h View 1 2 3 2 chunks +3 lines, -0 lines 0 comments Download
M components/display_compositor/gpu_compositor_frame_sink.cc View 1 2 3 2 chunks +5 lines, -2 lines 0 comments Download
M components/display_compositor/gpu_root_compositor_frame_sink.h View 1 2 3 3 chunks +3 lines, -1 line 0 comments Download
M components/display_compositor/gpu_root_compositor_frame_sink.cc View 1 2 3 1 chunk +5 lines, -0 lines 0 comments Download
M services/ui/surfaces/display_compositor.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M services/ui/surfaces/display_compositor.cc View 1 2 2 chunks +10 lines, -0 lines 0 comments Download
M services/ui/ws/server_window_compositor_frame_sink_manager.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M services/ui/ws/server_window_compositor_frame_sink_manager.cc View 1 2 3 4 5 1 chunk +9 lines, -0 lines 0 comments Download
M services/ui/ws/window_server.h View 1 2 3 4 1 chunk +7 lines, -0 lines 0 comments Download
M services/ui/ws/window_server.cc View 1 2 3 4 4 chunks +50 lines, -11 lines 0 comments Download

Messages

Total messages: 41 (17 generated)
kylechar
3 years, 9 months ago (2017-02-24 17:05:20 UTC) #3
Fady Samuel
lgtm + nits. https://codereview.chromium.org/2715663007/diff/20001/services/ui/surfaces/display_compositor.cc File services/ui/surfaces/display_compositor.cc (right): https://codereview.chromium.org/2715663007/diff/20001/services/ui/surfaces/display_compositor.cc#newcode172 services/ui/surfaces/display_compositor.cc:172: // reference to the new surface. ...
3 years, 9 months ago (2017-02-24 18:07:38 UTC) #4
kylechar
https://codereview.chromium.org/2715663007/diff/20001/services/ui/surfaces/display_compositor.cc File services/ui/surfaces/display_compositor.cc (right): https://codereview.chromium.org/2715663007/diff/20001/services/ui/surfaces/display_compositor.cc#newcode172 services/ui/surfaces/display_compositor.cc:172: // reference to the new surface. With surface synchronization ...
3 years, 9 months ago (2017-02-28 18:07:18 UTC) #6
Fady Samuel
lgtm
3 years, 9 months ago (2017-02-28 18:10:35 UTC) #7
kylechar
+sky for services/ui +jbauman for cc/surfaces and components/display_compositor/ +tsepez for mojoms
3 years, 9 months ago (2017-02-28 18:11:00 UTC) #9
Tom Sepez
https://codereview.chromium.org/2715663007/diff/60001/cc/ipc/mojo_compositor_frame_sink.mojom File cc/ipc/mojo_compositor_frame_sink.mojom (right): https://codereview.chromium.org/2715663007/diff/60001/cc/ipc/mojo_compositor_frame_sink.mojom#newcode79 cc/ipc/mojo_compositor_frame_sink.mojom:79: ClaimTemporaryReference(SurfaceId surface_id); can this fail? how do things break ...
3 years, 9 months ago (2017-02-28 18:46:58 UTC) #10
kylechar
https://codereview.chromium.org/2715663007/diff/60001/cc/ipc/mojo_compositor_frame_sink.mojom File cc/ipc/mojo_compositor_frame_sink.mojom (right): https://codereview.chromium.org/2715663007/diff/60001/cc/ipc/mojo_compositor_frame_sink.mojom#newcode79 cc/ipc/mojo_compositor_frame_sink.mojom:79: ClaimTemporaryReference(SurfaceId surface_id); On 2017/02/28 18:46:58, Tom Sepez wrote: > ...
3 years, 9 months ago (2017-02-28 18:59:52 UTC) #11
Tom Sepez
OK, LGTM. Thanks.
3 years, 9 months ago (2017-02-28 19:01:43 UTC) #12
sky
https://codereview.chromium.org/2715663007/diff/60001/services/ui/ws/window_server.cc File services/ui/ws/window_server.cc (right): https://codereview.chromium.org/2715663007/diff/60001/services/ui/ws/window_server.cc#newcode617 services/ui/ws/window_server.cc:617: // If the parent of |window| is part of ...
3 years, 9 months ago (2017-02-28 20:42:54 UTC) #13
kylechar
https://codereview.chromium.org/2715663007/diff/60001/services/ui/ws/window_server.cc File services/ui/ws/window_server.cc (right): https://codereview.chromium.org/2715663007/diff/60001/services/ui/ws/window_server.cc#newcode617 services/ui/ws/window_server.cc:617: // If the parent of |window| is part of ...
3 years, 9 months ago (2017-02-28 20:54:05 UTC) #14
kylechar
https://codereview.chromium.org/2715663007/diff/60001/services/ui/ws/window_server.cc File services/ui/ws/window_server.cc (right): https://codereview.chromium.org/2715663007/diff/60001/services/ui/ws/window_server.cc#newcode617 services/ui/ws/window_server.cc:617: // If the parent of |window| is part of ...
3 years, 9 months ago (2017-02-28 20:54:52 UTC) #15
kylechar
3 years, 9 months ago (2017-02-28 20:54:53 UTC) #16
kylechar
I've made some changes in how we find the parent client in the WS after ...
3 years, 9 months ago (2017-03-01 15:50:33 UTC) #21
Fady Samuel
https://codereview.chromium.org/2715663007/diff/80001/services/ui/ws/window_server.cc File services/ui/ws/window_server.cc (right): https://codereview.chromium.org/2715663007/diff/80001/services/ui/ws/window_server.cc#newcode823 services/ui/ws/window_server.cc:823: ClaimTemporaryReference(window, surface_info.id()); Can't we generalize this to be a ...
3 years, 9 months ago (2017-03-01 16:07:46 UTC) #22
sky
This look good to me, but his is very subtle in particular the ClaimTemporaryReference code). ...
3 years, 9 months ago (2017-03-01 17:01:34 UTC) #23
Fady Samuel
https://codereview.chromium.org/2715663007/diff/80001/services/ui/ws/window_server.cc File services/ui/ws/window_server.cc (right): https://codereview.chromium.org/2715663007/diff/80001/services/ui/ws/window_server.cc#newcode823 services/ui/ws/window_server.cc:823: ClaimTemporaryReference(window, surface_info.id()); On 2017/03/01 16:07:46, Fady Samuel wrote: > ...
3 years, 9 months ago (2017-03-01 17:08:27 UTC) #24
kylechar
https://codereview.chromium.org/2715663007/diff/80001/services/ui/ws/window_server.cc File services/ui/ws/window_server.cc (right): https://codereview.chromium.org/2715663007/diff/80001/services/ui/ws/window_server.cc#newcode823 services/ui/ws/window_server.cc:823: ClaimTemporaryReference(window, surface_info.id()); On 2017/03/01 16:07:46, Fady Samuel wrote: > ...
3 years, 9 months ago (2017-03-01 17:15:24 UTC) #25
jbauman
lgtm
3 years, 9 months ago (2017-03-01 23:55:13 UTC) #26
kylechar
I improved the structure/documentation and added some comments. I was looking at testing this and ...
3 years, 9 months ago (2017-03-02 16:01:33 UTC) #28
sky
On Thu, Mar 2, 2017 at 8:01 AM, <kylechar@chromium.org> wrote: > I improved the structure/documentation ...
3 years, 9 months ago (2017-03-02 19:29:18 UTC) #29
sky
LGTM
3 years, 9 months ago (2017-03-02 19:29:25 UTC) #30
kylechar
Thanks!
3 years, 9 months ago (2017-03-02 21:48:47 UTC) #35
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/2715663007/140001
3 years, 9 months ago (2017-03-02 21:49:35 UTC) #38
commit-bot: I haz the power
3 years, 9 months ago (2017-03-02 21:55:46 UTC) #41
Message was sent while issue was closed.
Committed patchset #6 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/5c97d3ea18174c41ad3ab15f0a9c...

Powered by Google App Engine
This is Rietveld 408576698