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 <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 class MemoryHistory; | 45 class MemoryHistory; |
46 class OutputSurface; | 46 class OutputSurface; |
47 class PageScaleAnimation; | 47 class PageScaleAnimation; |
48 class PictureLayerImpl; | 48 class PictureLayerImpl; |
49 class TaskRunnerProvider; | 49 class TaskRunnerProvider; |
50 class ResourceProvider; | 50 class ResourceProvider; |
51 class TileManager; | 51 class TileManager; |
52 class UIResourceRequest; | 52 class UIResourceRequest; |
53 class VideoFrameControllerClient; | 53 class VideoFrameControllerClient; |
54 struct PendingPageScaleAnimation; | 54 struct PendingPageScaleAnimation; |
| 55 struct RendererCapabilitiesImpl; |
55 | 56 |
56 typedef std::vector<UIResourceRequest> UIResourceRequestQueue; | 57 typedef std::vector<UIResourceRequest> UIResourceRequestQueue; |
57 typedef SyncedProperty<AdditionGroup<float>> SyncedTopControls; | 58 typedef SyncedProperty<AdditionGroup<float>> SyncedTopControls; |
58 typedef SyncedProperty<AdditionGroup<gfx::Vector2dF>> SyncedElasticOverscroll; | 59 typedef SyncedProperty<AdditionGroup<gfx::Vector2dF>> SyncedElasticOverscroll; |
59 | 60 |
60 class CC_EXPORT LayerTreeImpl { | 61 class CC_EXPORT LayerTreeImpl { |
61 public: | 62 public: |
62 // This is the number of times a fixed point has to be hit contiuously by a | 63 // This is the number of times a fixed point has to be hit contiuously by a |
63 // layer to consider it as jittering. | 64 // layer to consider it as jittering. |
64 enum : int { kFixedPointHitsThreshold = 3 }; | 65 enum : int { kFixedPointHitsThreshold = 3 }; |
65 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl, | 66 LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl, |
66 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor, | 67 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor, |
67 scoped_refptr<SyncedTopControls> top_controls_shown_ratio, | 68 scoped_refptr<SyncedTopControls> top_controls_shown_ratio, |
68 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll); | 69 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll); |
69 virtual ~LayerTreeImpl(); | 70 virtual ~LayerTreeImpl(); |
70 | 71 |
71 void Shutdown(); | 72 void Shutdown(); |
72 void ReleaseResources(); | 73 void ReleaseResources(); |
73 void RecreateResources(); | 74 void RecreateResources(); |
74 | 75 |
75 // Methods called by the layer tree that pass-through or access LTHI. | 76 // Methods called by the layer tree that pass-through or access LTHI. |
76 // --------------------------------------------------------------------------- | 77 // --------------------------------------------------------------------------- |
77 const LayerTreeSettings& settings() const; | 78 const LayerTreeSettings& settings() const; |
78 const LayerTreeDebugState& debug_state() const; | 79 const LayerTreeDebugState& debug_state() const; |
| 80 const RendererCapabilitiesImpl& GetRendererCapabilities() const; |
79 ContextProvider* context_provider() const; | 81 ContextProvider* context_provider() const; |
80 OutputSurface* output_surface() const; | 82 OutputSurface* output_surface() const; |
81 ResourceProvider* resource_provider() const; | 83 ResourceProvider* resource_provider() const; |
82 TileManager* tile_manager() const; | 84 TileManager* tile_manager() const; |
83 ImageDecodeController* image_decode_controller() const; | 85 ImageDecodeController* image_decode_controller() const; |
84 FrameRateCounter* frame_rate_counter() const; | 86 FrameRateCounter* frame_rate_counter() const; |
85 MemoryHistory* memory_history() const; | 87 MemoryHistory* memory_history() const; |
86 gfx::Size device_viewport_size() const; | 88 gfx::Size device_viewport_size() const; |
87 DebugRectHistory* debug_rect_history() const; | 89 DebugRectHistory* debug_rect_history() const; |
88 bool IsActiveTree() const; | 90 bool IsActiveTree() const; |
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 | 555 |
554 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 556 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
555 | 557 |
556 private: | 558 private: |
557 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 559 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
558 }; | 560 }; |
559 | 561 |
560 } // namespace cc | 562 } // namespace cc |
561 | 563 |
562 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 564 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |