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

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

Issue 337693005: cc: Control defer_commits logic by Scheduler (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 5 years, 11 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 <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit. 72 // Set by SetNeedsAnimate, SetNeedsUpdateLayers, and SetNeedsCommit.
73 bool commit_request_sent_to_impl_thread; 73 bool commit_request_sent_to_impl_thread;
74 74
75 bool started; 75 bool started;
76 bool prepare_tiles_pending; 76 bool prepare_tiles_pending;
77 bool can_cancel_commit; 77 bool can_cancel_commit;
78 bool defer_commits; 78 bool defer_commits;
79 79
80 RendererCapabilities renderer_capabilities_main_thread_copy; 80 RendererCapabilities renderer_capabilities_main_thread_copy;
81 81
82 scoped_ptr<BeginMainFrameAndCommitState> pending_deferred_commit;
83 base::WeakPtrFactory<ThreadProxy> weak_factory; 82 base::WeakPtrFactory<ThreadProxy> weak_factory;
84 }; 83 };
85 84
86 // Accessed on the main thread, or when main thread is blocked. 85 // Accessed on the main thread, or when main thread is blocked.
87 struct MainThreadOrBlockedMainThread { 86 struct MainThreadOrBlockedMainThread {
88 explicit MainThreadOrBlockedMainThread(LayerTreeHost* host); 87 explicit MainThreadOrBlockedMainThread(LayerTreeHost* host);
89 ~MainThreadOrBlockedMainThread(); 88 ~MainThreadOrBlockedMainThread();
90 89
91 PrioritizedResourceManager* contents_texture_manager(); 90 PrioritizedResourceManager* contents_texture_manager();
92 91
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 DrawResult DrawSwapInternal(bool forced_draw); 273 DrawResult DrawSwapInternal(bool forced_draw);
275 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion); 274 void ForceSerializeOnSwapBuffersOnImplThread(CompletionEvent* completion);
276 void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion, 275 void MainFrameWillHappenOnImplThreadForTesting(CompletionEvent* completion,
277 bool* main_frame_will_happen); 276 bool* main_frame_will_happen);
278 void AsValueOnImplThread(CompletionEvent* completion, 277 void AsValueOnImplThread(CompletionEvent* completion,
279 base::debug::TracedValue* state) const; 278 base::debug::TracedValue* state) const;
280 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile); 279 void SetSwapUsedIncompleteTileOnImplThread(bool used_incomplete_tile);
281 void MainThreadHasStoppedFlingingOnImplThread(); 280 void MainThreadHasStoppedFlingingOnImplThread();
282 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled); 281 void SetInputThrottledUntilCommitOnImplThread(bool is_throttled);
283 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state); 282 void SetDebugStateOnImplThread(const LayerTreeDebugState& debug_state);
283 void SetDeferCommitsOnImplThread(bool defer_commits) const;
284 284
285 LayerTreeHost* layer_tree_host(); 285 LayerTreeHost* layer_tree_host();
286 const LayerTreeHost* layer_tree_host() const; 286 const LayerTreeHost* layer_tree_host() const;
287 287
288 // Use accessors instead of this variable directly. 288 // Use accessors instead of this variable directly.
289 MainThreadOnly main_thread_only_vars_unsafe_; 289 MainThreadOnly main_thread_only_vars_unsafe_;
290 MainThreadOnly& main(); 290 MainThreadOnly& main();
291 291
292 // Use accessors instead of this variable directly. 292 // Use accessors instead of this variable directly.
293 MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_; 293 MainThreadOrBlockedMainThread main_thread_or_blocked_vars_unsafe_;
294 MainThreadOrBlockedMainThread& blocked_main(); 294 MainThreadOrBlockedMainThread& blocked_main();
295 295
296 // Use accessors instead of this variable directly. 296 // Use accessors instead of this variable directly.
297 CompositorThreadOnly compositor_thread_vars_unsafe_; 297 CompositorThreadOnly compositor_thread_vars_unsafe_;
298 CompositorThreadOnly& impl(); 298 CompositorThreadOnly& impl();
299 299
300 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; 300 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_;
301 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; 301 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_;
302 302
303 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); 303 DISALLOW_COPY_AND_ASSIGN(ThreadProxy);
304 }; 304 };
305 305
306 } // namespace cc 306 } // namespace cc
307 307
308 #endif // CC_TREES_THREAD_PROXY_H_ 308 #endif // CC_TREES_THREAD_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698