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