Chromium Code Reviews| Index: cc/trees/property_tree.cc |
| diff --git a/cc/trees/property_tree.cc b/cc/trees/property_tree.cc |
| index b1fd5e4e7ce0ca5eaa0044fca364f527a59b6b91..ea626a074c265b1b52b286e1e98826dc911d756d 100644 |
| --- a/cc/trees/property_tree.cc |
| +++ b/cc/trees/property_tree.cc |
| @@ -61,7 +61,6 @@ bool TransformTree::ComputeTransform(int source_id, |
| int dest_id, |
| gfx::Transform* transform) const { |
| transform->MakeIdentity(); |
| - |
|
ajuma
2015/04/09 14:43:09
Nit: this whitespace should stay
jaydasika
2015/04/09 15:24:29
Done.
|
| if (source_id == dest_id) |
| return true; |
| @@ -71,15 +70,8 @@ bool TransformTree::ComputeTransform(int source_id, |
| if (dest_id > source_id && IsDescendant(dest_id, source_id)) |
| return CombineInversesBetween(source_id, dest_id, transform); |
| - int lca = LowestCommonAncestor(source_id, dest_id); |
| - |
| - bool no_singular_matrices_to_lca = |
| - CombineTransformsBetween(source_id, lca, transform); |
| - |
| - bool no_singular_matrices_from_lca = |
| - CombineInversesBetween(lca, dest_id, transform); |
| - |
| - return no_singular_matrices_to_lca && no_singular_matrices_from_lca; |
| + NOTREACHED(); |
| + return 0; |
|
ajuma
2015/04/09 14:43:09
Style nit: use 'false' instead of 0. (But this cod
jaydasika
2015/04/09 15:24:29
Done.
|
| } |
| bool TransformTree::Are2DAxisAligned(int source_id, int dest_id) const { |
| @@ -110,27 +102,6 @@ bool TransformTree::IsDescendant(int desc_id, int source_id) const { |
| return true; |
| } |
| -int TransformTree::LowestCommonAncestor(int a, int b) const { |
| - std::set<int> chain_a; |
| - std::set<int> chain_b; |
| - while (a || b) { |
| - if (a) { |
| - a = Node(a)->parent_id; |
| - if (a > -1 && chain_b.find(a) != chain_b.end()) |
| - return a; |
| - chain_a.insert(a); |
| - } |
| - if (b) { |
| - b = Node(b)->parent_id; |
| - if (b > -1 && chain_a.find(b) != chain_a.end()) |
| - return b; |
| - chain_b.insert(b); |
| - } |
| - } |
| - NOTREACHED(); |
| - return 0; |
| -} |
| - |
| bool TransformTree::CombineTransformsBetween(int source_id, |
| int dest_id, |
| gfx::Transform* transform) const { |