DescriptionUnifies LayerTreeHost::SetNeedsUpdateLayers and SetNeedsAnimate
[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,piman
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=240008
Patch Set 1 #Patch Set 2 : okay let's call it SetNeedsUpdateLayers #
Total comments: 2
Patch Set 3 : fixed cc animation unittest #
Total comments: 10
Patch Set 4 : revise as recommended #Patch Set 5 : rebased & revised #Patch Set 6 : fix bug #Patch Set 7 : rebased #Patch Set 8 : should use is_accelerated_compositing_active_ instead of compositor_ #Patch Set 9 : rebase #Patch Set 10 : fix forced redraw breakage #
Messages
Total messages: 45 (0 generated)
|