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

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

Issue 85693007: cc: Defer first OutputSurface creation until client is ready (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add tests Created 7 years 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 virtual void SetNeedsAnimate() OVERRIDE; 51 virtual void SetNeedsAnimate() OVERRIDE;
52 virtual void SetNeedsUpdateLayers() OVERRIDE; 52 virtual void SetNeedsUpdateLayers() OVERRIDE;
53 virtual void SetNeedsCommit() OVERRIDE; 53 virtual void SetNeedsCommit() OVERRIDE;
54 virtual void SetNeedsRedraw(gfx::Rect damage_rect) OVERRIDE; 54 virtual void SetNeedsRedraw(gfx::Rect damage_rect) OVERRIDE;
55 virtual void SetNextCommitWaitsForActivation() OVERRIDE; 55 virtual void SetNextCommitWaitsForActivation() OVERRIDE;
56 virtual void NotifyInputThrottledUntilCommit() OVERRIDE; 56 virtual void NotifyInputThrottledUntilCommit() OVERRIDE;
57 virtual void SetDeferCommits(bool defer_commits) OVERRIDE; 57 virtual void SetDeferCommits(bool defer_commits) OVERRIDE;
58 virtual bool CommitRequested() const OVERRIDE; 58 virtual bool CommitRequested() const OVERRIDE;
59 virtual bool BeginMainFrameRequested() const OVERRIDE; 59 virtual bool BeginMainFrameRequested() const OVERRIDE;
60 virtual void MainThreadHasStoppedFlinging() OVERRIDE; 60 virtual void MainThreadHasStoppedFlinging() OVERRIDE;
61 virtual void Start(scoped_ptr<OutputSurface> first_output_surface) OVERRIDE; 61 virtual void Start() OVERRIDE;
62 virtual void Stop() OVERRIDE; 62 virtual void Stop() OVERRIDE;
63 virtual size_t MaxPartialTextureUpdates() const OVERRIDE; 63 virtual size_t MaxPartialTextureUpdates() const OVERRIDE;
64 virtual void AcquireLayerTextures() OVERRIDE; 64 virtual void AcquireLayerTextures() OVERRIDE;
65 virtual void ForceSerializeOnSwapBuffers() OVERRIDE; 65 virtual void ForceSerializeOnSwapBuffers() OVERRIDE;
66 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE; 66 virtual scoped_ptr<base::Value> AsValue() const OVERRIDE;
67 virtual bool CommitPendingForTesting() OVERRIDE; 67 virtual bool CommitPendingForTesting() OVERRIDE;
68 virtual scoped_ptr<base::Value> SchedulerStateAsValueForTesting() OVERRIDE; 68 virtual scoped_ptr<base::Value> SchedulerStateAsValueForTesting() OVERRIDE;
69 69
70 // LayerTreeHostImplClient implementation 70 // LayerTreeHostImplClient implementation
71 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE; 71 virtual void DidLoseOutputSurfaceOnImplThread() OVERRIDE;
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 // Use one of the contents_texture_manager_on functions above instead of using 215 // Use one of the contents_texture_manager_on functions above instead of using
216 // this variable directly. 216 // this variable directly.
217 PrioritizedResourceManager* contents_texture_manager_unsafe_; 217 PrioritizedResourceManager* contents_texture_manager_unsafe_;
218 RendererCapabilities renderer_capabilities_main_thread_copy_; 218 RendererCapabilities renderer_capabilities_main_thread_copy_;
219 bool started_; 219 bool started_;
220 bool textures_acquired_; 220 bool textures_acquired_;
221 bool in_composite_and_readback_; 221 bool in_composite_and_readback_;
222 bool manage_tiles_pending_; 222 bool manage_tiles_pending_;
223 // Weak pointer to use when posting tasks to the impl thread. 223 // Weak pointer to use when posting tasks to the impl thread.
224 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_; 224 base::WeakPtr<ThreadProxy> impl_thread_weak_ptr_;
225 // Holds the first output surface passed from Start. Should not be used for
226 // anything else.
227 scoped_ptr<OutputSurface> first_output_surface_;
228 225
229 // Accessed on the main thread, or when main thread is blocked. 226 // Accessed on the main thread, or when main thread is blocked.
230 bool commit_waits_for_activation_; 227 bool commit_waits_for_activation_;
231 bool inside_commit_; 228 bool inside_commit_;
232 229
233 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_; 230 scoped_ptr<LayerTreeHostImpl> layer_tree_host_impl_;
234 231
235 scoped_ptr<Scheduler> scheduler_on_impl_thread_; 232 scoped_ptr<Scheduler> scheduler_on_impl_thread_;
236 233
237 // Set when the main thread is waiting on a 234 // Set when the main thread is waiting on a
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_; 283 base::WeakPtr<ThreadProxy> main_thread_weak_ptr_;
287 base::WeakPtrFactory<ThreadProxy> weak_factory_on_impl_thread_; 284 base::WeakPtrFactory<ThreadProxy> weak_factory_on_impl_thread_;
288 base::WeakPtrFactory<ThreadProxy> weak_factory_; 285 base::WeakPtrFactory<ThreadProxy> weak_factory_;
289 286
290 DISALLOW_COPY_AND_ASSIGN(ThreadProxy); 287 DISALLOW_COPY_AND_ASSIGN(ThreadProxy);
291 }; 288 };
292 289
293 } // namespace cc 290 } // namespace cc
294 291
295 #endif // CC_TREES_THREAD_PROXY_H_ 292 #endif // CC_TREES_THREAD_PROXY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698