| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_ |
| 6 #define CC_TREES_LAYER_TREE_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_IMPL_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
| 13 #include "base/values.h" | 13 #include "base/values.h" |
| 14 #include "cc/base/scoped_ptr_vector.h" | 14 #include "cc/base/scoped_ptr_vector.h" |
| 15 #include "cc/base/synced_property.h" | 15 #include "cc/base/synced_property.h" |
| 16 #include "cc/input/layer_selection_bound.h" | 16 #include "cc/input/layer_selection_bound.h" |
| 17 #include "cc/layers/layer_impl.h" | 17 #include "cc/layers/layer_impl.h" |
| 18 #include "cc/output/begin_frame_args.h" | 18 #include "cc/output/begin_frame_args.h" |
| 19 #include "cc/output/renderer.h" | 19 #include "cc/output/renderer.h" |
| 20 #include "cc/output/swap_promise.h" | 20 #include "cc/output/swap_promise.h" |
| 21 #include "cc/resources/ui_resource_client.h" | 21 #include "cc/resources/ui_resource_client.h" |
| 22 #include "cc/trees/layer_tree_host_impl.h" | 22 #include "cc/trees/layer_tree_host_impl.h" |
| 23 #include "cc/trees/property_tree.h" |
| 23 | 24 |
| 24 namespace base { | 25 namespace base { |
| 25 namespace trace_event { | 26 namespace trace_event { |
| 26 class TracedValue; | 27 class TracedValue; |
| 27 } | 28 } |
| 28 } | 29 } |
| 29 | 30 |
| 30 namespace cc { | 31 namespace cc { |
| 31 | 32 |
| 32 class ContextProvider; | 33 class ContextProvider; |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 void GetAllTilesAndPrioritiesForTracing( | 121 void GetAllTilesAndPrioritiesForTracing( |
| 121 std::map<const Tile*, TilePriority>* tile_map) const; | 122 std::map<const Tile*, TilePriority>* tile_map) const; |
| 122 void AsValueInto(base::trace_event::TracedValue* dict) const; | 123 void AsValueInto(base::trace_event::TracedValue* dict) const; |
| 123 | 124 |
| 124 // Other public methods | 125 // Other public methods |
| 125 // --------------------------------------------------------------------------- | 126 // --------------------------------------------------------------------------- |
| 126 LayerImpl* root_layer() const { return root_layer_.get(); } | 127 LayerImpl* root_layer() const { return root_layer_.get(); } |
| 127 void SetRootLayer(scoped_ptr<LayerImpl>); | 128 void SetRootLayer(scoped_ptr<LayerImpl>); |
| 128 scoped_ptr<LayerImpl> DetachLayerTree(); | 129 scoped_ptr<LayerImpl> DetachLayerTree(); |
| 129 | 130 |
| 131 void SetPropertyTrees(const PropertyTrees& property_trees) { |
| 132 property_trees_ = property_trees; |
| 133 } |
| 134 |
| 130 void PushPropertiesTo(LayerTreeImpl* tree_impl); | 135 void PushPropertiesTo(LayerTreeImpl* tree_impl); |
| 131 | 136 |
| 132 int source_frame_number() const { return source_frame_number_; } | 137 int source_frame_number() const { return source_frame_number_; } |
| 133 void set_source_frame_number(int frame_number) { | 138 void set_source_frame_number(int frame_number) { |
| 134 source_frame_number_ = frame_number; | 139 source_frame_number_ = frame_number; |
| 135 } | 140 } |
| 136 | 141 |
| 137 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; } | 142 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; } |
| 138 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { | 143 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { |
| 139 hud_layer_ = layer_impl; | 144 hud_layer_ = layer_impl; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 float max_page_scale_factor); | 356 float max_page_scale_factor); |
| 352 bool SetPageScaleFactorLimits(float min_page_scale_factor, | 357 bool SetPageScaleFactorLimits(float min_page_scale_factor, |
| 353 float max_page_scale_factor); | 358 float max_page_scale_factor); |
| 354 void DidUpdatePageScale(); | 359 void DidUpdatePageScale(); |
| 355 void HideInnerViewportScrollbarsIfNearMinimumScale(); | 360 void HideInnerViewportScrollbarsIfNearMinimumScale(); |
| 356 void PushTopControls(const float* top_controls_shown_ratio); | 361 void PushTopControls(const float* top_controls_shown_ratio); |
| 357 LayerTreeHostImpl* layer_tree_host_impl_; | 362 LayerTreeHostImpl* layer_tree_host_impl_; |
| 358 int source_frame_number_; | 363 int source_frame_number_; |
| 359 scoped_ptr<LayerImpl> root_layer_; | 364 scoped_ptr<LayerImpl> root_layer_; |
| 360 HeadsUpDisplayLayerImpl* hud_layer_; | 365 HeadsUpDisplayLayerImpl* hud_layer_; |
| 366 PropertyTrees property_trees_; |
| 361 LayerImpl* currently_scrolling_layer_; | 367 LayerImpl* currently_scrolling_layer_; |
| 362 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; | 368 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; |
| 363 SkColor background_color_; | 369 SkColor background_color_; |
| 364 bool has_transparent_background_; | 370 bool has_transparent_background_; |
| 365 | 371 |
| 366 LayerImpl* overscroll_elasticity_layer_; | 372 LayerImpl* overscroll_elasticity_layer_; |
| 367 LayerImpl* page_scale_layer_; | 373 LayerImpl* page_scale_layer_; |
| 368 LayerImpl* inner_viewport_scroll_layer_; | 374 LayerImpl* inner_viewport_scroll_layer_; |
| 369 LayerImpl* outer_viewport_scroll_layer_; | 375 LayerImpl* outer_viewport_scroll_layer_; |
| 370 | 376 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 422 | 428 |
| 423 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 429 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
| 424 | 430 |
| 425 private: | 431 private: |
| 426 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 432 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 427 }; | 433 }; |
| 428 | 434 |
| 429 } // namespace cc | 435 } // namespace cc |
| 430 | 436 |
| 431 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 437 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
| OLD | NEW |