cc: Make DamageTracker use the effect tree and layer list

Desktop / Chromium - ajuma [chromium.org] - 18 April 2017 15:53 EDT

This makes DamageTracker use the effect tree and layer list rather than traversing the render surface layer list.

The ordering requirements that we need to maintain are: 1) Each render surface's damage must be computed before its target's damage can be computed. 2) When accumulating the damage for a render surface, contributing layers and surfaces must be visited in draw order, since a contributing surface with a background filter expands damage from contributors behind it (before it in draw order) but not from contributors after it.

We do this by visiting the top-level layer list in draw order, adding the damage for each layer to its target's accumulated damage. Whenever all of a surface's contributors have been visited (this can be determined using the effect tree and each layer's effect tree index), the surface's damage is computed and then added to its own target's accumulated damage.

BUG=611883 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2814273003 Cr-Commit-Position: refs/heads/master@{#465339}

9c92fa0 cc: Make DamageTracker use the effect tree and layer list
cc/layers/effect_tree_layer_list_iterator.cc | 19 +--
cc/trees/damage_tracker.cc | 197 ++++++++++++++++-----------
cc/trees/damage_tracker.h | 30 ++--
cc/trees/damage_tracker_unittest.cc | 73 +++-------
cc/trees/layer_tree_host_impl.cc | 28 +---
cc/trees/layer_tree_host_impl.h | 3 -
cc/trees/property_tree.cc | 14 ++
cc/trees/property_tree.h | 5 +
8 files changed, 173 insertions(+), 196 deletions(-)

Upstream: git.chromium.org


  • Share