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

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

Issue 13844021: Move compositor thread input handling logic into content (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebased Created 7 years, 7 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_client.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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) = 0; 76 virtual void RequestScrollbarAnimationOnImplThread(base::TimeDelta delay) = 0;
77 virtual void DidReceiveLastInputEventForVSync(base::TimeTicks frame_time) = 0; 77 virtual void DidReceiveLastInputEventForVSync(base::TimeTicks frame_time) = 0;
78 virtual void DidActivatePendingTree() = 0; 78 virtual void DidActivatePendingTree() = 0;
79 79
80 protected: 80 protected:
81 virtual ~LayerTreeHostImplClient() {} 81 virtual ~LayerTreeHostImplClient() {}
82 }; 82 };
83 83
84 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering 84 // LayerTreeHostImpl owns the LayerImpl trees as well as associated rendering
85 // state. 85 // state.
86 class CC_EXPORT LayerTreeHostImpl : public InputHandler, 86 class CC_EXPORT LayerTreeHostImpl
87 public RendererClient, 87 : public InputHandler,
88 public TileManagerClient, 88 public RendererClient,
89 public OutputSurfaceClient, 89 public TileManagerClient,
90 public TopControlsManagerClient { 90 public OutputSurfaceClient,
91 public TopControlsManagerClient,
92 public base::SupportsWeakPtr<LayerTreeHostImpl> {
91 public: 93 public:
92 static scoped_ptr<LayerTreeHostImpl> Create( 94 static scoped_ptr<LayerTreeHostImpl> Create(
93 const LayerTreeSettings& settings, 95 const LayerTreeSettings& settings,
94 LayerTreeHostImplClient* client, 96 LayerTreeHostImplClient* client,
95 Proxy* proxy, 97 Proxy* proxy,
96 RenderingStatsInstrumentation* rendering_stats_instrumentation); 98 RenderingStatsInstrumentation* rendering_stats_instrumentation);
97 virtual ~LayerTreeHostImpl(); 99 virtual ~LayerTreeHostImpl();
98 100
99 // InputHandler implementation 101 // InputHandler implementation
102 virtual void BindToClient(InputHandlerClient* client) OVERRIDE;
100 virtual InputHandler::ScrollStatus ScrollBegin( 103 virtual InputHandler::ScrollStatus ScrollBegin(
101 gfx::Point viewport_point, 104 gfx::Point viewport_point,
102 InputHandler::ScrollInputType type) OVERRIDE; 105 InputHandler::ScrollInputType type) OVERRIDE;
103 virtual bool ScrollBy(gfx::Point viewport_point, 106 virtual bool ScrollBy(gfx::Point viewport_point,
104 gfx::Vector2dF scroll_delta) OVERRIDE; 107 gfx::Vector2dF scroll_delta) OVERRIDE;
105 virtual bool ScrollVerticallyByPage( 108 virtual bool ScrollVerticallyByPage(
106 gfx::Point viewport_point, 109 gfx::Point viewport_point,
107 WebKit::WebScrollbar::ScrollDirection direction) OVERRIDE; 110 WebKit::WebScrollbar::ScrollDirection direction) OVERRIDE;
108 virtual void SetRootLayerScrollOffsetDelegate( 111 virtual void SetRootLayerScrollOffsetDelegate(
109 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) OVERRIDE; 112 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate) OVERRIDE;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 150
148 // RenderPassSink implementation. 151 // RenderPassSink implementation.
149 virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE; 152 virtual void AppendRenderPass(scoped_ptr<RenderPass> render_pass) OVERRIDE;
150 }; 153 };
151 154
152 virtual void BeginCommit(); 155 virtual void BeginCommit();
153 virtual void CommitComplete(); 156 virtual void CommitComplete();
154 virtual void Animate(base::TimeTicks monotonic_time, 157 virtual void Animate(base::TimeTicks monotonic_time,
155 base::Time wall_clock_time); 158 base::Time wall_clock_time);
156 virtual void UpdateAnimationState(bool start_ready_animations); 159 virtual void UpdateAnimationState(bool start_ready_animations);
160 void MainThreadHasStoppedFlinging();
157 void UpdateBackgroundAnimateTicking(bool should_background_tick); 161 void UpdateBackgroundAnimateTicking(bool should_background_tick);
158 void SetViewportDamage(gfx::Rect damage_rect); 162 void SetViewportDamage(gfx::Rect damage_rect);
159 163
160 void ManageTiles(); 164 void ManageTiles();
161 165
162 // Returns false if problems occured preparing the frame, and we should try 166 // Returns false if problems occured preparing the frame, and we should try
163 // to avoid displaying the frame. If PrepareToDraw is called, DidDrawAllLayers 167 // to avoid displaying the frame. If PrepareToDraw is called, DidDrawAllLayers
164 // must also be called, regardless of whether DrawLayers is called between the 168 // must also be called, regardless of whether DrawLayers is called between the
165 // two. 169 // two.
166 virtual bool PrepareToDraw(FrameData* frame, 170 virtual bool PrepareToDraw(FrameData* frame,
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after
429 scoped_ptr<LayerTreeImpl> active_tree_; 433 scoped_ptr<LayerTreeImpl> active_tree_;
430 434
431 // In impl-side painting mode, tree with possibly incomplete rasterized 435 // In impl-side painting mode, tree with possibly incomplete rasterized
432 // content. May be promoted to active by ActivatePendingTreeIfNeeded(). 436 // content. May be promoted to active by ActivatePendingTreeIfNeeded().
433 scoped_ptr<LayerTreeImpl> pending_tree_; 437 scoped_ptr<LayerTreeImpl> pending_tree_;
434 438
435 // In impl-side painting mode, inert tree with layers that can be recycled 439 // In impl-side painting mode, inert tree with layers that can be recycled
436 // by the next sync from the main thread. 440 // by the next sync from the main thread.
437 scoped_ptr<LayerTreeImpl> recycle_tree_; 441 scoped_ptr<LayerTreeImpl> recycle_tree_;
438 442
443 InputHandlerClient* input_handler_client_;
439 bool did_lock_scrolling_layer_; 444 bool did_lock_scrolling_layer_;
440 bool should_bubble_scrolls_; 445 bool should_bubble_scrolls_;
441 bool wheel_scrolling_; 446 bool wheel_scrolling_;
442 // The optional delegate for the root layer scroll offset. 447 // The optional delegate for the root layer scroll offset.
443 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; 448 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_;
444 LayerTreeSettings settings_; 449 LayerTreeSettings settings_;
445 LayerTreeDebugState debug_state_; 450 LayerTreeDebugState debug_state_;
446 gfx::Size device_viewport_size_; 451 gfx::Size device_viewport_size_;
447 float overdraw_bottom_height_; 452 float overdraw_bottom_height_;
448 float device_scale_factor_; 453 float device_scale_factor_;
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 scoped_ptr<AnimationRegistrar> animation_registrar_; 491 scoped_ptr<AnimationRegistrar> animation_registrar_;
487 492
488 RenderingStatsInstrumentation* rendering_stats_instrumentation_; 493 RenderingStatsInstrumentation* rendering_stats_instrumentation_;
489 494
490 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); 495 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl);
491 }; 496 };
492 497
493 } // namespace cc 498 } // namespace cc
494 499
495 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ 500 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_client.h ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698