| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 class CC_EXPORT LayerTreeHostCommon { | 23 class CC_EXPORT LayerTreeHostCommon { |
| 24 public: | 24 public: |
| 25 static gfx::Rect CalculateVisibleRect(gfx::Rect target_surface_rect, | 25 static gfx::Rect CalculateVisibleRect(gfx::Rect target_surface_rect, |
| 26 gfx::Rect layer_bound_rect, | 26 gfx::Rect layer_bound_rect, |
| 27 const gfx::Transform& transform); | 27 const gfx::Transform& transform); |
| 28 | 28 |
| 29 static void CalculateDrawProperties( | 29 static void CalculateDrawProperties( |
| 30 Layer* root_layer, | 30 Layer* root_layer, |
| 31 gfx::Size device_viewport_size, | 31 gfx::Size device_viewport_size, |
| 32 const gfx::Transform& device_transform, |
| 32 float device_scale_factor, | 33 float device_scale_factor, |
| 33 float page_scale_factor, | 34 float page_scale_factor, |
| 34 Layer* page_scale_application_layer, | 35 Layer* page_scale_application_layer, |
| 35 int max_texture_size, | 36 int max_texture_size, |
| 36 bool can_use_lcd_text, | 37 bool can_use_lcd_text, |
| 37 bool can_adjust_raster_scales, | 38 bool can_adjust_raster_scales, |
| 38 LayerList* render_surface_layer_list); | 39 LayerList* render_surface_layer_list); |
| 39 static void CalculateDrawProperties( | 40 static void CalculateDrawProperties( |
| 40 LayerImpl* root_layer, | 41 LayerImpl* root_layer, |
| 41 gfx::Size device_viewport_size, | 42 gfx::Size device_viewport_size, |
| 43 const gfx::Transform& device_transform, |
| 42 float device_scale_factor, | 44 float device_scale_factor, |
| 43 float page_scale_factor, | 45 float page_scale_factor, |
| 44 LayerImpl* page_scale_application_layer, | 46 LayerImpl* page_scale_application_layer, |
| 45 int max_texture_size, | 47 int max_texture_size, |
| 46 bool can_use_lcd_text, | 48 bool can_use_lcd_text, |
| 47 bool can_adjust_raster_scales, | 49 bool can_adjust_raster_scales, |
| 48 LayerImplList* render_surface_layer_list); | 50 LayerImplList* render_surface_layer_list); |
| 49 | 51 |
| 50 // Performs hit testing for a given render_surface_layer_list. | 52 // Performs hit testing for a given render_surface_layer_list. |
| 51 static LayerImpl* FindLayerThatIsHitByPoint( | 53 static LayerImpl* FindLayerThatIsHitByPoint( |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 | 149 |
| 148 for (size_t i = 0; i < root_layer->children().size(); ++i) { | 150 for (size_t i = 0; i < root_layer->children().size(); ++i) { |
| 149 CallFunctionForSubtree<Function>( | 151 CallFunctionForSubtree<Function>( |
| 150 get_child_as_raw_ptr(root_layer->children(), i)); | 152 get_child_as_raw_ptr(root_layer->children(), i)); |
| 151 } | 153 } |
| 152 } | 154 } |
| 153 | 155 |
| 154 } // namespace cc | 156 } // namespace cc |
| 155 | 157 |
| 156 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ | 158 #endif // CC_TREES_LAYER_TREE_HOST_COMMON_H_ |
| OLD | NEW |