| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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 #ifndef CC_TREES_LAYER_TREE_HOST_COMMON_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_COMMON_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_COMMON_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_COMMON_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <limits> | 10 #include <limits> |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 | 38 |
| 39 enum CallFunctionLayerType : uint32_t { | 39 enum CallFunctionLayerType : uint32_t { |
| 40 BASIC_LAYER = 0, | 40 BASIC_LAYER = 0, |
| 41 MASK_LAYER = 1, | 41 MASK_LAYER = 1, |
| 42 REPLICA_LAYER = 2, | 42 REPLICA_LAYER = 2, |
| 43 ALL_LAYERS = MASK_LAYER | REPLICA_LAYER | 43 ALL_LAYERS = MASK_LAYER | REPLICA_LAYER |
| 44 }; | 44 }; |
| 45 | 45 |
| 46 class CC_EXPORT LayerTreeHostCommon { | 46 class CC_EXPORT LayerTreeHostCommon { |
| 47 public: | 47 public: |
| 48 static gfx::Rect CalculateVisibleRect(const gfx::Rect& target_surface_rect, | |
| 49 const gfx::Rect& layer_bound_rect, | |
| 50 const gfx::Transform& transform); | |
| 51 | |
| 52 struct CC_EXPORT CalcDrawPropsMainInputsForTesting { | 48 struct CC_EXPORT CalcDrawPropsMainInputsForTesting { |
| 53 public: | 49 public: |
| 54 CalcDrawPropsMainInputsForTesting(Layer* root_layer, | 50 CalcDrawPropsMainInputsForTesting(Layer* root_layer, |
| 55 const gfx::Size& device_viewport_size, | 51 const gfx::Size& device_viewport_size, |
| 56 const gfx::Transform& device_transform, | 52 const gfx::Transform& device_transform, |
| 57 float device_scale_factor, | 53 float device_scale_factor, |
| 58 float page_scale_factor, | 54 float page_scale_factor, |
| 59 const Layer* page_scale_layer, | 55 const Layer* page_scale_layer, |
| 60 const Layer* inner_viewport_scroll_layer, | 56 const Layer* inner_viewport_scroll_layer, |
| 61 const Layer* outer_viewport_scroll_layer); | 57 const Layer* outer_viewport_scroll_layer); |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 259 for (auto* layer : *host_impl) | 255 for (auto* layer : *host_impl) |
| 260 CallFunctionForLayer(layer, function, type); | 256 CallFunctionForLayer(layer, function, type); |
| 261 } | 257 } |
| 262 | 258 |
| 263 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer); | 259 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer); |
| 264 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer); | 260 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer); |
| 265 | 261 |
| 266 } // namespace cc | 262 } // namespace cc |
| 267 | 263 |
| 268 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ | 264 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ |
| OLD | NEW |