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> |
11 #include <vector> | 11 #include <vector> |
12 | 12 |
13 #include "base/basictypes.h" | 13 #include "base/basictypes.h" |
14 #include "base/cancelable_callback.h" | 14 #include "base/cancelable_callback.h" |
15 #include "base/containers/hash_tables.h" | 15 #include "base/containers/hash_tables.h" |
16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
17 #include "base/memory/scoped_ptr.h" | 17 #include "base/memory/scoped_ptr.h" |
18 #include "base/memory/weak_ptr.h" | 18 #include "base/memory/weak_ptr.h" |
19 #include "base/time/time.h" | 19 #include "base/time/time.h" |
20 #include "base/timer/timer.h" | 20 #include "base/timer/timer.h" |
21 #include "cc/animation/animation_events.h" | 21 #include "cc/animation/animation_events.h" |
22 #include "cc/base/cc_export.h" | 22 #include "cc/base/cc_export.h" |
23 #include "cc/base/scoped_ptr_vector.h" | 23 #include "cc/base/scoped_ptr_vector.h" |
| 24 #include "cc/debug/frame_timing_tracker.h" |
24 #include "cc/debug/micro_benchmark.h" | 25 #include "cc/debug/micro_benchmark.h" |
25 #include "cc/debug/micro_benchmark_controller.h" | 26 #include "cc/debug/micro_benchmark_controller.h" |
26 #include "cc/input/input_handler.h" | 27 #include "cc/input/input_handler.h" |
27 #include "cc/input/layer_selection_bound.h" | 28 #include "cc/input/layer_selection_bound.h" |
28 #include "cc/input/scrollbar.h" | 29 #include "cc/input/scrollbar.h" |
29 #include "cc/input/top_controls_state.h" | 30 #include "cc/input/top_controls_state.h" |
30 #include "cc/layers/layer_lists.h" | 31 #include "cc/layers/layer_lists.h" |
31 #include "cc/output/output_surface.h" | 32 #include "cc/output/output_surface.h" |
32 #include "cc/output/renderer_capabilities.h" | 33 #include "cc/output/renderer_capabilities.h" |
33 #include "cc/output/swap_promise.h" | 34 #include "cc/output/swap_promise.h" |
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 bool needs_meta_info_recomputation() { | 315 bool needs_meta_info_recomputation() { |
315 return needs_meta_info_recomputation_; | 316 return needs_meta_info_recomputation_; |
316 } | 317 } |
317 | 318 |
318 // If this is true, only property trees will be used for main thread CDP. | 319 // If this is true, only property trees will be used for main thread CDP. |
319 // CDP will not be run, and verify_property_trees will be ignored. | 320 // CDP will not be run, and verify_property_trees will be ignored. |
320 bool using_only_property_trees() const { | 321 bool using_only_property_trees() const { |
321 return settings().impl_side_painting; | 322 return settings().impl_side_painting; |
322 } | 323 } |
323 | 324 |
| 325 void RecordFrameTimingEvents( |
| 326 scoped_ptr<FrameTimingTracker::CompositeTimingSet> composite_events, |
| 327 scoped_ptr<FrameTimingTracker::MainFrameTimingSet> main_frame_events); |
| 328 |
324 protected: | 329 protected: |
325 explicit LayerTreeHost(InitParams* params); | 330 explicit LayerTreeHost(InitParams* params); |
326 void InitializeThreaded( | 331 void InitializeThreaded( |
327 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 332 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
328 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, | 333 scoped_refptr<base::SingleThreadTaskRunner> impl_task_runner, |
329 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 334 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
330 void InitializeSingleThreaded( | 335 void InitializeSingleThreaded( |
331 LayerTreeHostSingleThreadClient* single_thread_client, | 336 LayerTreeHostSingleThreadClient* single_thread_client, |
332 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, | 337 scoped_refptr<base::SingleThreadTaskRunner> main_task_runner, |
333 scoped_ptr<BeginFrameSource> external_begin_frame_source); | 338 scoped_ptr<BeginFrameSource> external_begin_frame_source); |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 | 480 |
476 uint32_t surface_id_namespace_; | 481 uint32_t surface_id_namespace_; |
477 uint32_t next_surface_sequence_; | 482 uint32_t next_surface_sequence_; |
478 | 483 |
479 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 484 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
480 }; | 485 }; |
481 | 486 |
482 } // namespace cc | 487 } // namespace cc |
483 | 488 |
484 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 489 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |