OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_HOST_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include <bitset> | 10 #include <bitset> |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 virtual void OnDrawForOutputSurface(bool resourceless_software_draw) = 0; | 132 virtual void OnDrawForOutputSurface(bool resourceless_software_draw) = 0; |
133 | 133 |
134 protected: | 134 protected: |
135 virtual ~LayerTreeHostImplClient() {} | 135 virtual ~LayerTreeHostImplClient() {} |
136 }; | 136 }; |
137 | 137 |
138 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering | 138 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering |
139 // state. | 139 // state. |
140 class CC_EXPORT LayerTreeHostImpl | 140 class CC_EXPORT LayerTreeHostImpl |
141 : public InputHandler, | 141 : public InputHandler, |
142 public RendererClient, | |
143 public TileManagerClient, | 142 public TileManagerClient, |
144 public OutputSurfaceClient, | 143 public OutputSurfaceClient, |
145 public TopControlsManagerClient, | 144 public TopControlsManagerClient, |
146 public ScrollbarAnimationControllerClient, | 145 public ScrollbarAnimationControllerClient, |
147 public VideoFrameControllerClient, | 146 public VideoFrameControllerClient, |
148 public LayerTreeMutatorClient, | 147 public LayerTreeMutatorClient, |
149 public MutatorHostClient, | 148 public MutatorHostClient, |
150 public base::SupportsWeakPtr<LayerTreeHostImpl> { | 149 public base::SupportsWeakPtr<LayerTreeHostImpl> { |
151 public: | 150 public: |
152 static std::unique_ptr<LayerTreeHostImpl> Create( | 151 static std::unique_ptr<LayerTreeHostImpl> Create( |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 virtual void ReadyToCommit() {} // For tests. | 244 virtual void ReadyToCommit() {} // For tests. |
246 virtual void BeginCommit(); | 245 virtual void BeginCommit(); |
247 virtual void CommitComplete(); | 246 virtual void CommitComplete(); |
248 virtual void UpdateAnimationState(bool start_ready_animations); | 247 virtual void UpdateAnimationState(bool start_ready_animations); |
249 bool Mutate(base::TimeTicks monotonic_time); | 248 bool Mutate(base::TimeTicks monotonic_time); |
250 void ActivateAnimations(); | 249 void ActivateAnimations(); |
251 void Animate(); | 250 void Animate(); |
252 void AnimatePendingTreeAfterCommit(); | 251 void AnimatePendingTreeAfterCommit(); |
253 void MainThreadHasStoppedFlinging(); | 252 void MainThreadHasStoppedFlinging(); |
254 void DidAnimateScrollOffset(); | 253 void DidAnimateScrollOffset(); |
| 254 void SetFullViewportDamage(); |
255 void SetViewportDamage(const gfx::Rect& damage_rect); | 255 void SetViewportDamage(const gfx::Rect& damage_rect); |
256 | 256 |
257 void SetTreeLayerFilterMutated(ElementId element_id, | 257 void SetTreeLayerFilterMutated(ElementId element_id, |
258 LayerTreeImpl* tree, | 258 LayerTreeImpl* tree, |
259 const FilterOperations& filters); | 259 const FilterOperations& filters); |
260 void SetTreeLayerOpacityMutated(ElementId element_id, | 260 void SetTreeLayerOpacityMutated(ElementId element_id, |
261 LayerTreeImpl* tree, | 261 LayerTreeImpl* tree, |
262 float opacity); | 262 float opacity); |
263 void SetTreeLayerTransformMutated(ElementId element_id, | 263 void SetTreeLayerTransformMutated(ElementId element_id, |
264 LayerTreeImpl* tree, | 264 LayerTreeImpl* tree, |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
335 | 335 |
336 DrawMode GetDrawMode() const; | 336 DrawMode GetDrawMode() const; |
337 | 337 |
338 // Viewport size in draw space: this size is in physical pixels and is used | 338 // Viewport size in draw space: this size is in physical pixels and is used |
339 // for draw properties, tilings, quads and render passes. | 339 // for draw properties, tilings, quads and render passes. |
340 gfx::Size DrawViewportSize() const; | 340 gfx::Size DrawViewportSize() const; |
341 | 341 |
342 // Viewport rect in view space used for tiling prioritization. | 342 // Viewport rect in view space used for tiling prioritization. |
343 const gfx::Rect ViewportRectForTilePriority() const; | 343 const gfx::Rect ViewportRectForTilePriority() const; |
344 | 344 |
345 // RendererClient implementation. | |
346 void SetFullRootLayerDamage() override; | |
347 | |
348 // TileManagerClient implementation. | 345 // TileManagerClient implementation. |
349 void NotifyReadyToActivate() override; | 346 void NotifyReadyToActivate() override; |
350 void NotifyReadyToDraw() override; | 347 void NotifyReadyToDraw() override; |
351 void NotifyAllTileTasksCompleted() override; | 348 void NotifyAllTileTasksCompleted() override; |
352 void NotifyTileStateChanged(const Tile* tile) override; | 349 void NotifyTileStateChanged(const Tile* tile) override; |
353 std::unique_ptr<RasterTilePriorityQueue> BuildRasterQueue( | 350 std::unique_ptr<RasterTilePriorityQueue> BuildRasterQueue( |
354 TreePriority tree_priority, | 351 TreePriority tree_priority, |
355 RasterTilePriorityQueue::Type type) override; | 352 RasterTilePriorityQueue::Type type) override; |
356 std::unique_ptr<EvictionTilePriorityQueue> BuildEvictionQueue( | 353 std::unique_ptr<EvictionTilePriorityQueue> BuildEvictionQueue( |
357 TreePriority tree_priority) override; | 354 TreePriority tree_priority) override; |
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
847 | 844 |
848 std::unique_ptr<PendingTreeDurationHistogramTimer> | 845 std::unique_ptr<PendingTreeDurationHistogramTimer> |
849 pending_tree_duration_timer_; | 846 pending_tree_duration_timer_; |
850 | 847 |
851 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 848 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
852 }; | 849 }; |
853 | 850 |
854 } // namespace cc | 851 } // namespace cc |
855 | 852 |
856 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 853 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |