Do not notify ui::LayerDelegate during a threaded animation

Desktop / Chromium - Francois Doray [chromium.org] - 6 November 2017 23:18 EST

Currently, ui::LayerDelegate::On(LayerTransformed|LayerOpacityChanged) are called every time the transform/opacity of a cc::Layer is committed during a threaded animation. These calls are not very useful since they happen after a frame has been rendered with the new values and they are not guaranteed to happen at every step of the animation.

With this CL, ui::LayerDelegate::On(LayerTransformed|LayerOpacityChanged) are called only at the end of a threaded animation.

TBR=junov@chromium.org

Bug: 738387 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: Ib0419e505028ce85edda3c402c8f193e909a6fea Reviewed-on: https://chromium-review.googlesource.com/751286 Commit-Queue: Fran├žois Doray

4b50f620cd64 Do not notify ui::LayerDelegate during a threaded animation.
cc/layers/layer.cc | 23 +-----
cc/layers/layer.h | 8 --
cc/layers/layer_client.h | 6 --
cc/layers/layer_unittest.cc | 47 -----------
cc/test/mock_layer_client.h | 2 -
cc/trees/layer_tree_host_unittest_animation.cc | 74 -----------------
.../Source/platform/graphics/GraphicsLayer.h | 2 -
ui/compositor/layer.cc | 18 ++---
ui/compositor/layer.h | 2 -
ui/compositor/layer_unittest.cc | 92 ++++++----------------
10 files changed, 36 insertions(+), 238 deletions(-)

Upstream: git.chromium.org


  • Share