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

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

Issue 1184863004: cc: Move timing history to the Scheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add cc:: Created 5 years, 6 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
« no previous file with comments | « cc/trees/proxy_timing_history.cc ('k') | cc/trees/single_thread_proxy.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_SINGLE_THREAD_PROXY_H_ 5 #ifndef CC_TREES_SINGLE_THREAD_PROXY_H_
6 #define CC_TREES_SINGLE_THREAD_PROXY_H_ 6 #define CC_TREES_SINGLE_THREAD_PROXY_H_
7 7
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/cancelable_callback.h" 10 #include "base/cancelable_callback.h"
11 #include "base/time/time.h" 11 #include "base/time/time.h"
12 #include "cc/animation/animation_events.h" 12 #include "cc/animation/animation_events.h"
13 #include "cc/output/begin_frame_args.h" 13 #include "cc/output/begin_frame_args.h"
14 #include "cc/scheduler/scheduler.h" 14 #include "cc/scheduler/scheduler.h"
15 #include "cc/trees/blocking_task_runner.h" 15 #include "cc/trees/blocking_task_runner.h"
16 #include "cc/trees/layer_tree_host_impl.h" 16 #include "cc/trees/layer_tree_host_impl.h"
17 #include "cc/trees/proxy.h" 17 #include "cc/trees/proxy.h"
18 #include "cc/trees/proxy_timing_history.h"
19 18
20 namespace cc { 19 namespace cc {
21 20
22 class BeginFrameSource; 21 class BeginFrameSource;
23 class ContextProvider; 22 class ContextProvider;
24 class LayerTreeHost; 23 class LayerTreeHost;
25 class LayerTreeHostSingleThreadClient; 24 class LayerTreeHostSingleThreadClient;
26 25
27 class CC_EXPORT SingleThreadProxy : public Proxy, 26 class CC_EXPORT SingleThreadProxy : public Proxy,
28 NON_EXPORTED_BASE(LayerTreeHostImplClient), 27 NON_EXPORTED_BASE(LayerTreeHostImplClient),
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 void DidFinishImplFrame() override; 66 void DidFinishImplFrame() override;
68 void ScheduledActionSendBeginMainFrame() override; 67 void ScheduledActionSendBeginMainFrame() override;
69 DrawResult ScheduledActionDrawAndSwapIfPossible() override; 68 DrawResult ScheduledActionDrawAndSwapIfPossible() override;
70 DrawResult ScheduledActionDrawAndSwapForced() override; 69 DrawResult ScheduledActionDrawAndSwapForced() override;
71 void ScheduledActionCommit() override; 70 void ScheduledActionCommit() override;
72 void ScheduledActionAnimate() override; 71 void ScheduledActionAnimate() override;
73 void ScheduledActionActivateSyncTree() override; 72 void ScheduledActionActivateSyncTree() override;
74 void ScheduledActionBeginOutputSurfaceCreation() override; 73 void ScheduledActionBeginOutputSurfaceCreation() override;
75 void ScheduledActionPrepareTiles() override; 74 void ScheduledActionPrepareTiles() override;
76 void ScheduledActionInvalidateOutputSurface() override; 75 void ScheduledActionInvalidateOutputSurface() override;
77 base::TimeDelta DrawDurationEstimate() override;
78 base::TimeDelta BeginMainFrameToCommitDurationEstimate() override;
79 base::TimeDelta CommitToActivateDurationEstimate() override;
80 void SendBeginFramesToChildren(const BeginFrameArgs& args) override; 76 void SendBeginFramesToChildren(const BeginFrameArgs& args) override;
81 void SendBeginMainFrameNotExpectedSoon() override; 77 void SendBeginMainFrameNotExpectedSoon() override;
82 78
83 // LayerTreeHostImplClient implementation 79 // LayerTreeHostImplClient implementation
84 void UpdateRendererCapabilitiesOnImplThread() override; 80 void UpdateRendererCapabilitiesOnImplThread() override;
85 void DidLoseOutputSurfaceOnImplThread() override; 81 void DidLoseOutputSurfaceOnImplThread() override;
86 void CommitVSyncParameters(base::TimeTicks timebase, 82 void CommitVSyncParameters(base::TimeTicks timebase,
87 base::TimeDelta interval) override; 83 base::TimeDelta interval) override;
88 void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override; 84 void SetEstimatedParentDrawTime(base::TimeDelta draw_time) override;
89 void SetMaxSwapsPendingOnImplThread(int max) override; 85 void SetMaxSwapsPendingOnImplThread(int max) override;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 LayerTreeHostSingleThreadClient* client_; 142 LayerTreeHostSingleThreadClient* client_;
147 143
148 // Used on the Thread, but checked on main thread during 144 // Used on the Thread, but checked on main thread during
149 // initialization/shutdown. 145 // initialization/shutdown.
150 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; 146 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_;
151 RendererCapabilities renderer_capabilities_for_main_thread_; 147 RendererCapabilities renderer_capabilities_for_main_thread_;
152 148
153 // Accessed from both threads. 149 // Accessed from both threads.
154 scoped_ptr<BeginFrameSource> external_begin_frame_source_; 150 scoped_ptr<BeginFrameSource> external_begin_frame_source_;
155 scoped_ptr<Scheduler> scheduler_on_impl_thread_; 151 scoped_ptr<Scheduler> scheduler_on_impl_thread_;
156 ProxyTimingHistory timing_history_;
157 152
158 scoped_ptr<BlockingTaskRunner::CapturePostTasks> commit_blocking_task_runner_; 153 scoped_ptr<BlockingTaskRunner::CapturePostTasks> commit_blocking_task_runner_;
159 bool next_frame_is_newly_committed_frame_; 154 bool next_frame_is_newly_committed_frame_;
160 155
161 #if DCHECK_IS_ON() 156 #if DCHECK_IS_ON()
162 bool inside_impl_frame_; 157 bool inside_impl_frame_;
163 #endif 158 #endif
164 bool inside_draw_; 159 bool inside_draw_;
165 bool defer_commits_; 160 bool defer_commits_;
166 bool animate_requested_; 161 bool animate_requested_;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 private: 231 private:
237 DebugScopedSetImplThread impl_thread_; 232 DebugScopedSetImplThread impl_thread_;
238 DebugScopedSetMainThreadBlocked main_thread_blocked_; 233 DebugScopedSetMainThreadBlocked main_thread_blocked_;
239 234
240 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); 235 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked);
241 }; 236 };
242 237
243 } // namespace cc 238 } // namespace cc
244 239
245 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ 240 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_
OLDNEW
« no previous file with comments | « cc/trees/proxy_timing_history.cc ('k') | cc/trees/single_thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698