Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: cc/trees/layer_tree_host_impl.h

Issue 365463003: Implement scroll handler latency tracking (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/trees/layer_tree_host_common.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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);
334 336
335 bool IsCurrentlyScrolling() const; 337 bool IsCurrentlyScrolling() const;
336 338
337 virtual void SetVisible(bool visible); 339 virtual void SetVisible(bool visible);
338 bool visible() const { return visible_; } 340 bool visible() const { return visible_; }
339 341
340 void SetNeedsCommit() { client_->SetNeedsCommitOnImplThread(); } 342 void SetNeedsCommit() { client_->SetNeedsCommitOnImplThread(); }
341 void SetNeedsRedraw(); 343 void SetNeedsRedraw();
342 344
343 ManagedMemoryPolicy ActualManagedMemoryPolicy() const; 345 ManagedMemoryPolicy ActualManagedMemoryPolicy() const;
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
568 void StartScrollbarFadeRecursive(LayerImpl* layer); 570 void StartScrollbarFadeRecursive(LayerImpl* layer);
569 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy, 571 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy,
570 bool zero_budget); 572 bool zero_budget);
571 void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy); 573 void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy);
572 574
573 void DidInitializeVisibleTile(); 575 void DidInitializeVisibleTile();
574 576
575 void MarkUIResourceNotEvicted(UIResourceId uid); 577 void MarkUIResourceNotEvicted(UIResourceId uid);
576 578
577 void NotifySwapPromiseMonitorsOfSetNeedsRedraw(); 579 void NotifySwapPromiseMonitorsOfSetNeedsRedraw();
580 void NotifySwapPromiseMonitorsOfForwardingToMainThread();
578 581
579 typedef base::hash_map<UIResourceId, UIResourceData> 582 typedef base::hash_map<UIResourceId, UIResourceData>
580 UIResourceMap; 583 UIResourceMap;
581 UIResourceMap ui_resource_map_; 584 UIResourceMap ui_resource_map_;
582 585
583 // Resources that were evicted by EvictAllUIResources. Resources are removed 586 // Resources that were evicted by EvictAllUIResources. Resources are removed
584 // from this when they are touched by a create or destroy from the UI resource 587 // from this when they are touched by a create or destroy from the UI resource
585 // request queue. 588 // request queue.
586 std::set<UIResourceId> evicted_ui_resources_; 589 std::set<UIResourceId> evicted_ui_resources_;
587 590
(...skipping 26 matching lines...) Expand all
614 // In impl-side painting mode, inert tree with layers that can be recycled 617 // In impl-side painting mode, inert tree with layers that can be recycled
615 // by the next sync from the main thread. 618 // by the next sync from the main thread.
616 scoped_ptr<LayerTreeImpl> recycle_tree_; 619 scoped_ptr<LayerTreeImpl> recycle_tree_;
617 620
618 InputHandlerClient* input_handler_client_; 621 InputHandlerClient* input_handler_client_;
619 bool did_lock_scrolling_layer_; 622 bool did_lock_scrolling_layer_;
620 bool should_bubble_scrolls_; 623 bool should_bubble_scrolls_;
621 bool wheel_scrolling_; 624 bool wheel_scrolling_;
622 bool scroll_affects_scroll_handler_; 625 bool scroll_affects_scroll_handler_;
623 int scroll_layer_id_when_mouse_over_scrollbar_; 626 int scroll_layer_id_when_mouse_over_scrollbar_;
627 ScopedPtrVector<SwapPromise> swap_promises_for_main_thread_scroll_update_;
624 628
625 bool tile_priorities_dirty_; 629 bool tile_priorities_dirty_;
626 630
627 // The optional delegate for the root layer scroll offset. 631 // The optional delegate for the root layer scroll offset.
628 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; 632 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_;
629 LayerTreeSettings settings_; 633 LayerTreeSettings settings_;
630 LayerTreeDebugState debug_state_; 634 LayerTreeDebugState debug_state_;
631 bool visible_; 635 bool visible_;
632 ManagedMemoryPolicy cached_managed_memory_policy_; 636 ManagedMemoryPolicy cached_managed_memory_policy_;
633 637
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
717 721
718 std::vector<PictureLayerImpl*> picture_layers_; 722 std::vector<PictureLayerImpl*> picture_layers_;
719 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; 723 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_;
720 724
721 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 725 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
722 }; 726 };
723 727
724 } // namespace cc 728 } // namespace cc
725 729
726 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 730 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698