| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "cc/trees/property_tree_builder.h" | 5 #include "cc/trees/property_tree_builder.h" |
| 6 | 6 |
| 7 #include <map> | 7 #include <map> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "cc/base/math_util.h" | 10 #include "cc/base/math_util.h" |
| 11 #include "cc/layers/layer.h" | 11 #include "cc/layers/layer.h" |
| 12 #include "cc/trees/layer_tree_host.h" | 12 #include "cc/trees/layer_tree_host.h" |
| 13 #include "ui/gfx/geometry/point_f.h" | 13 #include "ui/gfx/geometry/point_f.h" |
| 14 | 14 |
| 15 namespace cc { | 15 namespace cc { |
| 16 | 16 |
| 17 class LayerTreeHost; | 17 class LayerTreeHost; |
| 18 | 18 |
| 19 namespace { | 19 namespace { |
| 20 | 20 |
| 21 struct DataForRecursion { | 21 struct DataForRecursion { |
| 22 TransformTree* transform_tree; | 22 TransformTree* transform_tree; |
| 23 ClipTree* clip_tree; | 23 ClipTree* clip_tree; |
| 24 OpacityTree* opacity_tree; | 24 OpacityTree* opacity_tree; |
| 25 Layer* transform_tree_parent; | 25 Layer* transform_tree_parent; |
| 26 Layer* transform_fixed_parent; | 26 Layer* transform_fixed_parent; |
| 27 Layer* render_target; | 27 Layer* render_target; |
| 28 int clip_tree_parent; | 28 int clip_tree_parent; |
| 29 int opacity_tree_parent; | 29 int opacity_tree_parent; |
| 30 gfx::Vector2dF offset_to_transform_tree_parent; | |
| 31 gfx::Vector2dF offset_to_transform_fixed_parent; | |
| 32 const Layer* page_scale_layer; | 30 const Layer* page_scale_layer; |
| 33 float page_scale_factor; | 31 float page_scale_factor; |
| 34 float device_scale_factor; | 32 float device_scale_factor; |
| 35 bool in_subtree_of_page_scale_application_layer; | 33 bool in_subtree_of_page_scale_application_layer; |
| 36 bool should_flatten; | 34 bool should_flatten; |
| 37 const gfx::Transform* device_transform; | 35 const gfx::Transform* device_transform; |
| 38 }; | 36 }; |
| 39 | 37 |
| 40 static Layer* GetTransformParent(const DataForRecursion& data, Layer* layer) { | 38 static Layer* GetTransformParent(const DataForRecursion& data, Layer* layer) { |
| 41 return layer->position_constraint().is_fixed_position() | 39 return layer->position_constraint().is_fixed_position() |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 data_for_recursion.device_transform = &device_transform; | 325 data_for_recursion.device_transform = &device_transform; |
| 328 | 326 |
| 329 ClipNode root_clip; | 327 ClipNode root_clip; |
| 330 root_clip.data.clip = viewport; | 328 root_clip.data.clip = viewport; |
| 331 root_clip.data.transform_id = 0; | 329 root_clip.data.transform_id = 0; |
| 332 data_for_recursion.clip_tree_parent = clip_tree->Insert(root_clip, 0); | 330 data_for_recursion.clip_tree_parent = clip_tree->Insert(root_clip, 0); |
| 333 BuildPropertyTreesInternal(root_layer, data_for_recursion); | 331 BuildPropertyTreesInternal(root_layer, data_for_recursion); |
| 334 } | 332 } |
| 335 | 333 |
| 336 } // namespace cc | 334 } // namespace cc |
| OLD | NEW |