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

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

Issue 363383002: Forward input tasks to the Blink scheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Cleanup. DefaultMainThreadTaskRunner now dispatches properly. 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_THREAD_PROXY_H_ 5 #ifndef CC_TREES_THREAD_PROXY_H_
6 #define CC_TREES_THREAD_PROXY_H_ 6 #define CC_TREES_THREAD_PROXY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 21 matching lines...) Expand all
32 class Scheduler; 32 class Scheduler;
33 class ScopedThreadProxy; 33 class ScopedThreadProxy;
34 34
35 class CC_EXPORT ThreadProxy : public Proxy, 35 class CC_EXPORT ThreadProxy : public Proxy,
36 NON_EXPORTED_BASE(LayerTreeHostImplClient), 36 NON_EXPORTED_BASE(LayerTreeHostImplClient),
37 NON_EXPORTED_BASE(SchedulerClient), 37 NON_EXPORTED_BASE(SchedulerClient),
38 NON_EXPORTED_BASE(ResourceUpdateControllerClient) { 38 NON_EXPORTED_BASE(ResourceUpdateControllerClient) {
39 public: 39 public:
40 static scoped_ptr<Proxy> Create( 40 static scoped_ptr<Proxy> Create(
41 LayerTreeHost* layer_tree_host, 41 LayerTreeHost* layer_tree_host,
42 scoped_refptr<cc::MainThreadTaskRunner> main_task_runner,
42 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 43 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
43 44
44 virtual ~ThreadProxy(); 45 virtual ~ThreadProxy();
45 46
46 struct BeginMainFrameAndCommitState { 47 struct BeginMainFrameAndCommitState {
47 BeginMainFrameAndCommitState(); 48 BeginMainFrameAndCommitState();
48 ~BeginMainFrameAndCommitState(); 49 ~BeginMainFrameAndCommitState();
49 50
50 base::TimeTicks monotonic_frame_begin_time; 51 base::TimeTicks monotonic_frame_begin_time;
51 scoped_ptr<ScrollAndScaleSet> scroll_info; 52 scoped_ptr<ScrollAndScaleSet> scroll_info;
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; 224 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE;
224 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() OVERRIDE; 225 virtual base::TimeDelta BeginMainFrameToCommitDurationEstimate() OVERRIDE;
225 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE; 226 virtual base::TimeDelta CommitToActivateDurationEstimate() OVERRIDE;
226 virtual void DidBeginImplFrameDeadline() OVERRIDE; 227 virtual void DidBeginImplFrameDeadline() OVERRIDE;
227 228
228 // ResourceUpdateControllerClient implementation 229 // ResourceUpdateControllerClient implementation
229 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; 230 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE;
230 231
231 protected: 232 protected:
232 ThreadProxy(LayerTreeHost* layer_tree_host, 233 ThreadProxy(LayerTreeHost* layer_tree_host,
234 scoped_refptr<cc::MainThreadTaskRunner> main_task_runner,
233 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 235 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
234 236
235 private: 237 private:
236 // Called on main thread. 238 // Called on main thread.
237 void SetRendererCapabilitiesMainThreadCopy( 239 void SetRendererCapabilitiesMainThreadCopy(
238 const RendererCapabilities& capabilities); 240 const RendererCapabilities& capabilities);
239 void BeginMainFrame( 241 void BeginMainFrame(
240 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state); 242 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state);
241 void DidCommitAndDrawFrame(); 243 void DidCommitAndDrawFrame();
242 void DidCompleteSwapBuffers(); 244 void DidCompleteSwapBuffers();
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
296 298
297 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; 299 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_;
298 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; 300 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_;
299 301
300 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); 302 DISALLOW_COPY_AND_ASSIGN(ThreadProxy);
301 }; 303 };
302 304
303 } // namespace cc 305 } // namespace cc
304 306
305 #endif // CC_TREES_THREAD_PROXY_H_ 307 #endif // CC_TREES_THREAD_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698