OLD | NEW |
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 "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
11 #include "cc/animation/animation_events.h" | 11 #include "cc/animation/animation_events.h" |
12 #include "cc/base/completion_event.h" | 12 #include "cc/base/completion_event.h" |
13 #include "cc/resources/resource_update_controller.h" | 13 #include "cc/resources/resource_update_controller.h" |
| 14 #include "cc/scheduler/rolling_time_delta_history.h" |
14 #include "cc/scheduler/scheduler.h" | 15 #include "cc/scheduler/scheduler.h" |
15 #include "cc/scheduler/vsync_time_source.h" | 16 #include "cc/scheduler/vsync_time_source.h" |
16 #include "cc/trees/layer_tree_host_impl.h" | 17 #include "cc/trees/layer_tree_host_impl.h" |
17 #include "cc/trees/proxy.h" | 18 #include "cc/trees/proxy.h" |
18 | 19 |
19 namespace cc { | 20 namespace cc { |
20 | 21 |
21 class ContextProvider; | 22 class ContextProvider; |
22 class InputHandlerClient; | 23 class InputHandlerClient; |
23 class LayerTreeHost; | 24 class LayerTreeHost; |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 virtual ScheduledActionDrawAndSwapResult | 96 virtual ScheduledActionDrawAndSwapResult |
96 ScheduledActionDrawAndSwapIfPossible() OVERRIDE; | 97 ScheduledActionDrawAndSwapIfPossible() OVERRIDE; |
97 virtual ScheduledActionDrawAndSwapResult ScheduledActionDrawAndSwapForced() | 98 virtual ScheduledActionDrawAndSwapResult ScheduledActionDrawAndSwapForced() |
98 OVERRIDE; | 99 OVERRIDE; |
99 virtual void ScheduledActionCommit() OVERRIDE; | 100 virtual void ScheduledActionCommit() OVERRIDE; |
100 virtual void ScheduledActionCheckForCompletedTileUploads() OVERRIDE; | 101 virtual void ScheduledActionCheckForCompletedTileUploads() OVERRIDE; |
101 virtual void ScheduledActionActivatePendingTreeIfNeeded() OVERRIDE; | 102 virtual void ScheduledActionActivatePendingTreeIfNeeded() OVERRIDE; |
102 virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE; | 103 virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE; |
103 virtual void ScheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; | 104 virtual void ScheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; |
104 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE; | 105 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE; |
| 106 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; |
105 | 107 |
106 // ResourceUpdateControllerClient implementation | 108 // ResourceUpdateControllerClient implementation |
107 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; | 109 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; |
108 | 110 |
109 // VSyncProvider implementation | 111 // VSyncProvider implementation |
110 virtual void RequestVSyncNotification(VSyncClient* client) OVERRIDE; | 112 virtual void RequestVSyncNotification(VSyncClient* client) OVERRIDE; |
111 | 113 |
112 int MaxFramesPendingForTesting() const { | 114 int MaxFramesPendingForTesting() const { |
113 return scheduler_on_impl_thread_->MaxFramesPending(); | 115 return scheduler_on_impl_thread_->MaxFramesPending(); |
114 } | 116 } |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 VSyncClient* vsync_client_; | 256 VSyncClient* vsync_client_; |
255 | 257 |
256 bool inside_draw_; | 258 bool inside_draw_; |
257 | 259 |
258 bool defer_commits_; | 260 bool defer_commits_; |
259 scoped_ptr<BeginFrameAndCommitState> pending_deferred_commit_; | 261 scoped_ptr<BeginFrameAndCommitState> pending_deferred_commit_; |
260 | 262 |
261 base::TimeTicks smoothness_takes_priority_expiration_time_; | 263 base::TimeTicks smoothness_takes_priority_expiration_time_; |
262 bool renew_tree_priority_on_impl_thread_pending_; | 264 bool renew_tree_priority_on_impl_thread_pending_; |
263 | 265 |
| 266 RollingTimeDeltaHistory draw_duration_history_; |
| 267 |
264 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); | 268 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); |
265 }; | 269 }; |
266 | 270 |
267 } // namespace cc | 271 } // namespace cc |
268 | 272 |
269 #endif // CC_TREES_THREAD_PROXY_H_ | 273 #endif // CC_TREES_THREAD_PROXY_H_ |
OLD | NEW |