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

Issue 666163006: Allow layers to signal that additional sequences are needed before surface destruction (Closed)

Created:
6 years, 2 months ago by jbauman
Modified:
6 years, 1 month ago
Reviewers:
danakj, jamesr, piman
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

Allow layers to signal that additional sequences are needed before surface destruction A single surface can be referenced by multiple layers in separate compositors, so we need to be able to have every layer individually signal the manager that the Surface shouldn't be released until it's done with it. When a SurfaceLayer's added to a LayerTreeHost, a new SurfaceSequence is created for that compositor and sent to the SurfaceManager for it to wait on before the Surface is destroyed. When the Surface is destroyed, that set of sequences is waited for. When the SurfaceLayer is removed from a compositor, a SwapPromise is created on that compositor that will satisfy its SurfaceSequence in the next frame (which won't reference the Surface). BUG=411118 Committed: https://crrev.com/dbccae1ab081972ddee790058d817721d94d55dd Cr-Commit-Position: refs/heads/master@{#303119}

Patch Set 1 #

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 6

Patch Set 6 : #

Patch Set 7 : #

Patch Set 8 : #

Total comments: 5

Patch Set 9 : #

Total comments: 1

Patch Set 10 : #

Total comments: 2

Patch Set 11 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+477 lines, -125 lines) Patch
M cc/BUILD.gn View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M cc/cc_tests.gyp View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M cc/layers/surface_layer.h View 1 2 3 4 5 6 7 8 9 2 chunks +21 lines, -2 lines 0 comments Download
M cc/layers/surface_layer.cc View 1 2 3 4 5 6 7 8 9 3 chunks +72 lines, -4 lines 0 comments Download
A cc/layers/surface_layer_unittest.cc View 1 2 3 4 5 6 1 chunk +206 lines, -0 lines 0 comments Download
M cc/surfaces/surface.h View 1 2 3 4 5 6 7 8 9 3 chunks +14 lines, -0 lines 0 comments Download
M cc/surfaces/surface.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +16 lines, -1 line 0 comments Download
M cc/surfaces/surface_factory.h View 1 2 3 4 5 6 1 chunk +0 lines, -2 lines 0 comments Download
M cc/surfaces/surface_factory.cc View 1 2 3 4 5 6 2 chunks +3 lines, -13 lines 0 comments Download
M cc/surfaces/surface_factory_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -6 lines 0 comments Download
M cc/surfaces/surface_manager.h View 1 2 3 4 5 6 7 8 9 4 chunks +7 lines, -8 lines 0 comments Download
M cc/surfaces/surface_manager.cc View 1 2 3 4 5 6 7 8 9 3 chunks +11 lines, -24 lines 0 comments Download
M cc/surfaces/surface_sequence.h View 1 2 3 4 5 6 7 3 chunks +12 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host.h View 1 2 3 chunks +7 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host.cc View 1 2 3 4 5 3 chunks +15 lines, -5 lines 0 comments Download
M content/browser/compositor/delegated_frame_host.cc View 1 2 3 4 5 6 7 8 9 5 chunks +40 lines, -17 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura.h View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M content/browser/renderer_host/render_widget_host_view_aura_unittest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +30 lines, -0 lines 0 comments Download
M ui/compositor/compositor.h View 1 2 2 chunks +0 lines, -5 lines 0 comments Download
M ui/compositor/compositor.cc View 1 4 chunks +1 line, -34 lines 0 comments Download
M ui/compositor/layer.h View 1 2 3 4 5 6 7 8 2 chunks +5 lines, -1 line 0 comments Download
M ui/compositor/layer.cc View 1 2 3 4 5 6 7 8 1 chunk +8 lines, -3 lines 0 comments Download

Messages

