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 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 LayerImpl* InnerViewportScrollLayer() const; | 324 LayerImpl* InnerViewportScrollLayer() const; |
325 LayerImpl* OuterViewportScrollLayer() const; | 325 LayerImpl* OuterViewportScrollLayer() const; |
326 LayerImpl* CurrentlyScrollingLayer() const; | 326 LayerImpl* CurrentlyScrollingLayer() const; |
327 | 327 |
328 int scroll_layer_id_when_mouse_over_scrollbar() const { | 328 int scroll_layer_id_when_mouse_over_scrollbar() const { |
329 return scroll_layer_id_when_mouse_over_scrollbar_; | 329 return scroll_layer_id_when_mouse_over_scrollbar_; |
330 } | 330 } |
331 bool scroll_affects_scroll_handler() const { | 331 bool scroll_affects_scroll_handler() const { |
332 return scroll_affects_scroll_handler_; | 332 return scroll_affects_scroll_handler_; |
333 } | 333 } |
334 void QueueSwapPromiseForMainThreadScrollUpdate( | |
335 scoped_ptr<SwapPromise> swap_promise); | |
336 | 334 |
337 bool IsCurrentlyScrolling() const; | 335 bool IsCurrentlyScrolling() const; |
338 | 336 |
339 virtual void SetVisible(bool visible); | 337 virtual void SetVisible(bool visible); |
340 bool visible() const { return visible_; } | 338 bool visible() const { return visible_; } |
341 | 339 |
342 void SetNeedsCommit() { client_->SetNeedsCommitOnImplThread(); } | 340 void SetNeedsCommit() { client_->SetNeedsCommitOnImplThread(); } |
343 void SetNeedsRedraw(); | 341 void SetNeedsRedraw(); |
344 | 342 |
345 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; | 343 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; |
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
570 void StartScrollbarFadeRecursive(LayerImpl* layer); | 568 void StartScrollbarFadeRecursive(LayerImpl* layer); |
571 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy, | 569 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy, |
572 bool zero_budget); | 570 bool zero_budget); |
573 void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy); | 571 void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy); |
574 | 572 |
575 void DidInitializeVisibleTile(); | 573 void DidInitializeVisibleTile(); |
576 | 574 |
577 void MarkUIResourceNotEvicted(UIResourceId uid); | 575 void MarkUIResourceNotEvicted(UIResourceId uid); |
578 | 576 |
579 void NotifySwapPromiseMonitorsOfSetNeedsRedraw(); | 577 void NotifySwapPromiseMonitorsOfSetNeedsRedraw(); |
580 void NotifySwapPromiseMonitorsOfForwardingToMainThread(); | |
581 | 578 |
582 typedef base::hash_map<UIResourceId, UIResourceData> | 579 typedef base::hash_map<UIResourceId, UIResourceData> |
583 UIResourceMap; | 580 UIResourceMap; |
584 UIResourceMap ui_resource_map_; | 581 UIResourceMap ui_resource_map_; |
585 | 582 |
586 // Resources that were evicted by EvictAllUIResources. Resources are removed | 583 // Resources that were evicted by EvictAllUIResources. Resources are removed |
587 // from this when they are touched by a create or destroy from the UI resource | 584 // from this when they are touched by a create or destroy from the UI resource |
588 // request queue. | 585 // request queue. |
589 std::set<UIResourceId> evicted_ui_resources_; | 586 std::set<UIResourceId> evicted_ui_resources_; |
590 | 587 |
(...skipping 26 matching lines...) Expand all Loading... |
617 // In impl-side painting mode, inert tree with layers that can be recycled | 614 // In impl-side painting mode, inert tree with layers that can be recycled |
618 // by the next sync from the main thread. | 615 // by the next sync from the main thread. |
619 scoped_ptr<LayerTreeImpl> recycle_tree_; | 616 scoped_ptr<LayerTreeImpl> recycle_tree_; |
620 | 617 |
621 InputHandlerClient* input_handler_client_; | 618 InputHandlerClient* input_handler_client_; |
622 bool did_lock_scrolling_layer_; | 619 bool did_lock_scrolling_layer_; |
623 bool should_bubble_scrolls_; | 620 bool should_bubble_scrolls_; |
624 bool wheel_scrolling_; | 621 bool wheel_scrolling_; |
625 bool scroll_affects_scroll_handler_; | 622 bool scroll_affects_scroll_handler_; |
626 int scroll_layer_id_when_mouse_over_scrollbar_; | 623 int scroll_layer_id_when_mouse_over_scrollbar_; |
627 ScopedPtrVector<SwapPromise> swap_promises_for_main_thread_scroll_update_; | |
628 | 624 |
629 bool tile_priorities_dirty_; | 625 bool tile_priorities_dirty_; |
630 | 626 |
631 // The optional delegate for the root layer scroll offset. | 627 // The optional delegate for the root layer scroll offset. |
632 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; | 628 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; |
633 LayerTreeSettings settings_; | 629 LayerTreeSettings settings_; |
634 LayerTreeDebugState debug_state_; | 630 LayerTreeDebugState debug_state_; |
635 bool visible_; | 631 bool visible_; |
636 ManagedMemoryPolicy cached_managed_memory_policy_; | 632 ManagedMemoryPolicy cached_managed_memory_policy_; |
637 | 633 |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 | 719 |
724 std::vector<PictureLayerImpl*> picture_layers_; | 720 std::vector<PictureLayerImpl*> picture_layers_; |
725 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; | 721 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; |
726 | 722 |
727 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 723 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
728 }; | 724 }; |
729 | 725 |
730 } // namespace cc | 726 } // namespace cc |
731 | 727 |
732 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 728 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |