| 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 <list> | 8 #include <list> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 LayerImpl* InnerViewportScrollLayer() const; | 309 LayerImpl* InnerViewportScrollLayer() const; |
| 310 LayerImpl* OuterViewportScrollLayer() const; | 310 LayerImpl* OuterViewportScrollLayer() const; |
| 311 LayerImpl* CurrentlyScrollingLayer() const; | 311 LayerImpl* CurrentlyScrollingLayer() const; |
| 312 | 312 |
| 313 int scroll_layer_id_when_mouse_over_scrollbar() const { | 313 int scroll_layer_id_when_mouse_over_scrollbar() const { |
| 314 return scroll_layer_id_when_mouse_over_scrollbar_; | 314 return scroll_layer_id_when_mouse_over_scrollbar_; |
| 315 } | 315 } |
| 316 bool scroll_affects_scroll_handler() const { | 316 bool scroll_affects_scroll_handler() const { |
| 317 return scroll_affects_scroll_handler_; | 317 return scroll_affects_scroll_handler_; |
| 318 } | 318 } |
| 319 void QueueSwapPromiseForMainThreadScrollUpdate( |
| 320 scoped_ptr<LatencyInfoSwapPromise> swap_promise); |
| 319 | 321 |
| 320 bool IsCurrentlyScrolling() const; | 322 bool IsCurrentlyScrolling() const; |
| 321 | 323 |
| 322 virtual void SetVisible(bool visible); | 324 virtual void SetVisible(bool visible); |
| 323 bool visible() const { return visible_; } | 325 bool visible() const { return visible_; } |
| 324 | 326 |
| 325 void SetNeedsCommit() { client_->SetNeedsCommitOnImplThread(); } | 327 void SetNeedsCommit() { client_->SetNeedsCommitOnImplThread(); } |
| 326 void SetNeedsRedraw(); | 328 void SetNeedsRedraw(); |
| 327 | 329 |
| 328 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; | 330 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 542 void StartScrollbarFadeRecursive(LayerImpl* layer); | 544 void StartScrollbarFadeRecursive(LayerImpl* layer); |
| 543 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy, | 545 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy, |
| 544 bool zero_budget); | 546 bool zero_budget); |
| 545 void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy); | 547 void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy); |
| 546 | 548 |
| 547 void DidInitializeVisibleTile(); | 549 void DidInitializeVisibleTile(); |
| 548 | 550 |
| 549 void MarkUIResourceNotEvicted(UIResourceId uid); | 551 void MarkUIResourceNotEvicted(UIResourceId uid); |
| 550 | 552 |
| 551 void NotifySwapPromiseMonitorsOfSetNeedsRedraw(); | 553 void NotifySwapPromiseMonitorsOfSetNeedsRedraw(); |
| 554 void NotifySwapPromiseMonitorsOfForwardingToMainThread(); |
| 555 void BreakSwapPromisesForMainThreadScrollUpdate( |
| 556 SwapPromise::DidNotSwapReason reason); |
| 552 | 557 |
| 553 typedef base::hash_map<UIResourceId, UIResourceData> | 558 typedef base::hash_map<UIResourceId, UIResourceData> |
| 554 UIResourceMap; | 559 UIResourceMap; |
| 555 UIResourceMap ui_resource_map_; | 560 UIResourceMap ui_resource_map_; |
| 556 | 561 |
| 557 // Resources that were evicted by EvictAllUIResources. Resources are removed | 562 // Resources that were evicted by EvictAllUIResources. Resources are removed |
| 558 // from this when they are touched by a create or destroy from the UI resource | 563 // from this when they are touched by a create or destroy from the UI resource |
| 559 // request queue. | 564 // request queue. |
| 560 std::set<UIResourceId> evicted_ui_resources_; | 565 std::set<UIResourceId> evicted_ui_resources_; |
| 561 | 566 |
| (...skipping 26 matching lines...) Expand all Loading... |
| 588 // In impl-side painting mode, inert tree with layers that can be recycled | 593 // In impl-side painting mode, inert tree with layers that can be recycled |
| 589 // by the next sync from the main thread. | 594 // by the next sync from the main thread. |
| 590 scoped_ptr<LayerTreeImpl> recycle_tree_; | 595 scoped_ptr<LayerTreeImpl> recycle_tree_; |
| 591 | 596 |
| 592 InputHandlerClient* input_handler_client_; | 597 InputHandlerClient* input_handler_client_; |
| 593 bool did_lock_scrolling_layer_; | 598 bool did_lock_scrolling_layer_; |
| 594 bool should_bubble_scrolls_; | 599 bool should_bubble_scrolls_; |
| 595 bool wheel_scrolling_; | 600 bool wheel_scrolling_; |
| 596 bool scroll_affects_scroll_handler_; | 601 bool scroll_affects_scroll_handler_; |
| 597 int scroll_layer_id_when_mouse_over_scrollbar_; | 602 int scroll_layer_id_when_mouse_over_scrollbar_; |
| 603 ScopedPtrVector<LatencyInfoSwapPromise> |
| 604 swap_promises_for_main_thread_scroll_update_; |
| 598 | 605 |
| 599 bool tile_priorities_dirty_; | 606 bool tile_priorities_dirty_; |
| 600 | 607 |
| 601 // The optional delegate for the root layer scroll offset. | 608 // The optional delegate for the root layer scroll offset. |
| 602 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; | 609 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; |
| 603 LayerTreeSettings settings_; | 610 LayerTreeSettings settings_; |
| 604 LayerTreeDebugState debug_state_; | 611 LayerTreeDebugState debug_state_; |
| 605 bool visible_; | 612 bool visible_; |
| 606 ManagedMemoryPolicy cached_managed_memory_policy_; | 613 ManagedMemoryPolicy cached_managed_memory_policy_; |
| 607 | 614 |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 689 size_t transfer_buffer_memory_limit_; | 696 size_t transfer_buffer_memory_limit_; |
| 690 | 697 |
| 691 std::vector<PictureLayerImpl*> picture_layers_; | 698 std::vector<PictureLayerImpl*> picture_layers_; |
| 692 | 699 |
| 693 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 700 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 694 }; | 701 }; |
| 695 | 702 |
| 696 } // namespace cc | 703 } // namespace cc |
| 697 | 704 |
| 698 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 705 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |