Target space transform is different from animation scale. It actually has two indices: transform_id and effect_id (target_id), we might end up with a collection of hash maps as the cache.
We also need performance track on this change.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6328bc770c974f2a5e097108bd968dff1b70205e commit 6328bc770c974f2a5e097108bd968dff1b70205e Author: sunxd <sunxd@chromium.org> Date: Thu Jul 07 18:33:34 2016 cc: transform tree UpdateSnapping before UpdateTargetSpaceTransform We are moving target space transforms from transform tree to property tree cached data and are going to compute the transforms on demand. As a result, instead of applying scroll snapping to target space transforms after we compute each transforms, we can apply it to node's to_parent transforms before computing. This CL should not have any effect on behavior and performance. BUG= 624120 CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review-Url: https://codereview.chromium.org/2122193002 Cr-Commit-Position: refs/heads/master@{#404186} [modify] https://crrev.com/6328bc770c974f2a5e097108bd968dff1b70205e/cc/trees/property_tree.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd commit 47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd Author: sunxd <sunxd@chromium.org> Date: Mon Jul 25 15:34:10 2016 cc: Compute target space transform dynamically This CL adds another code path of computing target space transforms. The old code path is still in use as we have no idea what performance impact would be. The new logic is to compute the transforms on demand and cached all the intermediate results. It is hidden behind the flag verify_transform_tree _calculation. The flag is enabled in unit tests to verify the correct- ness of the new logic. BUG= 624120 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_blink_rel Review-Url: https://codereview.chromium.org/2166043002 Cr-Commit-Position: refs/heads/master@{#407480} [modify] https://crrev.com/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd/cc/layers/layer.cc [modify] https://crrev.com/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd/cc/layers/layer.h [modify] https://crrev.com/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd/cc/layers/layer_impl.cc [modify] https://crrev.com/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd/cc/layers/layer_impl.h [modify] https://crrev.com/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd/cc/proto/property_tree.proto [modify] https://crrev.com/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd/cc/test/fake_layer_tree_host.cc [modify] https://crrev.com/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd/cc/test/layer_tree_host_common_test.cc [modify] https://crrev.com/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd/cc/test/layer_tree_host_common_test.h [modify] https://crrev.com/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd/cc/test/test_layer_tree_host_base.cc [modify] https://crrev.com/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd/cc/trees/draw_property_utils.cc [modify] https://crrev.com/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd/cc/trees/layer_tree_host_common_unittest.cc [modify] https://crrev.com/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd/cc/trees/property_tree.cc [modify] https://crrev.com/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd/cc/trees/property_tree.h [modify] https://crrev.com/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd/cc/trees/property_tree_builder.cc [modify] https://crrev.com/47c2a0e34fcc0c430dc8d3a75daf44061c4e19fd/cc/trees/property_tree_unittest.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/371b0a33409ef84a0d50276839bdb3fe35ac20ee commit 371b0a33409ef84a0d50276839bdb3fe35ac20ee Author: sunxd <sunxd@chromium.org> Date: Fri Aug 05 17:24:33 2016 cc: Compute draw transforms correctly when non root surfaces disabled If non root surfaces are disabled, we do not clean the target ids of transform nodes. It does not make sense to treat transforms from the node to its target as draw transforms in this case. This CL on one hand makes DrawTransform combine the transforms between node to its true render target, on the other hand forces the property tree to return screen space transforms as draw transforms if non root surfaces are disabled. BUG= 624120 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Review-Url: https://codereview.chromium.org/2211113002 Cr-Commit-Position: refs/heads/master@{#410090} [modify] https://crrev.com/371b0a33409ef84a0d50276839bdb3fe35ac20ee/cc/trees/draw_property_utils.cc [modify] https://crrev.com/371b0a33409ef84a0d50276839bdb3fe35ac20ee/cc/trees/property_tree.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/1449b69d9135cfe3223b171f09677434e23906c3 commit 1449b69d9135cfe3223b171f09677434e23906c3 Author: sunxd <sunxd@chromium.org> Date: Wed Oct 19 17:30:52 2016 cc: Compute draw transforms dynamically. This makes cc stop pre-computing all target space transforms and only compute and cache transforms on demand. The intermediate results will be cached in cc::PropertyTreesCachedData. The cache is invalidated every frame. The following steps are removing transform tree cached data and stoping adding transform nodes for render surfaces. BUG= 624120 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Review-Url: https://chromiumcodereview.appspot.com/2266223002 Cr-Commit-Position: refs/heads/master@{#426235} [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/layers/layer_impl_unittest.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/layers/picture_layer_impl_unittest.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/layers/scrollbar_layer_unittest.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/layers/texture_layer_unittest.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/output/bsp_tree_perftest.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/proto/property_tree.proto [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/test/fake_layer_tree_host.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/test/layer_tree_settings_for_testing.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/test/layer_tree_test.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/test/test_layer_tree_host_base.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/tiles/tile_manager_unittest.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/trees/layer_tree_host_common.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/trees/layer_tree_host_common.h [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/trees/layer_tree_host_common_perftest.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/trees/layer_tree_host_common_unittest.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/trees/layer_tree_host_impl_unittest.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/trees/layer_tree_impl.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/trees/layer_tree_settings.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/trees/layer_tree_settings.h [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/trees/property_tree.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/trees/property_tree.h [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/trees/property_tree_builder.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/cc/trees/property_tree_unittest.cc [modify] https://crrev.com/1449b69d9135cfe3223b171f09677434e23906c3/third_party/WebKit/Source/platform/graphics/compositing/PaintArtifactCompositor.cpp
Comment 1 by sunxd@chromium.org
, Jun 28 2016