cc: Fix draw transforms for descendants of fixed-position layers
commit737b270e40d79ed8de0c39fa01b2f48983f1fa0e
authorajuma <ajuma@chromium.org>
Wed, 6 May 2015 01:18:37 +0000 (5 18:18 -0700)
committerCommit bot <commit-bot@chromium.org>
Wed, 6 May 2015 01:19:09 +0000 (6 01:19 +0000)
tree457d27f6f4ff3bafc1540ffd43ab1ef381beddc9
parent3e542cfee8ade72348ad3170b14e7f4e04e83b2c
cc: Fix draw transforms for descendants of fixed-position layers

A fixed-position layer's transform tree parent may be an ancestor
of the layer's render target's transform tree node, since layers
on the path from the fixed-position layer to its containing layer
may own render surfaces. DrawTransformFromPropertyTreesInternal
currently works around this by accounting for the transform
between the render target and the transform tree parent's render
target when computing the draw transform of fixed-position layers.
However, that workaround doesn't handle the descendants of
fixed-position layers.

This CL removes that workaround altogether, and instead always
creates nodes for fixed-position layers. The target_id for
these nodes is the id of the fixed-position layer's actual
render target's transform node. Since (as explained above) this
node may not be an ancestor of the fixed-position layer's
transform node, this CL also weakens the restriction on the
inputs to TransformTree::ComputeTransform.

BUG=484223

Review URL: https://codereview.chromium.org/1128453002

Cr-Commit-Position: refs/heads/master@{#328459}
cc/trees/draw_property_utils.cc
cc/trees/layer_tree_host_common_unittest.cc
cc/trees/property_tree.cc
cc/trees/property_tree.h
cc/trees/property_tree_builder.cc
cc/trees/property_tree_unittest.cc