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

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

Issue 16574002: Estimate draw duration in SchedulerClient (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add UMA stats Created 7 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 | 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 "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
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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 VSyncClient* vsync_client_; 255 VSyncClient* vsync_client_;
254 256
255 bool inside_draw_; 257 bool inside_draw_;
256 258
257 bool defer_commits_; 259 bool defer_commits_;
258 scoped_ptr<BeginFrameAndCommitState> pending_deferred_commit_; 260 scoped_ptr<BeginFrameAndCommitState> pending_deferred_commit_;
259 261
260 base::TimeTicks smoothness_takes_priority_expiration_time_; 262 base::TimeTicks smoothness_takes_priority_expiration_time_;
261 bool renew_tree_priority_on_impl_thread_pending_; 263 bool renew_tree_priority_on_impl_thread_pending_;
262 264
265 RollingTimeDeltaHistory draw_duration_history_;
266
263 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); 267 DISALLOW_COPY_AND_ASSIGN(ThreadProxy);
264 }; 268 };
265 269
266 } // namespace cc 270 } // namespace cc
267 271
268 #endif // CC_TREES_THREAD_PROXY_H_ 272 #endif // CC_TREES_THREAD_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698