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