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

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: rebase, add include 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
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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 LayerTreeHost* layer_tree_host_; 141 LayerTreeHost* layer_tree_host_;
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<Scheduler> scheduler_on_impl_thread_; 150 scoped_ptr<Scheduler> scheduler_on_impl_thread_;
155 ProxyTimingHistory timing_history_;
156 151
157 scoped_ptr<BlockingTaskRunner::CapturePostTasks> commit_blocking_task_runner_; 152 scoped_ptr<BlockingTaskRunner::CapturePostTasks> commit_blocking_task_runner_;
158 bool next_frame_is_newly_committed_frame_; 153 bool next_frame_is_newly_committed_frame_;
159 154
160 #if DCHECK_IS_ON() 155 #if DCHECK_IS_ON()
161 bool inside_impl_frame_; 156 bool inside_impl_frame_;
162 #endif 157 #endif
163 bool inside_draw_; 158 bool inside_draw_;
164 bool defer_commits_; 159 bool defer_commits_;
165 bool animate_requested_; 160 bool animate_requested_;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 private: 230 private:
236 DebugScopedSetImplThread impl_thread_; 231 DebugScopedSetImplThread impl_thread_;
237 DebugScopedSetMainThreadBlocked main_thread_blocked_; 232 DebugScopedSetMainThreadBlocked main_thread_blocked_;
238 233
239 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked); 234 DISALLOW_COPY_AND_ASSIGN(DebugScopedSetImplThreadAndMainThreadBlocked);
240 }; 235 };
241 236
242 } // namespace cc 237 } // namespace cc
243 238
244 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_ 239 #endif // CC_TREES_SINGLE_THREAD_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698