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 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
326 | 326 |
327 size_t SourceAnimationFrameNumberForTesting() const; | 327 size_t SourceAnimationFrameNumberForTesting() const; |
328 | 328 |
329 void RegisterScrollbarAnimationController(ElementId scroll_element_id); | 329 void RegisterScrollbarAnimationController(ElementId scroll_element_id); |
330 void UnregisterScrollbarAnimationController(ElementId scroll_element_id); | 330 void UnregisterScrollbarAnimationController(ElementId scroll_element_id); |
331 ScrollbarAnimationController* ScrollbarAnimationControllerForElementId( | 331 ScrollbarAnimationController* ScrollbarAnimationControllerForElementId( |
332 ElementId scroll_element_id) const; | 332 ElementId scroll_element_id) const; |
333 | 333 |
334 DrawMode GetDrawMode() const; | 334 DrawMode GetDrawMode() const; |
335 | 335 |
336 // Viewport size in draw space: this size is in physical pixels and is used | |
337 // for draw properties, tilings, quads and render passes. | |
338 gfx::Size DrawViewportSize() const; | |
339 | |
340 // Viewport rect in view space used for tiling prioritization. | |
341 const gfx::Rect ViewportRectForTilePriority() const; | |
342 | |
343 // TileManagerClient implementation. | 336 // TileManagerClient implementation. |
344 void NotifyReadyToActivate() override; | 337 void NotifyReadyToActivate() override; |
345 void NotifyReadyToDraw() override; | 338 void NotifyReadyToDraw() override; |
346 void NotifyAllTileTasksCompleted() override; | 339 void NotifyAllTileTasksCompleted() override; |
347 void NotifyTileStateChanged(const Tile* tile) override; | 340 void NotifyTileStateChanged(const Tile* tile) override; |
348 std::unique_ptr<RasterTilePriorityQueue> BuildRasterQueue( | 341 std::unique_ptr<RasterTilePriorityQueue> BuildRasterQueue( |
349 TreePriority tree_priority, | 342 TreePriority tree_priority, |
350 RasterTilePriorityQueue::Type type) override; | 343 RasterTilePriorityQueue::Type type) override; |
351 std::unique_ptr<EvictionTilePriorityQueue> BuildEvictionQueue( | 344 std::unique_ptr<EvictionTilePriorityQueue> BuildEvictionQueue( |
352 TreePriority tree_priority) override; | 345 TreePriority tree_priority) override; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 }; | 528 }; |
536 | 529 |
537 // Returns the amount of delta that can be applied to scroll_node, taking | 530 // Returns the amount of delta that can be applied to scroll_node, taking |
538 // page scale into account. | 531 // page scale into account. |
539 gfx::Vector2dF ComputeScrollDelta(ScrollNode* scroll_node, | 532 gfx::Vector2dF ComputeScrollDelta(ScrollNode* scroll_node, |
540 const gfx::Vector2dF& delta); | 533 const gfx::Vector2dF& delta); |
541 | 534 |
542 void ScheduleMicroBenchmark(std::unique_ptr<MicroBenchmarkImpl> benchmark); | 535 void ScheduleMicroBenchmark(std::unique_ptr<MicroBenchmarkImpl> benchmark); |
543 | 536 |
544 CompositorFrameMetadata MakeCompositorFrameMetadata() const; | 537 CompositorFrameMetadata MakeCompositorFrameMetadata() const; |
| 538 |
545 // Viewport rectangle and clip in device space. These rects are used to | 539 // Viewport rectangle and clip in device space. These rects are used to |
546 // prioritize raster and determine what is submitted in a CompositorFrame. | 540 // prioritize raster and determine what is submitted in a CompositorFrame. |
547 gfx::Rect DeviceViewport() const; | 541 gfx::Rect DeviceViewport() const; |
| 542 // Viewport rect to be used for tiling prioritization instead of the |
| 543 // DeviceViewport(). |
| 544 const gfx::Rect ViewportRectForTilePriority() const; |
548 | 545 |
549 // When a SwapPromiseMonitor is created on the impl thread, it calls | 546 // When a SwapPromiseMonitor is created on the impl thread, it calls |
550 // InsertSwapPromiseMonitor() to register itself with LayerTreeHostImpl. | 547 // InsertSwapPromiseMonitor() to register itself with LayerTreeHostImpl. |
551 // When the monitor is destroyed, it calls RemoveSwapPromiseMonitor() | 548 // When the monitor is destroyed, it calls RemoveSwapPromiseMonitor() |
552 // to unregister itself. | 549 // to unregister itself. |
553 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor); | 550 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor); |
554 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); | 551 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); |
555 | 552 |
556 // TODO(weiliangc): Replace RequiresHighResToDraw with scheduler waits for | 553 // TODO(weiliangc): Replace RequiresHighResToDraw with scheduler waits for |
557 // ReadyToDraw. crbug.com/469175 | 554 // ReadyToDraw. crbug.com/469175 |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
875 bool touchpad_and_wheel_scroll_latching_enabled_; | 872 bool touchpad_and_wheel_scroll_latching_enabled_; |
876 | 873 |
877 ImplThreadPhase impl_thread_phase_; | 874 ImplThreadPhase impl_thread_phase_; |
878 | 875 |
879 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 876 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
880 }; | 877 }; |
881 | 878 |
882 } // namespace cc | 879 } // namespace cc |
883 | 880 |
884 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 881 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |