| OLD | NEW |
| 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 <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 protected: | 362 protected: |
| 363 LayerTreeHost(InitParams* params, CompositorMode mode); | 363 LayerTreeHost(InitParams* params, CompositorMode mode); |
| 364 void InitializeThreaded( | 364 void InitializeThreaded( |
| 365 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 365 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
| 366 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 366 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, |
| 367 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 367 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
| 368 void InitializeSingleThreaded( | 368 void InitializeSingleThreaded( |
| 369 LayerTreeHostSingleThreadClient* single_thread_client, | 369 LayerTreeHostSingleThreadClient* single_thread_client, |
| 370 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 370 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
| 371 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 371 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
| 372 void InitializeForTesting(scoped_ptr<TaskRunnerProvider> task_runner_provider, | 372 void InitializeForTesting( |
| 373 scoped_ptr<Proxy> proxy_for_testing); | 373 scoped_ptr<TaskRunnerProvider> task_runner_provider, |
| 374 scoped_ptr<Proxy> proxy_for_testing, |
| 375 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
| 374 void SetOutputSurfaceLostForTesting(bool is_lost) { | 376 void SetOutputSurfaceLostForTesting(bool is_lost) { |
| 375 output_surface_lost_ = is_lost; | 377 output_surface_lost_ = is_lost; |
| 376 } | 378 } |
| 377 | 379 |
| 378 // shared_bitmap_manager(), gpu_memory_buffer_manager(), and | 380 // shared_bitmap_manager(), gpu_memory_buffer_manager(), and |
| 379 // task_graph_runner() return valid values only until the LayerTreeHostImpl is | 381 // task_graph_runner() return valid values only until the LayerTreeHostImpl is |
| 380 // created in CreateLayerTreeHostImpl(). | 382 // created in CreateLayerTreeHostImpl(). |
| 381 SharedBitmapManager* shared_bitmap_manager() const { | 383 SharedBitmapManager* shared_bitmap_manager() const { |
| 382 return shared_bitmap_manager_; | 384 return shared_bitmap_manager_; |
| 383 } | 385 } |
| 384 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() const { | 386 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager() const { |
| 385 return gpu_memory_buffer_manager_; | 387 return gpu_memory_buffer_manager_; |
| 386 } | 388 } |
| 387 TaskGraphRunner* task_graph_runner() const { return task_graph_runner_; } | 389 TaskGraphRunner* task_graph_runner() const { return task_graph_runner_; } |
| 388 | 390 |
| 389 MicroBenchmarkController micro_benchmark_controller_; | 391 MicroBenchmarkController micro_benchmark_controller_; |
| 390 | 392 |
| 391 void OnCommitForSwapPromises(); | 393 void OnCommitForSwapPromises(); |
| 392 | 394 |
| 393 private: | 395 private: |
| 394 void InitializeProxy(scoped_ptr<Proxy> proxy); | 396 void InitializeProxy( |
| 397 scoped_ptr<Proxy> proxy, |
| 398 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
| 395 | 399 |
| 396 bool DoUpdateLayers(Layer* root_layer); | 400 bool DoUpdateLayers(Layer* root_layer); |
| 397 void UpdateHudLayer(); | 401 void UpdateHudLayer(); |
| 398 | 402 |
| 399 bool AnimateLayersRecursive(Layer* current, base::TimeTicks time); | 403 bool AnimateLayersRecursive(Layer* current, base::TimeTicks time); |
| 400 | 404 |
| 401 bool IsSingleThreaded() const; | 405 bool IsSingleThreaded() const; |
| 402 bool IsThreaded() const; | 406 bool IsThreaded() const; |
| 403 | 407 |
| 404 struct UIResourceClientData { | 408 struct UIResourceClientData { |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 | 510 |
| 507 uint32_t surface_id_namespace_; | 511 uint32_t surface_id_namespace_; |
| 508 uint32_t next_surface_sequence_; | 512 uint32_t next_surface_sequence_; |
| 509 | 513 |
| 510 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 514 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 511 }; | 515 }; |
| 512 | 516 |
| 513 } // namespace cc | 517 } // namespace cc |
| 514 | 518 |
| 515 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 519 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |