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> |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 LayerTreeHostImpl* layer_tree_host_impl, | 63 LayerTreeHostImpl* layer_tree_host_impl, |
64 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor, | 64 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor, |
65 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll) { | 65 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll) { |
66 return make_scoped_ptr(new LayerTreeImpl( | 66 return make_scoped_ptr(new LayerTreeImpl( |
67 layer_tree_host_impl, page_scale_factor, elastic_overscroll)); | 67 layer_tree_host_impl, page_scale_factor, elastic_overscroll)); |
68 } | 68 } |
69 virtual ~LayerTreeImpl(); | 69 virtual ~LayerTreeImpl(); |
70 | 70 |
71 void Shutdown(); | 71 void Shutdown(); |
72 void ReleaseResources(); | 72 void ReleaseResources(); |
| 73 void RecreateResources(); |
73 | 74 |
74 // Methods called by the layer tree that pass-through or access LTHI. | 75 // Methods called by the layer tree that pass-through or access LTHI. |
75 // --------------------------------------------------------------------------- | 76 // --------------------------------------------------------------------------- |
76 const LayerTreeSettings& settings() const; | 77 const LayerTreeSettings& settings() const; |
77 const RendererCapabilitiesImpl& GetRendererCapabilities() const; | 78 const RendererCapabilitiesImpl& GetRendererCapabilities() const; |
78 ContextProvider* context_provider() const; | 79 ContextProvider* context_provider() const; |
79 OutputSurface* output_surface() const; | 80 OutputSurface* output_surface() const; |
80 ResourceProvider* resource_provider() const; | 81 ResourceProvider* resource_provider() const; |
81 TileManager* tile_manager() const; | 82 TileManager* tile_manager() const; |
82 FrameRateCounter* frame_rate_counter() const; | 83 FrameRateCounter* frame_rate_counter() const; |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 | 336 |
336 void SetPendingPageScaleAnimation( | 337 void SetPendingPageScaleAnimation( |
337 scoped_ptr<PendingPageScaleAnimation> pending_animation); | 338 scoped_ptr<PendingPageScaleAnimation> pending_animation); |
338 scoped_ptr<PendingPageScaleAnimation> TakePendingPageScaleAnimation(); | 339 scoped_ptr<PendingPageScaleAnimation> TakePendingPageScaleAnimation(); |
339 | 340 |
340 protected: | 341 protected: |
341 explicit LayerTreeImpl( | 342 explicit LayerTreeImpl( |
342 LayerTreeHostImpl* layer_tree_host_impl, | 343 LayerTreeHostImpl* layer_tree_host_impl, |
343 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor, | 344 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor, |
344 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll); | 345 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll); |
345 void ReleaseResourcesRecursive(LayerImpl* current); | 346 void ProcessLayersRecursive(LayerImpl* current, |
| 347 void (LayerImpl::*function)()); |
346 float ClampPageScaleFactorToLimits(float page_scale_factor) const; | 348 float ClampPageScaleFactorToLimits(float page_scale_factor) const; |
347 void PushPageScaleFactorAndLimits(const float* page_scale_factor, | 349 void PushPageScaleFactorAndLimits(const float* page_scale_factor, |
348 float min_page_scale_factor, | 350 float min_page_scale_factor, |
349 float max_page_scale_factor); | 351 float max_page_scale_factor); |
350 bool SetPageScaleFactorLimits(float min_page_scale_factor, | 352 bool SetPageScaleFactorLimits(float min_page_scale_factor, |
351 float max_page_scale_factor); | 353 float max_page_scale_factor); |
352 void DidUpdatePageScale(); | 354 void DidUpdatePageScale(); |
353 void HideInnerViewportScrollbarsIfNearMinimumScale(); | 355 void HideInnerViewportScrollbarsIfNearMinimumScale(); |
354 | 356 |
355 LayerTreeHostImpl* layer_tree_host_impl_; | 357 LayerTreeHostImpl* layer_tree_host_impl_; |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 | 424 |
423 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 425 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
424 | 426 |
425 private: | 427 private: |
426 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 428 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
427 }; | 429 }; |
428 | 430 |
429 } // namespace cc | 431 } // namespace cc |
430 | 432 |
431 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 433 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |