diff options
author | trchen@chromium.org <trchen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-17 06:43:20 +0000 |
---|---|---|
committer | trchen@chromium.org <trchen@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-17 06:43:20 +0000 |
commit | 06cbc31bffba14c3ded1dfedf98fff85a86fe6e5 (patch) | |
tree | fd58bda8747c8b544601c1ee06b9b98db632f884 /mojo/examples/compositor_app | |
parent | 8eefe84004a9c199c0521bf353a88f37aba53e15 (diff) | |
download | chromium_src-06cbc31bffba14c3ded1dfedf98fff85a86fe6e5.zip chromium_src-06cbc31bffba14c3ded1dfedf98fff85a86fe6e5.tar.gz chromium_src-06cbc31bffba14c3ded1dfedf98fff85a86fe6e5.tar.bz2 |
Unifies LayerTreeHost::SetNeedsUpdateLayers and SetNeedsAnimate -- V2
[2/2] Unifies LayerTreeHost::SetNeedsUpdateLayers and SetNeedsAnimate
They basically do the same thing except that SetNeedsAnimate makes the next
commit non-cancellable. However there is really no reason why SetNeedsAnimate
need to enforce a commit even if no tiles are updated and no layer properties
changed.
SetNeedsAnimate is thus merged into SetNeedsUpdateLayers. The proper use of
it is when there are potential layout/tile changes, we can use it to defer
calculation until the next frame. A commit will be scheduled but can be
cancelled if no updates are needed after calculation.
This part of the patch changes code behavior slightly.
SingleThreadProxy::SetNeedsUpdateLayers was originally implemented as
RenderWidget::ScheduleComposite but now it is RenderWidget::ScheduleAnimation.
ThreadProxy::SetNeedsAnimate was non-cancellable but is now cancellable.
[1/2] Cleanup RenderWidget::scheduleComposite/scheduleAnimation
scheduleComposite has been renamed to ScheduleComposite as it is no longer
a part of WebWidgetClient API.
scheduleAnimation has been renamed to ScheduleAnimation. The semantics is to
schedule a composite and also (potentially) animating WebWidget.
A new WebWidgetClient API scheduleUpdate has been added, to replace the old
scheduleAnimation. The semantics is to notify the embedder that something in
the WebWidget may change in 0 seconds. (i.e. it is allowed to be called
during a redraw, in such case another redraw will be scheduled after frame
delay.
This part of the patch should not change code behavior.
BUG=316929
R=danakj,jamesr,jochen
Review URL: https://codereview.chromium.org/133263004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@245445 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'mojo/examples/compositor_app')
-rw-r--r-- | mojo/examples/compositor_app/compositor_host.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mojo/examples/compositor_app/compositor_host.cc b/mojo/examples/compositor_app/compositor_host.cc index df41fb1..21bff68 100644 --- a/mojo/examples/compositor_app/compositor_host.cc +++ b/mojo/examples/compositor_app/compositor_host.cc @@ -102,7 +102,7 @@ void CompositorHost::Animate(double frame_begin_time) { child_transform.Translate(200, 200); child_transform.Rotate(child_rotation_degrees); child_layer_->SetTransform(child_transform); - tree_->SetNeedsAnimate(); + tree_->SetNeedsUpdateLayers(); } void CompositorHost::Layout() {} |