Total messages: 23 (4 generated)
jbauman
6 years, 2 months ago (2014-10-22 02:21:36 UTC) #2
jbauman
jamesr, ping
6 years, 1 month ago (2014-10-28 17:38:46 UTC) #3
jamesr
everything but cc/layers/ lgtm. I can't wrap my head around the cc/layers/ lifetime enough to ...
6 years, 1 month ago (2014-10-29 00:51:10 UTC) #4
jbauman
On 2014/10/29 00:51:10, jamesr wrote: > everything but cc/layers/ lgtm. I can't wrap my head ...
6 years, 1 month ago (2014-10-29 22:54:20 UTC) #5
jamesr
Thanks, the tests are helpful. lgtm
6 years, 1 month ago (2014-11-01 00:27:13 UTC) #6
jbauman
Also, adding piman@ for OWNERS review of content/ and ui/compositor/
6 years, 1 month ago (2014-11-03 21:50:59 UTC) #8
piman
Mostly nits. https://codereview.chromium.org/666163006/diff/80001/cc/layers/surface_holder.h File cc/layers/surface_holder.h (right): https://codereview.chromium.org/666163006/diff/80001/cc/layers/surface_holder.h#newcode41 cc/layers/surface_holder.h:41: std::set<SurfaceSequence> sequences_; nit: hash_set? Faster/less memory? Or ...
6 years, 1 month ago (2014-11-03 23:49:26 UTC) #9
danakj
https://codereview.chromium.org/666163006/diff/80001/cc/layers/surface_holder.h File cc/layers/surface_holder.h (right): https://codereview.chromium.org/666163006/diff/80001/cc/layers/surface_holder.h#newcode41 cc/layers/surface_holder.h:41: std::set<SurfaceSequence> sequences_; On 2014/11/03 23:49:26, piman (Very slow to ...
6 years, 1 month ago (2014-11-04 16:56:57 UTC) #11
piman
On Tue, Nov 4, 2014 at 8:56 AM, <danakj@chromium.org> wrote: > > https://codereview.chromium.org/666163006/diff/80001/cc/ > layers/surface_holder.h ...
6 years, 1 month ago (2014-11-04 21:11:34 UTC) #12
chromium-reviews
On Tue, Nov 4, 2014 at 4:11 PM, Antoine Labour <piman@chromium.org> wrote: > > > ...
6 years, 1 month ago (2014-11-04 21:13:43 UTC) #13
jbauman
PTAL jamesr, piman. I completely changed this because I realized there were some corner cases ...
6 years, 1 month ago (2014-11-04 23:56:47 UTC) #14
piman
LGTM for ui/compositor/ and content/, some suggestions however (safety, optimizations). https://codereview.chromium.org/666163006/diff/130001/cc/layers/surface_layer.cc File cc/layers/surface_layer.cc (right): https://codereview.chromium.org/666163006/diff/130001/cc/layers/surface_layer.cc#newcode18 ...
6 years, 1 month ago (2014-11-05 00:36:16 UTC) #15
jamesr
6 years, 1 month ago (2014-11-05 22:49:15 UTC) #16
jamesr
https://codereview.chromium.org/666163006/diff/150001/cc/surfaces/surface.h File cc/surfaces/surface.h (right): https://codereview.chromium.org/666163006/diff/150001/cc/surfaces/surface.h#newcode59 cc/surfaces/surface.h:59: std::vector<SurfaceSequence>& destruction_dependencies() { instead of exposing a ref to ...
6 years, 1 month ago (2014-11-05 22:50:03 UTC) #17
jbauman
On 2014/11/05 00:36:16, piman (Very slow to review) wrote: > LGTM for ui/compositor/ and content/, ...
6 years, 1 month ago (2014-11-06 00:45:15 UTC) #18
jamesr
cc/surfaces lgtm https://codereview.chromium.org/666163006/diff/170001/cc/surfaces/surface.cc File cc/surfaces/surface.cc (right): https://codereview.chromium.org/666163006/diff/170001/cc/surfaces/surface.cc#newcode19 cc/surfaces/surface.cc:19: SatisfyChecker(base::hash_set<SurfaceSequence>* satisfied) explicit https://codereview.chromium.org/666163006/diff/170001/cc/surfaces/surface.cc#newcode142 cc/surfaces/surface.cc:142: SatisfyChecker(sequences)), i ...
6 years, 1 month ago (2014-11-06 01:16:18 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/666163006/190001
6 years, 1 month ago (2014-11-06 22:36:06 UTC) #21
commit-bot: I haz the power
Committed patchset #11 (id:190001)
6 years, 1 month ago (2014-11-06 23:26:54 UTC) #22
commit-bot: I haz the power
6 years, 1 month ago (2014-11-06 23:28:01 UTC) #23
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/dbccae1ab081972ddee790058d817721d94d55dd
Cr-Commit-Position: refs/heads/master@{#303119}

Powered by Google App Engine
This is Rietveld 408576698