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

Side by Side Diff: cc/trees/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/single_thread_proxy.cc ('k') | cc/trees/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_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"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "cc/animation/animation_events.h" 13 #include "cc/animation/animation_events.h"
14 #include "cc/base/completion_event.h" 14 #include "cc/base/completion_event.h"
15 #include "cc/base/delayed_unique_notifier.h" 15 #include "cc/base/delayed_unique_notifier.h"
16 #include "cc/scheduler/commit_earlyout_reason.h" 16 #include "cc/scheduler/commit_earlyout_reason.h"
17 #include "cc/scheduler/scheduler.h" 17 #include "cc/scheduler/scheduler.h"
18 #include "cc/trees/layer_tree_host_impl.h" 18 #include "cc/trees/layer_tree_host_impl.h"
19 #include "cc/trees/proxy.h" 19 #include "cc/trees/proxy.h"
20 #include "cc/trees/proxy_timing_history.h"
21 20
22 namespace base { 21 namespace base {
23 class SingleThreadTaskRunner; 22 class SingleThreadTaskRunner;
24 } 23 }
25 24
26 namespace cc { 25 namespace cc {
27 26
28 class BeginFrameSource; 27 class BeginFrameSource;
29 class ContextProvider; 28 class ContextProvider;
30 class InputHandlerClient; 29 class InputHandlerClient;
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 bool input_throttled_until_commit; 118 bool input_throttled_until_commit;
120 119
121 base::TimeTicks animation_time; 120 base::TimeTicks animation_time;
122 121
123 // Whether a commit has been completed since the last time animations were 122 // Whether a commit has been completed since the last time animations were
124 // ticked. If this happens, we need to animate again. 123 // ticked. If this happens, we need to animate again.
125 bool did_commit_after_animating; 124 bool did_commit_after_animating;
126 125
127 DelayedUniqueNotifier smoothness_priority_expiration_notifier; 126 DelayedUniqueNotifier smoothness_priority_expiration_notifier;
128 127
129 ProxyTimingHistory timing_history; 128 scoped_ptr<BeginFrameSource> external_begin_frame_source;
130 129
131 scoped_ptr<BeginFrameSource> external_begin_frame_source; 130 RenderingStatsInstrumentation* rendering_stats_instrumentation;
132 131
133 // Values used to keep track of frame durations. Used only in frame timing. 132 // Values used to keep track of frame durations. Used only in frame timing.
134 BeginFrameArgs last_begin_main_frame_args; 133 BeginFrameArgs last_begin_main_frame_args;
135 BeginFrameArgs last_processed_begin_main_frame_args; 134 BeginFrameArgs last_processed_begin_main_frame_args;
136 135
137 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl; 136 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl;
138 base::WeakPtrFactory<ThreadProxy> weak_factory; 137 base::WeakPtrFactory<ThreadProxy> weak_factory;
139 }; 138 };
140 139
141 const MainThreadOnly& main() const; 140 const MainThreadOnly& main() const;
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 void DidFinishImplFrame() override; 211 void DidFinishImplFrame() override;
213 void ScheduledActionSendBeginMainFrame() override; 212 void ScheduledActionSendBeginMainFrame() override;
214 DrawResult ScheduledActionDrawAndSwapIfPossible() override; 213 DrawResult ScheduledActionDrawAndSwapIfPossible() override;
215 DrawResult ScheduledActionDrawAndSwapForced() override; 214 DrawResult ScheduledActionDrawAndSwapForced() override;
216 void ScheduledActionAnimate() override; 215 void ScheduledActionAnimate() override;
217 void ScheduledActionCommit() override; 216 void ScheduledActionCommit() override;
218 void ScheduledActionActivateSyncTree() override; 217 void ScheduledActionActivateSyncTree() override;
219 void ScheduledActionBeginOutputSurfaceCreation() override; 218 void ScheduledActionBeginOutputSurfaceCreation() override;
220 void ScheduledActionPrepareTiles() override; 219 void ScheduledActionPrepareTiles() override;
221 void ScheduledActionInvalidateOutputSurface() override; 220 void ScheduledActionInvalidateOutputSurface() override;
222 base::TimeDelta DrawDurationEstimate() override;
223 base::TimeDelta BeginMainFrameToCommitDurationEstimate() override;
224 base::TimeDelta CommitToActivateDurationEstimate() override;
225 void SendBeginFramesToChildren(const BeginFrameArgs& args) override; 221 void SendBeginFramesToChildren(const BeginFrameArgs& args) override;
226 void SendBeginMainFrameNotExpectedSoon() override; 222 void SendBeginMainFrameNotExpectedSoon() override;
227 223
228 protected: 224 protected:
229 ThreadProxy( 225 ThreadProxy(
230 LayerTreeHost* layer_tree_host, 226 LayerTreeHost* layer_tree_host,
231 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 227 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
232 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, 228 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
233 scoped_ptr<BeginFrameSource> external_begin_frame_source); 229 scoped_ptr<BeginFrameSource> external_begin_frame_source);
234 230
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 293
298 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; 294 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_;
299 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; 295 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_;
300 296
301 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); 297 DISALLOW_COPY_AND_ASSIGN(ThreadProxy);
302 }; 298 };
303 299
304 } // namespace cc 300 } // namespace cc
305 301
306 #endif // CC_TREES_THREAD_PROXY_H_ 302 #endif // CC_TREES_THREAD_PROXY_H_
OLDNEW
« no previous file with comments | « cc/trees/single_thread_proxy.cc ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698