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

Issue 2400723003: Mus+Ash: Use standard cc mechanism for surface lifetime. (Closed)

Created:
4 years, 2 months ago by Fady Samuel
Modified:
4 years, 2 months ago
Reviewers:
rjkroege, sky
CC:
chromium-reviews, rjkroege
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mus+Ash: Use standard cc mechanism for surface lifetime. Rendering of the topmost frame happens in two phases. First the frame is generated and submitted, and a later date it is actually drawn. During the time the frame is generated and drawn we can't destroy the surface, otherwise when drawn you get an empty surface. To address this previously, mus-ws implemented its own lifetime management system. cc already has a mechanism called SurfaceSequence (which is being updated in parallel). However, in order to manage surface lifetime correctly the face of surface ID propagation to clients, we need to track surfaces using cc. BUG=647852 Committed: https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0 Cr-Commit-Position: refs/heads/master@{#424010}

Patch Set 1 #

Patch Set 2 : Rebase and remove stale comments #

Patch Set 3 : Drop reference to surfaces when window goes away #

Patch Set 4 : Unbreak unittest #

Patch Set 5 : Only add window observer if we're adding the dependency for the first time #

Total comments: 21

Patch Set 6 : Addressed Rob's comments #

Total comments: 2

Patch Set 7 : Addressed Rob's comments #

Patch Set 8 : Only AddObserver once #

Unified diffs Side-by-side diffs Delta from patch set Stats (+154 lines, -121 lines) Patch
M services/ui/ws/display.h View 5 chunks +0 lines, -14 lines 0 comments Download
M services/ui/ws/display.cc View 4 chunks +0 lines, -28 lines 0 comments Download
M services/ui/ws/frame_generator.h View 1 2 3 4 5 6 6 chunks +45 lines, -9 lines 0 comments Download
M services/ui/ws/frame_generator.cc View 1 2 3 4 5 6 7 7 chunks +87 lines, -3 lines 0 comments Download
M services/ui/ws/frame_generator_delegate.h View 1 chunk +0 lines, -3 lines 0 comments Download
M services/ui/ws/platform_display.h View 1 chunk +0 lines, -1 line 0 comments Download
M services/ui/ws/platform_display.cc View 1 chunk +0 lines, -5 lines 0 comments Download
M services/ui/ws/platform_display_delegate.h View 1 chunk +0 lines, -3 lines 0 comments Download
M services/ui/ws/server_window.h View 1 2 3 4 5 6 7 2 chunks +1 line, -3 lines 0 comments Download
M services/ui/ws/server_window.cc View 1 2 3 4 5 6 7 2 chunks +4 lines, -12 lines 0 comments Download
M services/ui/ws/server_window_delegate.h View 1 chunk +0 lines, -4 lines 0 comments Download
M services/ui/ws/server_window_surface.h View 1 2 3 4 5 2 chunks +13 lines, -6 lines 0 comments Download
M services/ui/ws/server_window_surface.cc View 1 2 2 chunks +4 lines, -18 lines 0 comments Download
M services/ui/ws/test_server_window_delegate.h View 1 chunk +0 lines, -1 line 0 comments Download
M services/ui/ws/test_server_window_delegate.cc View 1 chunk +0 lines, -3 lines 0 comments Download
M services/ui/ws/test_utils.h View 1 chunk +0 lines, -1 line 0 comments Download
M services/ui/ws/window_server.h View 1 chunk +0 lines, -1 line 0 comments Download
M services/ui/ws/window_server.cc View 1 chunk +0 lines, -6 lines 0 comments Download

Messages

Total messages: 34 (19 generated)
Fady Samuel
4 years, 2 months ago (2016-10-06 23:44:25 UTC) #2
Fady Samuel
+rjkroege@ PTAL
4 years, 2 months ago (2016-10-07 00:22:50 UTC) #4
Fady Samuel
Ooops, please ignore this for now. There's a memory leak.
4 years, 2 months ago (2016-10-07 00:24:55 UTC) #5
Fady Samuel
PTAL Scott! Thanks
4 years, 2 months ago (2016-10-07 14:11:55 UTC) #6
sky
Looks like you still have issues (based on try output)?
4 years, 2 months ago (2016-10-07 16:28:04 UTC) #11
Fady Samuel
On 2016/10/07 16:28:04, sky wrote: > Looks like you still have issues (based on try ...
4 years, 2 months ago (2016-10-07 16:35:28 UTC) #12
sky
LGTM - but wait for Rob to review FrameGenerator as I'm not familiar with that ...
4 years, 2 months ago (2016-10-07 16:56:15 UTC) #15
rjkroege
https://codereview.chromium.org/2400723003/diff/80001/services/ui/ws/frame_generator.cc File services/ui/ws/frame_generator.cc (right): https://codereview.chromium.org/2400723003/diff/80001/services/ui/ws/frame_generator.cc#newcode257 services/ui/ws/frame_generator.cc:257: surface->AddDestructionDependency(dependency.sequence); I think that this logic could be refactored ...
4 years, 2 months ago (2016-10-07 19:34:50 UTC) #18
Fady Samuel
PTAL Rob! https://codereview.chromium.org/2400723003/diff/80001/services/ui/ws/frame_generator.cc File services/ui/ws/frame_generator.cc (right): https://codereview.chromium.org/2400723003/diff/80001/services/ui/ws/frame_generator.cc#newcode257 services/ui/ws/frame_generator.cc:257: surface->AddDestructionDependency(dependency.sequence); On 2016/10/07 19:34:50, rjkroege wrote: > ...
4 years, 2 months ago (2016-10-07 20:31:33 UTC) #21
rjkroege
Thanks for adding the comments. Very nice. Do that more please. :-) lgtm with nits. ...
4 years, 2 months ago (2016-10-07 20:48:13 UTC) #24
Fady Samuel
Thanks Rob! CQ'ing! https://codereview.chromium.org/2400723003/diff/80001/services/ui/ws/frame_generator.cc File services/ui/ws/frame_generator.cc (right): https://codereview.chromium.org/2400723003/diff/80001/services/ui/ws/frame_generator.cc#newcode257 services/ui/ws/frame_generator.cc:257: surface->AddDestructionDependency(dependency.sequence); On 2016/10/07 20:48:13, rjkroege wrote: ...
4 years, 2 months ago (2016-10-07 21:04:33 UTC) #25
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/2400723003/120001
4 years, 2 months ago (2016-10-07 21:05:29 UTC) #28
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/2400723003/140001
4 years, 2 months ago (2016-10-07 22:44:07 UTC) #31
commit-bot: I haz the power
Committed patchset #8 (id:140001)
4 years, 2 months ago (2016-10-07 23:31:06 UTC) #32
commit-bot: I haz the power
4 years, 2 months ago (2016-10-07 23:34:51 UTC) #34
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/d469420cbb2b76ae2311ecfbfbccff74422878f0
Cr-Commit-Position: refs/heads/master@{#424010}

Powered by Google App Engine
This is Rietveld 408576698