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

Issue 11882037: Activate LayerImpl tree with sync+push instead of pointer swap (Closed)

Created:
7 years, 11 months ago by jamesr
Modified:
7 years, 11 months ago
CC:
chromium-reviews, cc-bugs_chromium.org, brianderson_google, reveman
Visibility:
Public.

Description

Activate LayerImpl tree with sync+push instead of pointer swap This changes the activation model to do a push + sync from the pending -> active tree instead of just doing a pointer swap. This fixes behavior for video and scrollbar animations and allows for recycling of the LayerImpl tree from commit to commit. There are several changes: *) The tree synchronization code is templatized to support Layer->LayerImpl and LayerImpl->LayerImpl tree syncs. All LayerImpl subclasses now support a createLayerImpl() call to construct a LayerImpl of matching dynamic type and a LayerImpl::pushPropertiesTo(LayerImpl*) to sync properties. The structural syncing stuff is identical to the existing Layer->LayerImpl sync *) Video layer's provider flow is tweaked. Instead of the VideoLayerImpl being the VideoFrameProvider::Client, a new object VideoFrameProviderClientImpl is. This is constructed initially on the pending tree and associated with the VideoFrameProvider during initial commit (since that happens with the main thread blocked). A reference to this object is passed to the active tree, which then registers itself for setNeedsRedraw notifications when it becomes active. On shutdown, the pending layer's destructor (which always happens first) unhooks the VFPCI from the VideoFrameProvider. This step has to happen during the pending tree commit, not activation, since it has to happen on the impl thread with the main thread blocked. The active VideoLayerImpl can then proceed with a VFPCI that isn't wired up to a VFP until the pending tree is activated, at which point it tears down the VFPCI as well. *) Scrollbar layer IDs are hooked up on the impl thread as well so we can set up the pointers during LayerImpl->LayerImpl tree syncs *) Picture layer syncing is largely unchanged, except that there's new code to do a PictureLayerImpl -> PictureLayerImpl sync. This step simply replaces the active layer's pile and tilings with the pending tree's. BUG=169143 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=178267

Patch Set 1 #

Patch Set 2 : passes cc_unittests #

Patch Set 3 : passes cc_unittests #

Patch Set 4 : start of video #

Patch Set 5 : passes lost context cc_unittests #

Patch Set 6 : rebased on top of https://codereview.chromium.org/11931033/, scrollbars appear to work #

Patch Set 7 : rebased #

Patch Set 8 : works #

Patch Set 9 : #

Patch Set 10 : #

Total comments: 19

Patch Set 11 : solidcolorlayerimpl / delegatingrendererlayerimpl overrides, videlayerimpl thread checks, review fe… #

Patch Set 12 : fix root scroll layer / bounds determinations so pinch and scroll work #

Patch Set 13 : fix PicturePileImpl::tilings_ lifetime and client ptr #

Patch Set 14 : rebase, sync contents purged bit #

Patch Set 15 : rebase and resolve conflicts #

Patch Set 16 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+687 lines, -170 lines) Patch
M cc/cc.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M cc/delegated_renderer_layer_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +2 lines, -0 lines 0 comments Download
M cc/delegated_renderer_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +5 lines, -0 lines 0 comments Download
M cc/heads_up_display_layer_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -0 lines 0 comments Download
M cc/heads_up_display_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +16 lines, -0 lines 0 comments Download
M cc/io_surface_layer_impl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M cc/io_surface_layer_impl.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M cc/layer.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +4 lines, -2 lines 0 comments Download
M cc/layer.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
M cc/layer_impl.h View 1 2 3 4 5 6 7 5 chunks +12 lines, -7 lines 0 comments Download
M cc/layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +79 lines, -2 lines 0 comments Download
M cc/layer_tree_host_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +10 lines, -1 line 0 comments Download
M cc/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 7 chunks +29 lines, -10 lines 0 comments Download
M cc/layer_tree_host_impl_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -1 line 0 comments Download
M cc/layer_tree_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +4 lines, -0 lines 0 comments Download
M cc/layer_tree_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -0 lines 0 comments Download
M cc/nine_patch_layer_impl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M cc/nine_patch_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +17 lines, -0 lines 0 comments Download
M cc/picture_layer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M cc/picture_layer_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +7 lines, -1 line 0 comments Download
M cc/picture_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 chunks +56 lines, -25 lines 0 comments Download
M cc/picture_layer_tiling_set.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +3 lines, -2 lines 0 comments Download
M cc/picture_layer_tiling_set.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +6 lines, -0 lines 0 comments Download
M cc/picture_pile.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M cc/picture_pile_impl.h View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download
M cc/picture_pile_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M cc/scrollbar_animation_controller.h View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M cc/scrollbar_layer_impl.h View 1 2 3 4 5 6 7 4 chunks +9 lines, -1 line 0 comments Download
M cc/scrollbar_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +27 lines, -0 lines 0 comments Download
M cc/solid_color_layer_impl.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -0 lines 0 comments Download
M cc/solid_color_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
M cc/texture_layer_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +3 lines, -0 lines 0 comments Download
M cc/texture_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +23 lines, -0 lines 0 comments Download
M cc/tiled_layer_impl.h View 1 chunk +3 lines, -0 lines 0 comments Download
M cc/tiled_layer_impl.cc View 1 chunk +23 lines, -0 lines 0 comments Download
M cc/tree_synchronizer.h View 1 chunk +3 lines, -10 lines 0 comments Download
M cc/tree_synchronizer.cc View 1 2 3 4 5 6 7 7 chunks +79 lines, -33 lines 0 comments Download
M cc/tree_synchronizer_unittest.cc View 1 chunk +1 line, -1 line 0 comments Download
A cc/video_frame_provider_client_impl.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +62 lines, -0 lines 0 comments Download
A cc/video_frame_provider_client_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +87 lines, -0 lines 0 comments Download
M cc/video_layer_impl.h View 1 2 3 4 5 6 7 3 chunks +11 lines, -18 lines 0 comments Download
M cc/video_layer_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 11 chunks +50 lines, -54 lines 0 comments Download

Messages

Total messages: 22 (0 generated)
jamesr
enne@ - please review piman@ - please check the texture mailbox stuff (and anything else ...
7 years, 11 months ago (2013-01-17 22:42:18 UTC) #1
piman
On 2013/01/17 22:42:18, jamesr wrote: > enne@ - please review > piman@ - please check ...
7 years, 11 months ago (2013-01-17 23:27:12 UTC) #2
enne (OOO)
DelegatedRendererLayerImpl and SolidColorLayerImpl don't seem to need pushPropertiesTo, but surely they need createLayerImpl overrides? https://codereview.chromium.org/11882037/diff/15003/cc/layer.h ...
7 years, 11 months ago (2013-01-17 23:34:54 UTC) #3
danakj
I likey the video stuff. https://codereview.chromium.org/11882037/diff/15003/cc/video_frame_provider_client_impl.cc File cc/video_frame_provider_client_impl.cc (right): https://codereview.chromium.org/11882037/diff/15003/cc/video_frame_provider_client_impl.cc#newcode43 cc/video_frame_provider_client_impl.cc:43: provider_->SetVideoFrameProviderClient(0); nit: s/0/NULL/. also ...
7 years, 11 months ago (2013-01-18 00:06:13 UTC) #4
jamesr
New patch incoming with SolidColorLayerImpl / Delegating... - missed those since they don't have pushPropertiesTo() ...
7 years, 11 months ago (2013-01-18 01:16:42 UTC) #5
enne (OOO)
https://codereview.chromium.org/11882037/diff/15003/cc/layer.h File cc/layer.h (right): https://codereview.chromium.org/11882037/diff/15003/cc/layer.h#newcode70 cc/layer.h:70: Layer* childAt(size_t index) const; On 2013/01/18 01:16:42, jamesr wrote: ...
7 years, 11 months ago (2013-01-18 01:21:35 UTC) #6
jamesr
https://codereview.chromium.org/11882037/diff/15003/cc/layer.h File cc/layer.h (right): https://codereview.chromium.org/11882037/diff/15003/cc/layer.h#newcode70 cc/layer.h:70: Layer* childAt(size_t index) const; On 2013/01/18 01:21:35, enne wrote: ...
7 years, 11 months ago (2013-01-18 01:27:14 UTC) #7
klobag.chromium
FYI, while applying this CL locally to Chrome for Android, I saw the screen freeze ...
7 years, 11 months ago (2013-01-18 09:23:33 UTC) #8
jamesr
I think I've got everything working now, but will land a few cleanups first to ...
7 years, 11 months ago (2013-01-18 21:43:36 UTC) #9
jamesr
On 2013/01/18 09:23:33, klobag.chromium wrote: > FYI, while applying this CL locally to Chrome for ...
7 years, 11 months ago (2013-01-18 21:46:48 UTC) #10
jamesr
Looks like after switching tabs we get stuck in a state where we constantly think ...
7 years, 11 months ago (2013-01-21 20:49:47 UTC) #11
jamesr
On 2013/01/21 20:49:47, jamesr wrote: > Looks like after switching tabs we get stuck in ...
7 years, 11 months ago (2013-01-21 21:35:58 UTC) #12
jamesr
Latest version fixes the tab switch hang, at least for me. I can't test against ...
7 years, 11 months ago (2013-01-22 00:42:23 UTC) #13
enne (OOO)
lgtm
7 years, 11 months ago (2013-01-22 21:03:38 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/11882037/32001
7 years, 11 months ago (2013-01-22 21:09:35 UTC) #15
commit-bot: I haz the power
Failed to apply patch for cc/picture_layer_impl.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 11 months ago (2013-01-22 23:54:32 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/11882037/39002
7 years, 11 months ago (2013-01-23 00:11:04 UTC) #17
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) browser_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_rel&number=91639
7 years, 11 months ago (2013-01-23 02:52:17 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/11882037/39002
7 years, 11 months ago (2013-01-23 04:14:23 UTC) #19
commit-bot: I haz the power
Failed to apply patch for cc/delegated_renderer_layer_impl.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years, 11 months ago (2013-01-23 04:14:32 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/11882037/38004
7 years, 11 months ago (2013-01-23 04:41:00 UTC) #21
commit-bot: I haz the power
7 years, 11 months ago (2013-01-23 07:36:56 UTC) #22
Message was sent while issue was closed.
Change committed as 178267

Powered by Google App Engine
This is Rietveld 408576698