| 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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 void GetAllTilesAndPrioritiesForTracing( | 123 void GetAllTilesAndPrioritiesForTracing( |
| 123 std::map<const Tile*, TilePriority>* tile_map) const; | 124 std::map<const Tile*, TilePriority>* tile_map) const; |
| 124 void AsValueInto(base::trace_event::TracedValue* dict) const; | 125 void AsValueInto(base::trace_event::TracedValue* dict) const; |
| 125 | 126 |
| 126 // Other public methods | 127 // Other public methods |
| 127 // --------------------------------------------------------------------------- | 128 // --------------------------------------------------------------------------- |
| 128 LayerImpl* root_layer() const { return root_layer_.get(); } | 129 LayerImpl* root_layer() const { return root_layer_.get(); } |
| 129 void SetRootLayer(scoped_ptr<LayerImpl>); | 130 void SetRootLayer(scoped_ptr<LayerImpl>); |
| 130 scoped_ptr<LayerImpl> DetachLayerTree(); | 131 scoped_ptr<LayerImpl> DetachLayerTree(); |
| 131 | 132 |
| 133 void SetPropertyTrees(const PropertyTrees& property_trees) { |
| 134 property_trees_ = property_trees; |
| 135 } |
| 136 |
| 132 void PushPropertiesTo(LayerTreeImpl* tree_impl); | 137 void PushPropertiesTo(LayerTreeImpl* tree_impl); |
| 133 | 138 |
| 134 int source_frame_number() const { return source_frame_number_; } | 139 int source_frame_number() const { return source_frame_number_; } |
| 135 void set_source_frame_number(int frame_number) { | 140 void set_source_frame_number(int frame_number) { |
| 136 source_frame_number_ = frame_number; | 141 source_frame_number_ = frame_number; |
| 137 } | 142 } |
| 138 | 143 |
| 139 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; } | 144 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; } |
| 140 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { | 145 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { |
| 141 hud_layer_ = layer_impl; | 146 hud_layer_ = layer_impl; |
| (...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 353 float max_page_scale_factor); | 358 float max_page_scale_factor); |
| 354 bool SetPageScaleFactorLimits(float min_page_scale_factor, | 359 bool SetPageScaleFactorLimits(float min_page_scale_factor, |
| 355 float max_page_scale_factor); | 360 float max_page_scale_factor); |
| 356 void DidUpdatePageScale(); | 361 void DidUpdatePageScale(); |
| 357 void HideInnerViewportScrollbarsIfNearMinimumScale(); | 362 void HideInnerViewportScrollbarsIfNearMinimumScale(); |
| 358 void PushTopControls(const float* top_controls_shown_ratio); | 363 void PushTopControls(const float* top_controls_shown_ratio); |
| 359 LayerTreeHostImpl* layer_tree_host_impl_; | 364 LayerTreeHostImpl* layer_tree_host_impl_; |
| 360 int source_frame_number_; | 365 int source_frame_number_; |
| 361 scoped_ptr<LayerImpl> root_layer_; | 366 scoped_ptr<LayerImpl> root_layer_; |
| 362 HeadsUpDisplayLayerImpl* hud_layer_; | 367 HeadsUpDisplayLayerImpl* hud_layer_; |
| 368 PropertyTrees property_trees_; |
| 363 LayerImpl* currently_scrolling_layer_; | 369 LayerImpl* currently_scrolling_layer_; |
| 364 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; | 370 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; |
| 365 SkColor background_color_; | 371 SkColor background_color_; |
| 366 bool has_transparent_background_; | 372 bool has_transparent_background_; |
| 367 | 373 |
| 368 LayerImpl* overscroll_elasticity_layer_; | 374 LayerImpl* overscroll_elasticity_layer_; |
| 369 LayerImpl* page_scale_layer_; | 375 LayerImpl* page_scale_layer_; |
| 370 LayerImpl* inner_viewport_scroll_layer_; | 376 LayerImpl* inner_viewport_scroll_layer_; |
| 371 LayerImpl* outer_viewport_scroll_layer_; | 377 LayerImpl* outer_viewport_scroll_layer_; |
| 372 | 378 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 424 | 430 |
| 425 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 431 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
| 426 | 432 |
| 427 private: | 433 private: |
| 428 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 434 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 429 }; | 435 }; |
| 430 | 436 |
| 431 } // namespace cc | 437 } // namespace cc |
| 432 | 438 |
| 433 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 439 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
| OLD | NEW |