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

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

Issue 299233002: Revert of cc: Stop blocking the main thread in CreateAndInitializeOutputSurface. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « cc/scheduler/scheduler.h ('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"
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 // Set only when SetNeedsCommit is called. 64 // Set only when SetNeedsCommit is called.
65 bool commit_requested; 65 bool commit_requested;
66 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. 66 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit.
67 bool commit_request_sent_to_impl_thread; 67 bool commit_request_sent_to_impl_thread;
68 68
69 bool started; 69 bool started;
70 bool manage_tiles_pending; 70 bool manage_tiles_pending;
71 bool can_cancel_commit; 71 bool can_cancel_commit;
72 bool defer_commits; 72 bool defer_commits;
73 73
74 base::CancelableClosure output_surface_creation_callback;
74 RendererCapabilities renderer_capabilities_main_thread_copy; 75 RendererCapabilities renderer_capabilities_main_thread_copy;
75 76
76 scoped_ptr<BeginMainFrameAndCommitState> pending_deferred_commit; 77 scoped_ptr<BeginMainFrameAndCommitState> pending_deferred_commit;
77 base::WeakPtrFactory<ThreadProxy> weak_factory; 78 base::WeakPtrFactory<ThreadProxy> weak_factory;
78 }; 79 };
79 80
80 // Accessed on the main thread, or when main thread is blocked. 81 // Accessed on the main thread, or when main thread is blocked.
81 struct MainThreadOrBlockedMainThread { 82 struct MainThreadOrBlockedMainThread {
82 explicit MainThreadOrBlockedMainThread(LayerTreeHost* host); 83 explicit MainThreadOrBlockedMainThread(LayerTreeHost* host);
83 ~MainThreadOrBlockedMainThread(); 84 ~MainThreadOrBlockedMainThread();
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 235
235 private: 236 private:
236 // Called on main thread. 237 // Called on main thread.
237 void SetRendererCapabilitiesMainThreadCopy( 238 void SetRendererCapabilitiesMainThreadCopy(
238 const RendererCapabilities& capabilities); 239 const RendererCapabilities& capabilities);
239 void BeginMainFrame( 240 void BeginMainFrame(
240 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state); 241 scoped_ptr<BeginMainFrameAndCommitState> begin_main_frame_state);
241 void DidCommitAndDrawFrame(); 242 void DidCommitAndDrawFrame();
242 void DidCompleteSwapBuffers(); 243 void DidCompleteSwapBuffers();
243 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> queue); 244 void SetAnimationEvents(scoped_ptr<AnimationEventsVector> queue);
244 void DidLoseOutputSurface();
245 void CreateAndInitializeOutputSurface(); 245 void CreateAndInitializeOutputSurface();
246 void DidInitializeOutputSurface(bool success, 246 void DoCreateAndInitializeOutputSurface();
247 const RendererCapabilities& capabilities);
248 void SendCommitRequestToImplThreadIfNeeded(); 247 void SendCommitRequestToImplThreadIfNeeded();
249 248
250 // Called on impl thread. 249 // Called on impl thread.
251 struct CommitPendingRequest; 250 struct CommitPendingRequest;
252 struct SchedulerStateRequest; 251 struct SchedulerStateRequest;
253 252
254 void StartCommitOnImplThread(CompletionEvent* completion, 253 void StartCommitOnImplThread(CompletionEvent* completion,
255 ResourceUpdateQueue* queue); 254 ResourceUpdateQueue* queue);
256 void BeginMainFrameAbortedOnImplThread(bool did_handle); 255 void BeginMainFrameAbortedOnImplThread(bool did_handle);
257 void FinishAllRenderingOnImplThread(CompletionEvent* completion); 256 void FinishAllRenderingOnImplThread(CompletionEvent* completion);
258 void InitializeImplOnImplThread(CompletionEvent* completion); 257 void InitializeImplOnImplThread(CompletionEvent* completion);
259 void SetLayerTreeHostClientReadyOnImplThread(); 258 void SetLayerTreeHostClientReadyOnImplThread();
260 void SetVisibleOnImplThread(CompletionEvent* completion, bool visible); 259 void SetVisibleOnImplThread(CompletionEvent* completion, bool visible);
261 void UpdateBackgroundAnimateTicking(); 260 void UpdateBackgroundAnimateTicking();
262 void HasInitializedOutputSurfaceOnImplThread( 261 void HasInitializedOutputSurfaceOnImplThread(
263 CompletionEvent* completion, 262 CompletionEvent* completion,
264 bool* has_initialized_output_surface); 263 bool* has_initialized_output_surface);
265 void DeleteContentsTexturesOnImplThread(CompletionEvent* completion); 264 virtual void InitializeOutputSurfaceOnImplThread(
266 void InitializeOutputSurfaceOnImplThread( 265 CompletionEvent* completion,
267 scoped_ptr<OutputSurface> output_surface); 266 scoped_ptr<OutputSurface> output_surface,
267 bool* success,
268 RendererCapabilities* capabilities);
268 void FinishGLOnImplThread(CompletionEvent* completion); 269 void FinishGLOnImplThread(CompletionEvent* completion);
269 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion); 270 void LayerTreeHostClosedOnImplThread(CompletionEvent* completion);
270 DrawResult DrawSwapInternal(bool forced_draw); 271 DrawResult DrawSwapInternal(bool forced_draw);
271 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); 272 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion);
272 void CheckOutputSurfaceStatusOnImplThread(); 273 void CheckOutputSurfaceStatusOnImplThread();
273 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request); 274 void CommitPendingOnImplThreadForTesting(CommitPendingRequest* request);
274 void SchedulerAsValueOnImplThreadForTesting(SchedulerStateRequest* request); 275 void SchedulerAsValueOnImplThreadForTesting(SchedulerStateRequest* request);
275 void AsValueOnImplThread(CompletionEvent* completion, 276 void AsValueOnImplThread(CompletionEvent* completion,
276 base::DictionaryValue* state) const; 277 base::DictionaryValue* state) const;
277 void RenewTreePriorityOnImplThread(); 278 void RenewTreePriorityOnImplThread();
(...skipping 19 matching lines...) Expand all
297 298
298 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; 299 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_;
299 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; 300 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_;
300 301
301 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); 302 DISALLOW_COPY_AND_ASSIGN(ThreadProxy);
302 }; 303 };
303 304
304 } // namespace cc 305 } // namespace cc
305 306
306 #endif // CC_TREES_THREAD_PROXY_H_ 307 #endif // CC_TREES_THREAD_PROXY_H_
OLDNEW
« no previous file with comments | « cc/scheduler/scheduler.h ('k') | cc/trees/thread_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698