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

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

Issue 361143002: Impl thread smooth scrolling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Better way to detect animation finished. Created 6 years, 5 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
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 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 RenderingStatsInstrumentation* rendering_stats_instrumentation, 119 RenderingStatsInstrumentation* rendering_stats_instrumentation,
120 SharedBitmapManager* manager, 120 SharedBitmapManager* manager,
121 int id); 121 int id);
122 virtual ~LayerTreeHostImpl(); 122 virtual ~LayerTreeHostImpl();
123 123
124 // InputHandler implementation 124 // InputHandler implementation
125 virtual void BindToClient(InputHandlerClient* client) OVERRIDE; 125 virtual void BindToClient(InputHandlerClient* client) OVERRIDE;
126 virtual InputHandler::ScrollStatus ScrollBegin( 126 virtual InputHandler::ScrollStatus ScrollBegin(
127 const gfx::Point& viewport_point, 127 const gfx::Point& viewport_point,
128 InputHandler::ScrollInputType type) OVERRIDE; 128 InputHandler::ScrollInputType type) OVERRIDE;
129 virtual InputHandler::ScrollStatus ScrollAnimated(
130 const gfx::Point& viewport_point,
131 const gfx::Vector2dF& scroll_delta) OVERRIDE;
129 virtual bool ScrollBy(const gfx::Point& viewport_point, 132 virtual bool ScrollBy(const gfx::Point& viewport_point,
130 const gfx::Vector2dF& scroll_delta) OVERRIDE; 133 const gfx::Vector2dF& scroll_delta) OVERRIDE;
131 virtual bool ScrollVerticallyByPage(const gfx::Point& viewport_point, 134 virtual bool ScrollVerticallyByPage(const gfx::Point& viewport_point,
132 ScrollDirection direction) OVERRIDE; 135 ScrollDirection direction) OVERRIDE;
133 virtual void SetRootLayerScrollOffsetDelegate( 136 virtual void SetRootLayerScrollOffsetDelegate(
134 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) OVERRIDE; 137 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) OVERRIDE;
135 virtual void OnRootLayerDelegatedScrollOffsetChanged() OVERRIDE; 138 virtual void OnRootLayerDelegatedScrollOffsetChanged() OVERRIDE;
136 virtual void ScrollEnd() OVERRIDE; 139 virtual void ScrollEnd() OVERRIDE;
137 virtual InputHandler::ScrollStatus FlingScrollBegin() OVERRIDE; 140 virtual InputHandler::ScrollStatus FlingScrollBegin() OVERRIDE;
138 virtual void MouseMoveAt(const gfx::Point& viewport_point) OVERRIDE; 141 virtual void MouseMoveAt(const gfx::Point& viewport_point) OVERRIDE;
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy, 548 void SetManagedMemoryPolicy(const ManagedMemoryPolicy& policy,
546 bool zero_budget); 549 bool zero_budget);
547 void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy); 550 void EnforceManagedMemoryPolicy(const ManagedMemoryPolicy& policy);
548 551
549 void DidInitializeVisibleTile(); 552 void DidInitializeVisibleTile();
550 553
551 void MarkUIResourceNotEvicted(UIResourceId uid); 554 void MarkUIResourceNotEvicted(UIResourceId uid);
552 555
553 void NotifySwapPromiseMonitorsOfSetNeedsRedraw(); 556 void NotifySwapPromiseMonitorsOfSetNeedsRedraw();
554 557
558 class IsScrollOffsetAnimationFinished {
559 public:
560 bool operator()(const AnimationEvent& event) const {
561 return event.type == AnimationEvent::Finished &&
562 event.target_property == Animation::ScrollOffset;
563 }
564 };
565
555 typedef base::hash_map<UIResourceId, UIResourceData> 566 typedef base::hash_map<UIResourceId, UIResourceData>
556 UIResourceMap; 567 UIResourceMap;
557 UIResourceMap ui_resource_map_; 568 UIResourceMap ui_resource_map_;
558 569
559 // Resources that were evicted by EvictAllUIResources. Resources are removed 570 // Resources that were evicted by EvictAllUIResources. Resources are removed
560 // from this when they are touched by a create or destroy from the UI resource 571 // from this when they are touched by a create or destroy from the UI resource
561 // request queue. 572 // request queue.
562 std::set<UIResourceId> evicted_ui_resources_; 573 std::set<UIResourceId> evicted_ui_resources_;
563 574
564 scoped_ptr<OutputSurface> output_surface_; 575 scoped_ptr<OutputSurface> output_surface_;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 size_t transfer_buffer_memory_limit_; 702 size_t transfer_buffer_memory_limit_;
692 703
693 std::vector<PictureLayerImpl*> picture_layers_; 704 std::vector<PictureLayerImpl*> picture_layers_;
694 705
695 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 706 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
696 }; 707 };
697 708
698 } // namespace cc 709 } // namespace cc
699 710
700 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 711 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698