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

Issue 553213003: Avoid destroying surface before the parent surface stops referencing it. (Closed)

Created:
6 years, 3 months ago by jbauman
Modified:
6 years, 2 months ago
Reviewers:
danakj, jamesr, Tom Sepez
CC:
chromium-reviews, Ian Vollick, jam, sievers+watch_chromium.org, jbauman+watch_chromium.org, darin-cc_chromium.org, kalyank, piman+watch_chromium.org, cc-bugs_chromium.org, danakj+watch_chromium.org, miu+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Project:
chromium
Visibility:
Public.

Description

Avoid destroying surface before the parent surface stops referencing it. Add surface sequence numbers, which are used to schedule the destruction of surfaces. The child surface's destruction can wait on a set of sequence numbers, and the parent surface can later queue a frame that satisfies those numbers, causing the former child surface to be destroyed. Also move ownership of the SurfaceIdAllocator to the ui::Compositor, so that the surface id namespace for a compositor will stay the same across all output surfaces it ever uses. BUG=411118 Committed: https://crrev.com/fdc3baa3f2ae1554292165b53189196acd7418e4 Cr-Commit-Position: refs/heads/master@{#299022}

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 15

Patch Set 6 : #

Patch Set 7 : #

Total comments: 7

Patch Set 8 : #

Patch Set 9 : #

Total comments: 8

Patch Set 10 : #

Total comments: 2

Patch Set 11 : #

Patch Set 12 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+270 lines, -31 lines) Patch
M cc/output/compositor_frame_metadata.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M cc/surfaces/surface.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -2 lines 0 comments Download
M cc/surfaces/surface.cc View 1 2 3 4 5 6 7 8 9 5 chunks +6 lines, -2 lines 0 comments Download
M cc/surfaces/surface_factory.h View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -0 lines 0 comments Download
M cc/surfaces/surface_factory.cc View 1 2 3 4 5 6 7 8 9 2 chunks +12 lines, -3 lines 0 comments Download
M cc/surfaces/surface_factory_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +27 lines, -0 lines 0 comments Download
M cc/surfaces/surface_id_allocator.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M cc/surfaces/surface_manager.h View 1 2 3 4 5 6 7 8 3 chunks +24 lines, -0 lines 0 comments Download
M cc/surfaces/surface_manager.cc View 1 2 3 4 5 6 3 chunks +52 lines, -0 lines 0 comments Download
A cc/surfaces/surface_sequence.h View 1 2 3 4 5 6 7 1 chunk +38 lines, -0 lines 0 comments Download
M content/browser/compositor/delegated_frame_host.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +15 lines, -5 lines 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/compositor/gpu_process_transport_factory.cc View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -1 line 0 comments Download
M content/browser/compositor/image_transport_factory.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M content/browser/compositor/surface_display_output_surface.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -2 lines 0 comments Download
M content/browser/compositor/surface_display_output_surface.cc View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -3 lines 0 comments Download
M content/browser/compositor/test/no_transport_image_transport_factory.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -2 lines 0 comments Download
M content/browser/compositor/test/no_transport_image_transport_factory.cc View 1 2 3 3 chunks +4 lines, -7 lines 0 comments Download
M content/common/cc_messages.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M mojo/aura/surface_context_factory.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/aura/surface_context_factory.cc View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +6 lines, -0 lines 0 comments Download
M ui/compositor/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M ui/compositor/compositor.h View 1 2 3 4 5 6 7 8 9 10 11 5 chunks +15 lines, -0 lines 0 comments Download
M ui/compositor/compositor.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +30 lines, -0 lines 0 comments Download
M ui/compositor/compositor.gyp View 1 2 3 4 5 6 7 8 9 2 chunks +2 lines, -0 lines 0 comments Download
M ui/compositor/test/in_process_context_factory.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +3 lines, -0 lines 0 comments Download
M ui/compositor/test/in_process_context_factory.cc View 1 2 3 4 5 6 7 3 chunks +9 lines, -1 line 0 comments Download

Messages

Total messages: 31 (3 generated)
jbauman
6 years, 3 months ago (2014-09-11 23:54:27 UTC) #2
jamesr
Awesome! The cc/ parts lgtm, I want to take a closer look at the rest ...
6 years, 3 months ago (2014-09-12 01:08:56 UTC) #3
jbauman
PTAL. https://codereview.chromium.org/553213003/diff/80001/cc/output/compositor_frame_metadata.h File cc/output/compositor_frame_metadata.h (right): https://codereview.chromium.org/553213003/diff/80001/cc/output/compositor_frame_metadata.h#newcode52 cc/output/compositor_frame_metadata.h:52: std::vector<uint32_t> satisfies_sequence; On 2014/09/12 01:08:55, jamesr wrote: > ...
6 years, 3 months ago (2014-09-23 01:58:06 UTC) #4
jamesr
Sorry, I keep reading through this and getting lost somewhere. The cc/ parts are fine, ...
6 years, 3 months ago (2014-09-24 04:51:01 UTC) #5
jbauman
On 2014/09/24 04:51:01, jamesr wrote: > Sorry, I keep reading through this and getting lost ...
6 years, 3 months ago (2014-09-24 19:13:12 UTC) #6
jamesr
OK, that makes perfect sense. Could you please add that to the patch description? lgtm ...
6 years, 2 months ago (2014-09-25 23:23:47 UTC) #7
jbauman
danakj: ui/compositor OWNERS review tsepez: content/common/cc_messages.h OWNERS review
6 years, 2 months ago (2014-09-25 23:32:50 UTC) #9
Tom Sepez
Messages LGTM.
6 years, 2 months ago (2014-09-25 23:46:53 UTC) #10
jbauman
danakj, ping
6 years, 2 months ago (2014-10-02 00:11:17 UTC) #11
danakj
https://codereview.chromium.org/553213003/diff/160001/content/browser/compositor/delegated_frame_host.cc File content/browser/compositor/delegated_frame_host.cc (right): https://codereview.chromium.org/553213003/diff/160001/content/browser/compositor/delegated_frame_host.cc#newcode386 content/browser/compositor/delegated_frame_host.cc:386: surface_factory_->DestroyOnSequence(surface_id_, seq); Can you help me understand what's going ...
6 years, 2 months ago (2014-10-02 01:53:46 UTC) #12
danakj
One more Q: Why is this special to ui/compositor. Why don't android browser and renderer ...
6 years, 2 months ago (2014-10-02 16:21:35 UTC) #13
jbauman
On 2014/10/02 01:53:46, danakj wrote: > https://codereview.chromium.org/553213003/diff/160001/content/browser/compositor/delegated_frame_host.cc > File content/browser/compositor/delegated_frame_host.cc (right): > > https://codereview.chromium.org/553213003/diff/160001/content/browser/compositor/delegated_frame_host.cc#newcode386 > ...
6 years, 2 months ago (2014-10-03 20:33:50 UTC) #14
jbauman
On 2014/10/02 16:21:35, danakj wrote: > One more Q: Why is this special to ui/compositor. ...
6 years, 2 months ago (2014-10-03 20:36:41 UTC) #15
danakj
https://codereview.chromium.org/553213003/diff/160001/content/browser/compositor/delegated_frame_host.cc File content/browser/compositor/delegated_frame_host.cc (right): https://codereview.chromium.org/553213003/diff/160001/content/browser/compositor/delegated_frame_host.cc#newcode385 content/browser/compositor/delegated_frame_host.cc:385: seq.insert(compositor->CreateSurfaceSequence()); What step (in that 1-10 steps) in your ...
6 years, 2 months ago (2014-10-07 20:08:26 UTC) #16
jbauman
On 2014/10/07 20:08:26, danakj wrote: > https://codereview.chromium.org/553213003/diff/160001/content/browser/compositor/delegated_frame_host.cc > File content/browser/compositor/delegated_frame_host.cc (right): > > https://codereview.chromium.org/553213003/diff/160001/content/browser/compositor/delegated_frame_host.cc#newcode385 > ...
6 years, 2 months ago (2014-10-07 20:15:25 UTC) #17
danakj
https://codereview.chromium.org/553213003/diff/160001/content/browser/compositor/delegated_frame_host.cc File content/browser/compositor/delegated_frame_host.cc (right): https://codereview.chromium.org/553213003/diff/160001/content/browser/compositor/delegated_frame_host.cc#newcode375 content/browser/compositor/delegated_frame_host.cc:375: id_allocator_ = You said "Also move ownership of the ...
6 years, 2 months ago (2014-10-07 20:33:19 UTC) #18
jbauman
On 2014/10/07 20:33:19, danakj wrote: > https://codereview.chromium.org/553213003/diff/160001/content/browser/compositor/delegated_frame_host.cc > File content/browser/compositor/delegated_frame_host.cc (right): > > https://codereview.chromium.org/553213003/diff/160001/content/browser/compositor/delegated_frame_host.cc#newcode375 > ...
6 years, 2 months ago (2014-10-07 21:08:04 UTC) #19
danakj
On 2014/10/07 21:08:04, jbauman wrote: > On 2014/10/07 20:33:19, danakj wrote: > > > https://codereview.chromium.org/553213003/diff/160001/content/browser/compositor/delegated_frame_host.cc ...
6 years, 2 months ago (2014-10-08 21:51:21 UTC) #20
jbauman
On Wed, Oct 8, 2014 at 2:51 PM, <danakj@chromium.org> wrote: > On 2014/10/07 21:08:04, jbauman ...
6 years, 2 months ago (2014-10-08 23:41:57 UTC) #21
danakj
On Wed, Oct 8, 2014 at 7:41 PM, John Bauman <jbauman@chromium.org> wrote: > > > ...
6 years, 2 months ago (2014-10-09 00:19:02 UTC) #22
danakj
On 2014/10/09 00:19:02, danakj wrote: > On Wed, Oct 8, 2014 at 7:41 PM, John ...
6 years, 2 months ago (2014-10-09 00:23:53 UTC) #23
jbauman
That's in SurfaceDisplayOutputSurface::SwapBuffers; this patch modifies it, but it's been checked in for a while. ...
6 years, 2 months ago (2014-10-09 00:43:06 UTC) #24
jbauman
On Wed, Oct 8, 2014 at 5:23 PM, <danakj@chromium.org> wrote: > On 2014/10/09 00:19:02, danakj ...
6 years, 2 months ago (2014-10-09 00:48:28 UTC) #25
jbauman
PTAL. Added a few more comments and renamed CreateSurfaceSequence
6 years, 2 months ago (2014-10-09 02:10:28 UTC) #26
danakj
I see, so the allocator used to live on the output surface, and moved from ...
6 years, 2 months ago (2014-10-09 17:47:38 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/553213003/390001
6 years, 2 months ago (2014-10-09 23:50:36 UTC) #29
commit-bot: I haz the power
Committed patchset #12 (id:390001)
6 years, 2 months ago (2014-10-10 00:22:26 UTC) #30
commit-bot: I haz the power
6 years, 2 months ago (2014-10-10 00:23:52 UTC) #31
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/fdc3baa3f2ae1554292165b53189196acd7418e4
Cr-Commit-Position: refs/heads/master@{#299022}

Powered by Google App Engine
This is Rietveld 408576698