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

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

Issue 16871016: cc: Use BeginFrameArgs (Closed) Base URL: http://git.chromium.org/chromium/src.git@bfargs2
Patch Set: else if typo Created 7 years, 5 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_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"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 virtual bool CommitPendingForTesting() OVERRIDE; 64 virtual bool CommitPendingForTesting() OVERRIDE;
65 virtual std::string SchedulerStateAsStringForTesting() OVERRIDE; 65 virtual std::string SchedulerStateAsStringForTesting() OVERRIDE;
66 66
67 // LayerTreeHostImplClient implementation 67 // LayerTreeHostImplClient implementation
68 virtual void DidTryInitializeRendererOnImplThread( 68 virtual void DidTryInitializeRendererOnImplThread(
69 bool success, 69 bool success,
70 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE; 70 scoped_refptr<ContextProvider> offscreen_context_provider) OVERRIDE;
71 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; 71 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE;
72 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE; 72 virtual void OnSwapBuffersCompleteOnImplThread() OVERRIDE;
73 virtual void BeginFrameOnImplThread(const BeginFrameArgs& args) OVERRIDE; 73 virtual void BeginFrameOnImplThread(const BeginFrameArgs& args) OVERRIDE;
74 virtual void DidBeginFrameDeadlineOnImplThread() OVERRIDE;
74 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE; 75 virtual void OnCanDrawStateChanged(bool can_draw) OVERRIDE;
75 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE; 76 virtual void OnHasPendingTreeStateChanged(bool has_pending_tree) OVERRIDE;
76 virtual void SetNeedsRedrawOnImplThread() OVERRIDE; 77 virtual void SetNeedsRedrawOnImplThread() OVERRIDE;
77 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect dirty_rect) OVERRIDE; 78 virtual void SetNeedsRedrawRectOnImplThread(gfx::Rect dirty_rect) OVERRIDE;
78 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE; 79 virtual void DidInitializeVisibleTileOnImplThread() OVERRIDE;
79 virtual void SetNeedsCommitOnImplThread() OVERRIDE; 80 virtual void SetNeedsCommitOnImplThread() OVERRIDE;
80 virtual void PostAnimationEventsToMainThreadOnImplThread( 81 virtual void PostAnimationEventsToMainThreadOnImplThread(
81 scoped_ptr<AnimationEventsVector> queue, 82 scoped_ptr<AnimationEventsVector> queue,
82 base::Time wall_clock_time) OVERRIDE; 83 base::Time wall_clock_time) OVERRIDE;
83 virtual bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes, 84 virtual bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes,
(...skipping 14 matching lines...) Expand all
98 ScheduledActionDrawAndSwapIfPossible() OVERRIDE; 99 ScheduledActionDrawAndSwapIfPossible() OVERRIDE;
99 virtual ScheduledActionDrawAndSwapResult ScheduledActionDrawAndSwapForced() 100 virtual ScheduledActionDrawAndSwapResult ScheduledActionDrawAndSwapForced()
100 OVERRIDE; 101 OVERRIDE;
101 virtual void ScheduledActionCommit() OVERRIDE; 102 virtual void ScheduledActionCommit() OVERRIDE;
102 virtual void ScheduledActionCheckForCompletedTileUploads() OVERRIDE; 103 virtual void ScheduledActionCheckForCompletedTileUploads() OVERRIDE;
103 virtual void ScheduledActionActivatePendingTreeIfNeeded() OVERRIDE; 104 virtual void ScheduledActionActivatePendingTreeIfNeeded() OVERRIDE;
104 virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE; 105 virtual void ScheduledActionBeginOutputSurfaceCreation() OVERRIDE;
105 virtual void ScheduledActionAcquireLayerTexturesForMainThread() OVERRIDE; 106 virtual void ScheduledActionAcquireLayerTexturesForMainThread() OVERRIDE;
106 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE; 107 virtual void DidAnticipatedDrawTimeChange(base::TimeTicks time) OVERRIDE;
107 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE; 108 virtual base::TimeDelta DrawDurationEstimate() OVERRIDE;
109 virtual void PostBeginFrameDeadline(const base::Closure& closure,
110 base::TimeTicks deadline) OVERRIDE;
108 111
109 // ResourceUpdateControllerClient implementation 112 // ResourceUpdateControllerClient implementation
110 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE; 113 virtual void ReadyToFinalizeTextureUpdates() OVERRIDE;
111 114
112 private: 115 private:
113 ThreadProxy(LayerTreeHost* layer_tree_host, 116 ThreadProxy(LayerTreeHost* layer_tree_host,
114 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 117 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
115 118
116 struct BeginFrameAndCommitState { 119 struct BeginFrameAndCommitState {
117 BeginFrameAndCommitState(); 120 BeginFrameAndCommitState();
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 scoped_ptr<OutputSurface> first_output_surface_; 207 scoped_ptr<OutputSurface> first_output_surface_;
205 208
206 base::WeakPtrFactory<ThreadProxy> weak_factory_on_impl_thread_; 209 base::WeakPtrFactory<ThreadProxy> weak_factory_on_impl_thread_;
207 210
208 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; 211 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_;
209 base::WeakPtrFactory<ThreadProxy> weak_factory_; 212 base::WeakPtrFactory<ThreadProxy> weak_factory_;
210 213
211 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; 214 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_;
212 215
213 scoped_ptr<Scheduler> scheduler_on_impl_thread_; 216 scoped_ptr<Scheduler> scheduler_on_impl_thread_;
217 bool frame_did_draw_;
214 218
215 // Set when the main thread is waiting on a 219 // Set when the main thread is waiting on a
216 // ScheduledActionSendBeginFrameToMainThread to be issued. 220 // ScheduledActionSendBeginFrameToMainThread to be issued.
217 CompletionEvent* 221 CompletionEvent*
218 begin_frame_sent_to_main_thread_completion_event_on_impl_thread_; 222 begin_frame_sent_to_main_thread_completion_event_on_impl_thread_;
219 223
224 // Set when there is a pending tree on a commit.
225 base::Closure deferred_start_commit_on_impl_thread_;
226
220 // Set when the main thread is waiting on a readback. 227 // Set when the main thread is waiting on a readback.
221 ReadbackRequest* readback_request_on_impl_thread_; 228 ReadbackRequest* readback_request_on_impl_thread_;
222 229
223 // Set when the main thread is waiting on a commit to complete. 230 // Set when the main thread is waiting on a commit to complete.
224 CompletionEvent* commit_completion_event_on_impl_thread_; 231 CompletionEvent* commit_completion_event_on_impl_thread_;
225 232
226 // Set when the main thread is waiting on a pending tree activation. 233 // Set when the main thread is waiting on a pending tree activation.
227 CompletionEvent* completion_event_for_commit_held_on_tree_activation_; 234 CompletionEvent* completion_event_for_commit_held_on_tree_activation_;
228 235
229 // Set when the main thread is waiting on layers to be drawn. 236 // Set when the main thread is waiting on layers to be drawn.
(...skipping 19 matching lines...) Expand all
249 bool renew_tree_priority_on_impl_thread_pending_; 256 bool renew_tree_priority_on_impl_thread_pending_;
250 257
251 RollingTimeDeltaHistory draw_duration_history_; 258 RollingTimeDeltaHistory draw_duration_history_;
252 259
253 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); 260 DISALLOW_COPY_AND_ASSIGN(ThreadProxy);
254 }; 261 };
255 262
256 } // namespace cc 263 } // namespace cc
257 264
258 #endif // CC_TREES_THREAD_PROXY_H_ 265 #endif // CC_TREES_THREAD_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698