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/layer_tree_host.h

Issue 619843002: cc: Make separate interface for BeginFrame ipc from OutputSurface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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_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 29 matching lines...) Expand all
40 #include "cc/trees/proxy.h" 40 #include "cc/trees/proxy.h"
41 #include "third_party/skia/include/core/SkColor.h" 41 #include "third_party/skia/include/core/SkColor.h"
42 #include "ui/gfx/geometry/rect.h" 42 #include "ui/gfx/geometry/rect.h"
43 43
44 namespace gpu { 44 namespace gpu {
45 class GpuMemoryBufferManager; 45 class GpuMemoryBufferManager;
46 } 46 }
47 47
48 namespace cc { 48 namespace cc {
49 class AnimationRegistrar; 49 class AnimationRegistrar;
50 class BeginFrameSource;
50 class HeadsUpDisplayLayer; 51 class HeadsUpDisplayLayer;
51 class Layer; 52 class Layer;
52 class LayerTreeHostImpl; 53 class LayerTreeHostImpl;
53 class LayerTreeHostImplClient; 54 class LayerTreeHostImplClient;
54 class LayerTreeHostSingleThreadClient; 55 class LayerTreeHostSingleThreadClient;
55 class PrioritizedResource; 56 class PrioritizedResource;
56 class PrioritizedResourceManager; 57 class PrioritizedResourceManager;
57 class Region; 58 class Region;
58 class RenderingStatsInstrumentation; 59 class RenderingStatsInstrumentation;
59 class ResourceProvider; 60 class ResourceProvider;
(...skipping 24 matching lines...) Expand all
84 85
85 class CC_EXPORT LayerTreeHost { 86 class CC_EXPORT LayerTreeHost {
86 public: 87 public:
87 // The SharedBitmapManager will be used on the compositor thread. 88 // The SharedBitmapManager will be used on the compositor thread.
88 static scoped_ptr<LayerTreeHost> CreateThreaded( 89 static scoped_ptr<LayerTreeHost> CreateThreaded(
89 LayerTreeHostClient* client, 90 LayerTreeHostClient* client,
90 SharedBitmapManager* shared_bitmap_manager, 91 SharedBitmapManager* shared_bitmap_manager,
91 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 92 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
92 const LayerTreeSettings& settings, 93 const LayerTreeSettings& settings,
93 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 94 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
94 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 95 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
96 scoped_ptr<BeginFrameSource> external_begin_frame_source);
95 97
96 static scoped_ptr<LayerTreeHost> CreateSingleThreaded( 98 static scoped_ptr<LayerTreeHost> CreateSingleThreaded(
97 LayerTreeHostClient* client, 99 LayerTreeHostClient* client,
98 LayerTreeHostSingleThreadClient* single_thread_client, 100 LayerTreeHostSingleThreadClient* single_thread_client,
99 SharedBitmapManager* shared_bitmap_manager, 101 SharedBitmapManager* shared_bitmap_manager,
100 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 102 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
101 const LayerTreeSettings& settings, 103 const LayerTreeSettings& settings,
102 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); 104 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
105 scoped_ptr<BeginFrameSource> external_begin_frame_source);
103 virtual ~LayerTreeHost(); 106 virtual ~LayerTreeHost();
104 107
105 void SetLayerTreeHostClientReady(); 108 void SetLayerTreeHostClientReady();
106 109
107 // LayerTreeHost interface to Proxy. 110 // LayerTreeHost interface to Proxy.
108 void WillBeginMainFrame() { 111 void WillBeginMainFrame() {
109 client_->WillBeginMainFrame(source_frame_number_); 112 client_->WillBeginMainFrame(source_frame_number_);
110 } 113 }
111 void DidBeginMainFrame(); 114 void DidBeginMainFrame();
112 void BeginMainFrame(const BeginFrameArgs& args); 115 void BeginMainFrame(const BeginFrameArgs& args);
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 310
308 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); } 311 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); }
309 312
310 protected: 313 protected:
311 LayerTreeHost(LayerTreeHostClient* client, 314 LayerTreeHost(LayerTreeHostClient* client,
312 SharedBitmapManager* shared_bitmap_manager, 315 SharedBitmapManager* shared_bitmap_manager,
313 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 316 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
314 const LayerTreeSettings& settings); 317 const LayerTreeSettings& settings);
315 void InitializeThreaded( 318 void InitializeThreaded(
316 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 319 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
317 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 320 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
321 scoped_ptr<BeginFrameSource> external_begin_frame_source);
318 void InitializeSingleThreaded( 322 void InitializeSingleThreaded(
319 LayerTreeHostSingleThreadClient* single_thread_client, 323 LayerTreeHostSingleThreadClient* single_thread_client,
320 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); 324 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
325 scoped_ptr<BeginFrameSource> external_begin_frame_source);
321 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); 326 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing);
322 void SetOutputSurfaceLostForTesting(bool is_lost) { 327 void SetOutputSurfaceLostForTesting(bool is_lost) {
323 output_surface_lost_ = is_lost; 328 output_surface_lost_ = is_lost;
324 } 329 }
325 330
326 MicroBenchmarkController micro_benchmark_controller_; 331 MicroBenchmarkController micro_benchmark_controller_;
327 332
328 private: 333 private:
329 void InitializeProxy(scoped_ptr<Proxy> proxy); 334 void InitializeProxy(scoped_ptr<Proxy> proxy);
330 335
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
463 468
464 ScopedPtrVector<SwapPromise> swap_promise_list_; 469 ScopedPtrVector<SwapPromise> swap_promise_list_;
465 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 470 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
466 471
467 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 472 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
468 }; 473 };
469 474
470 } // namespace cc 475 } // namespace cc
471 476
472 #endif // CC_TREES_LAYER_TREE_HOST_H_ 477 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698