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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 for (auto* layer : *host_impl) | 224 for (auto* layer : *host_impl) |
229 CallFunctionForLayer(layer, function, type); | 225 CallFunctionForLayer(layer, function, type); |
230 } | 226 } |
231 | 227 |
232 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer); | 228 CC_EXPORT PropertyTrees* GetPropertyTrees(Layer* layer); |
233 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer); | 229 CC_EXPORT PropertyTrees* GetPropertyTrees(LayerImpl* layer); |
234 | 230 |
235 } // namespace cc | 231 } // namespace cc |
236 | 232 |
237 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ | 233 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ |
OLD | NEW |