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

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, 2 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
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 25 matching lines...) Expand all
36 #include "cc/resources/scoped_ui_resource.h" 36 #include "cc/resources/scoped_ui_resource.h"
37 #include "cc/trees/layer_tree_host_client.h" 37 #include "cc/trees/layer_tree_host_client.h"
38 #include "cc/trees/layer_tree_host_common.h" 38 #include "cc/trees/layer_tree_host_common.h"
39 #include "cc/trees/layer_tree_settings.h" 39 #include "cc/trees/layer_tree_settings.h"
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/rect.h" 42 #include "ui/gfx/rect.h"
43 43
44 namespace cc { 44 namespace cc {
45 class AnimationRegistrar; 45 class AnimationRegistrar;
46 class BeginFrameSource;
46 class GpuMemoryBufferManager; 47 class GpuMemoryBufferManager;
47 class HeadsUpDisplayLayer; 48 class HeadsUpDisplayLayer;
48 class Layer; 49 class Layer;
49 class LayerTreeHostImpl; 50 class LayerTreeHostImpl;
50 class LayerTreeHostImplClient; 51 class LayerTreeHostImplClient;
51 class LayerTreeHostSingleThreadClient; 52 class LayerTreeHostSingleThreadClient;
52 class PrioritizedResource; 53 class PrioritizedResource;
53 class PrioritizedResourceManager; 54 class PrioritizedResourceManager;
54 class Region; 55 class Region;
55 class RenderingStatsInstrumentation; 56 class RenderingStatsInstrumentation;
(...skipping 25 matching lines...) Expand all
81 82
82 class CC_EXPORT LayerTreeHost { 83 class CC_EXPORT LayerTreeHost {
83 public: 84 public:
84 // The SharedBitmapManager will be used on the compositor thread. 85 // The SharedBitmapManager will be used on the compositor thread.
85 static scoped_ptr<LayerTreeHost> CreateThreaded( 86 static scoped_ptr<LayerTreeHost> CreateThreaded(
86 LayerTreeHostClient* client, 87 LayerTreeHostClient* client,
87 SharedBitmapManager* shared_bitmap_manager, 88 SharedBitmapManager* shared_bitmap_manager,
88 GpuMemoryBufferManager* gpu_memory_buffer_manager, 89 GpuMemoryBufferManager* gpu_memory_buffer_manager,
89 const LayerTreeSettings& settings, 90 const LayerTreeSettings& settings,
90 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 91 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
91 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 92 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
93 scoped_ptr<BeginFrameSource> external_begin_frame_source);
92 94
93 static scoped_ptr<LayerTreeHost> CreateSingleThreaded( 95 static scoped_ptr<LayerTreeHost> CreateSingleThreaded(
94 LayerTreeHostClient* client, 96 LayerTreeHostClient* client,
95 LayerTreeHostSingleThreadClient* single_thread_client, 97 LayerTreeHostSingleThreadClient* single_thread_client,
96 SharedBitmapManager* shared_bitmap_manager, 98 SharedBitmapManager* shared_bitmap_manager,
97 GpuMemoryBufferManager* gpu_memory_buffer_manager, 99 GpuMemoryBufferManager* gpu_memory_buffer_manager,
98 const LayerTreeSettings& settings, 100 const LayerTreeSettings& settings,
99 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); 101 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
102 scoped_ptr<BeginFrameSource> external_begin_frame_source);
100 virtual ~LayerTreeHost(); 103 virtual ~LayerTreeHost();
101 104
102 void SetLayerTreeHostClientReady(); 105 void SetLayerTreeHostClientReady();
103 106
104 // LayerTreeHost interface to Proxy. 107 // LayerTreeHost interface to Proxy.
105 void WillBeginMainFrame() { 108 void WillBeginMainFrame() {
106 client_->WillBeginMainFrame(source_frame_number_); 109 client_->WillBeginMainFrame(source_frame_number_);
107 } 110 }
108 void DidBeginMainFrame(); 111 void DidBeginMainFrame();
109 void BeginMainFrame(const BeginFrameArgs& args); 112 void BeginMainFrame(const BeginFrameArgs& args);
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 307
305 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); } 308 size_t num_queued_swap_promises() const { return swap_promise_list_.size(); }
306 309
307 protected: 310 protected:
308 LayerTreeHost(LayerTreeHostClient* client, 311 LayerTreeHost(LayerTreeHostClient* client,
309 SharedBitmapManager* shared_bitmap_manager, 312 SharedBitmapManager* shared_bitmap_manager,
310 GpuMemoryBufferManager* gpu_memory_buffer_manager, 313 GpuMemoryBufferManager* gpu_memory_buffer_manager,
311 const LayerTreeSettings& settings); 314 const LayerTreeSettings& settings);
312 void InitializeThreaded( 315 void InitializeThreaded(
313 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, 316 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
314 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner); 317 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner,
318 scoped_ptr<BeginFrameSource> external_begin_frame_source);
315 void InitializeSingleThreaded( 319 void InitializeSingleThreaded(
316 LayerTreeHostSingleThreadClient* single_thread_client, 320 LayerTreeHostSingleThreadClient* single_thread_client,
317 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner); 321 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner,
322 scoped_ptr<BeginFrameSource> external_begin_frame_source);
318 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing); 323 void InitializeForTesting(scoped_ptr<Proxy> proxy_for_testing);
319 void SetOutputSurfaceLostForTesting(bool is_lost) { 324 void SetOutputSurfaceLostForTesting(bool is_lost) {
320 output_surface_lost_ = is_lost; 325 output_surface_lost_ = is_lost;
321 } 326 }
322 327
323 MicroBenchmarkController micro_benchmark_controller_; 328 MicroBenchmarkController micro_benchmark_controller_;
324 329
325 private: 330 private:
326 void InitializeProxy(scoped_ptr<Proxy> proxy); 331 void InitializeProxy(scoped_ptr<Proxy> proxy);
327 332
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 465
461 ScopedPtrVector<SwapPromise> swap_promise_list_; 466 ScopedPtrVector<SwapPromise> swap_promise_list_;
462 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 467 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
463 468
464 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 469 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
465 }; 470 };
466 471
467 } // namespace cc 472 } // namespace cc
468 473
469 #endif // CC_TREES_LAYER_TREE_HOST_H_ 474 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698