| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 TaskGraphRunner* task_graph_runner() const { return task_graph_runner_; } | 349 TaskGraphRunner* task_graph_runner() const { return task_graph_runner_; } |
| 350 | 350 |
| 351 void OnCommitForSwapPromises(); | 351 void OnCommitForSwapPromises(); |
| 352 | 352 |
| 353 void RecordGpuRasterizationHistogram(); | 353 void RecordGpuRasterizationHistogram(); |
| 354 | 354 |
| 355 MicroBenchmarkController micro_benchmark_controller_; | 355 MicroBenchmarkController micro_benchmark_controller_; |
| 356 | 356 |
| 357 std::unique_ptr<LayerTree> layer_tree_; | 357 std::unique_ptr<LayerTree> layer_tree_; |
| 358 | 358 |
| 359 base::WeakPtr<InputHandler> input_handler_weak_ptr_; |
| 360 |
| 359 private: | 361 private: |
| 360 friend class LayerTreeHostSerializationTest; | 362 friend class LayerTreeHostSerializationTest; |
| 361 | 363 |
| 362 // This is the number of consecutive frames in which we want the content to be | 364 // This is the number of consecutive frames in which we want the content to be |
| 363 // suitable for GPU rasterization before re-enabling it. | 365 // suitable for GPU rasterization before re-enabling it. |
| 364 enum { kNumFramesToConsiderBeforeGpuRasterization = 60 }; | 366 enum { kNumFramesToConsiderBeforeGpuRasterization = 60 }; |
| 365 | 367 |
| 366 void ApplyViewportDeltas(ScrollAndScaleSet* info); | 368 void ApplyViewportDeltas(ScrollAndScaleSet* info); |
| 367 void InitializeProxy( | 369 void InitializeProxy( |
| 368 std::unique_ptr<Proxy> proxy, | 370 std::unique_ptr<Proxy> proxy, |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 | 406 |
| 405 // |current_output_surface_| can't be updated until we've successfully | 407 // |current_output_surface_| can't be updated until we've successfully |
| 406 // initialized a new output surface. |new_output_surface_| contains the | 408 // initialized a new output surface. |new_output_surface_| contains the |
| 407 // new output surface that is currently being initialized. If initialization | 409 // new output surface that is currently being initialized. If initialization |
| 408 // is successful then |new_output_surface_| replaces | 410 // is successful then |new_output_surface_| replaces |
| 409 // |current_output_surface_|. | 411 // |current_output_surface_|. |
| 410 std::unique_ptr<OutputSurface> new_output_surface_; | 412 std::unique_ptr<OutputSurface> new_output_surface_; |
| 411 std::unique_ptr<OutputSurface> current_output_surface_; | 413 std::unique_ptr<OutputSurface> current_output_surface_; |
| 412 bool output_surface_lost_; | 414 bool output_surface_lost_; |
| 413 | 415 |
| 414 base::WeakPtr<InputHandler> input_handler_weak_ptr_; | |
| 415 | |
| 416 const LayerTreeSettings settings_; | 416 const LayerTreeSettings settings_; |
| 417 LayerTreeDebugState debug_state_; | 417 LayerTreeDebugState debug_state_; |
| 418 | 418 |
| 419 bool visible_; | 419 bool visible_; |
| 420 | 420 |
| 421 bool has_gpu_rasterization_trigger_; | 421 bool has_gpu_rasterization_trigger_; |
| 422 bool content_is_suitable_for_gpu_rasterization_; | 422 bool content_is_suitable_for_gpu_rasterization_; |
| 423 bool gpu_rasterization_histogram_recorded_; | 423 bool gpu_rasterization_histogram_recorded_; |
| 424 | 424 |
| 425 // If set, then page scale animation has completed, but the client hasn't been | 425 // If set, then page scale animation has completed, but the client hasn't been |
| (...skipping 17 matching lines...) Expand all Loading... |
| 443 uint32_t surface_client_id_; | 443 uint32_t surface_client_id_; |
| 444 uint32_t next_surface_sequence_; | 444 uint32_t next_surface_sequence_; |
| 445 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0; | 445 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0; |
| 446 | 446 |
| 447 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 447 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 448 }; | 448 }; |
| 449 | 449 |
| 450 } // namespace cc | 450 } // namespace cc |
| 451 | 451 |
| 452 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 452 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |