summaryrefslogtreecommitdiffstats
path: root/cc/picture_pile_impl.h
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-23 07:36:51 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-01-23 07:36:51 +0000
commit48871fc98f70938072ce94106e75b13fc3e82f42 (patch)
treeae290c35236fc39848ca63ea7e3031f8e3cb59ef /cc/picture_pile_impl.h
parent4c38c371c94de6a89bc1e1c698de477b6db9fb4c (diff)
downloadchromium_src-48871fc98f70938072ce94106e75b13fc3e82f42.zip
chromium_src-48871fc98f70938072ce94106e75b13fc3e82f42.tar.gz
chromium_src-48871fc98f70938072ce94106e75b13fc3e82f42.tar.bz2
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 Review URL: https://chromiumcodereview.appspot.com/11882037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@178267 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/picture_pile_impl.h')
-rw-r--r--cc/picture_pile_impl.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/cc/picture_pile_impl.h b/cc/picture_pile_impl.h
index 5ca526f..c5a7b41 100644
--- a/cc/picture_pile_impl.h
+++ b/cc/picture_pile_impl.h
@@ -38,6 +38,8 @@ class CC_EXPORT PicturePileImpl : public PicturePileBase {
void GatherPixelRefs(const gfx::Rect&, std::list<skia::LazyPixelRef*>&);
+ void PushPropertiesTo(PicturePileImpl* other);
+
skia::RefPtr<SkPicture> GetFlattenedPicture();
private: