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

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

Issue 423773002: Unified BeginFrame scheduling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 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_LAYER_TREE_HOST_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_
6 #define CC_TREES_LAYER_TREE_HOST_H_ 6 #define CC_TREES_LAYER_TREE_HOST_H_
7 7
8 #include <limits> 8 #include <limits>
9 #include <list> 9 #include <list>
10 #include <set> 10 #include <set>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 class LayerTreeHostSingleThreadClient; 51 class LayerTreeHostSingleThreadClient;
52 class PrioritizedResource; 52 class PrioritizedResource;
53 class PrioritizedResourceManager; 53 class PrioritizedResourceManager;
54 class Region; 54 class Region;
55 class RenderingStatsInstrumentation; 55 class RenderingStatsInstrumentation;
56 class ResourceProvider; 56 class ResourceProvider;
57 class ResourceUpdateQueue; 57 class ResourceUpdateQueue;
58 class SharedBitmapManager; 58 class SharedBitmapManager;
59 class TopControlsManager; 59 class TopControlsManager;
60 class UIResourceRequest; 60 class UIResourceRequest;
61 struct BeginFrameArgs;
61 struct RenderingStats; 62 struct RenderingStats;
62 struct ScrollAndScaleSet; 63 struct ScrollAndScaleSet;
63 64
64 // Provides information on an Impl's rendering capabilities back to the 65 // Provides information on an Impl's rendering capabilities back to the
65 // LayerTreeHost. 66 // LayerTreeHost.
66 struct CC_EXPORT RendererCapabilities { 67 struct CC_EXPORT RendererCapabilities {
67 RendererCapabilities(ResourceFormat best_texture_format, 68 RendererCapabilities(ResourceFormat best_texture_format,
68 bool allow_partial_texture_updates, 69 bool allow_partial_texture_updates,
69 int max_texture_size, 70 int max_texture_size,
70 bool using_shared_memory_resources); 71 bool using_shared_memory_resources);
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 // to unregister itself. 293 // to unregister itself.
293 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor); 294 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor);
294 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); 295 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor);
295 296
296 // Call this function when you expect there to be a swap buffer. 297 // Call this function when you expect there to be a swap buffer.
297 // See swap_promise.h for how to use SwapPromise. 298 // See swap_promise.h for how to use SwapPromise.
298 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise); 299 void QueueSwapPromise(scoped_ptr<SwapPromise> swap_promise);
299 300
300 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason); 301 void BreakSwapPromises(SwapPromise::DidNotSwapReason reason);
301 302
303 void SetAuthoritativeVSyncInterval(base::TimeDelta interval);
304
305 void SetChildrenNeedBeginFrames(bool need_begin_frame);
306
307 void SendBeginFrameToChildren(const BeginFrameArgs& args);
308
302 protected: 309 protected:
303 LayerTreeHost(LayerTreeHostClient* client, 310 LayerTreeHost(LayerTreeHostClient* client,
304 SharedBitmapManager* manager, 311 SharedBitmapManager* manager,
305 const LayerTreeSettings& settings); 312 const LayerTreeSettings& settings);
306 void InitializeThreaded( 313 void InitializeThreaded(
307 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 314 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
308 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 315 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner);
309 void InitializeSingleThreaded( 316 void InitializeSingleThreaded(
310 LayerTreeHostSingleThreadClient* single_thread_client, 317 LayerTreeHostSingleThreadClient* single_thread_client,
311 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); 318 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner);
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 461
455 ScopedPtrVector<SwapPromise> swap_promise_list_; 462 ScopedPtrVector<SwapPromise> swap_promise_list_;
456 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 463 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
457 464
458 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 465 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
459 }; 466 };
460 467
461 } // namespace cc 468 } // namespace cc
462 469
463 #endif // CC_TREES_LAYER_TREE_HOST_H_ 470 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698