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_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
11 | 11 |
12 #include "base/basictypes.h" | 12 #include "base/basictypes.h" |
13 #include "base/containers/hash_tables.h" | 13 #include "base/containers/hash_tables.h" |
14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
15 #include "base/time/time.h" | 15 #include "base/time/time.h" |
16 #include "cc/animation/animation_events.h" | 16 #include "cc/animation/animation_events.h" |
17 #include "cc/animation/animation_registrar.h" | 17 #include "cc/animation/animation_registrar.h" |
18 #include "cc/animation/scrollbar_animation_controller.h" | 18 #include "cc/animation/scrollbar_animation_controller.h" |
19 #include "cc/base/cc_export.h" | 19 #include "cc/base/cc_export.h" |
20 #include "cc/base/synced_property.h" | 20 #include "cc/base/synced_property.h" |
| 21 #include "cc/debug/frame_timing_tracker.h" |
21 #include "cc/debug/micro_benchmark_controller_impl.h" | 22 #include "cc/debug/micro_benchmark_controller_impl.h" |
22 #include "cc/input/input_handler.h" | 23 #include "cc/input/input_handler.h" |
23 #include "cc/input/layer_scroll_offset_delegate.h" | 24 #include "cc/input/layer_scroll_offset_delegate.h" |
24 #include "cc/input/top_controls_manager_client.h" | 25 #include "cc/input/top_controls_manager_client.h" |
25 #include "cc/layers/layer_lists.h" | 26 #include "cc/layers/layer_lists.h" |
26 #include "cc/layers/render_pass_sink.h" | 27 #include "cc/layers/render_pass_sink.h" |
27 #include "cc/output/begin_frame_args.h" | 28 #include "cc/output/begin_frame_args.h" |
28 #include "cc/output/managed_memory_policy.h" | 29 #include "cc/output/managed_memory_policy.h" |
29 #include "cc/output/output_surface_client.h" | 30 #include "cc/output/output_surface_client.h" |
30 #include "cc/output/renderer.h" | 31 #include "cc/output/renderer.h" |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 void DidChangeTopControlsPosition() override; | 179 void DidChangeTopControlsPosition() override; |
179 bool HaveRootScrollLayer() const override; | 180 bool HaveRootScrollLayer() const override; |
180 | 181 |
181 struct CC_EXPORT FrameData : public RenderPassSink { | 182 struct CC_EXPORT FrameData : public RenderPassSink { |
182 FrameData(); | 183 FrameData(); |
183 ~FrameData() override; | 184 ~FrameData() override; |
184 void AsValueInto(base::debug::TracedValue* value) const; | 185 void AsValueInto(base::debug::TracedValue* value) const; |
185 | 186 |
186 std::vector<gfx::Rect> occluding_screen_space_rects; | 187 std::vector<gfx::Rect> occluding_screen_space_rects; |
187 std::vector<gfx::Rect> non_occluding_screen_space_rects; | 188 std::vector<gfx::Rect> non_occluding_screen_space_rects; |
| 189 std::vector<FrameTimingTracker::FrameAndRectIds> composite_events; |
188 RenderPassList render_passes; | 190 RenderPassList render_passes; |
189 RenderPassIdHashMap render_passes_by_id; | 191 RenderPassIdHashMap render_passes_by_id; |
190 const LayerImplList* render_surface_layer_list; | 192 const LayerImplList* render_surface_layer_list; |
191 LayerImplList will_draw_layers; | 193 LayerImplList will_draw_layers; |
192 bool has_no_damage; | 194 bool has_no_damage; |
193 | 195 |
194 // RenderPassSink implementation. | 196 // RenderPassSink implementation. |
195 void AppendRenderPass(scoped_ptr<RenderPass> render_pass) override; | 197 void AppendRenderPass(scoped_ptr<RenderPass> render_pass) override; |
196 }; | 198 }; |
197 | 199 |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
507 void SynchronouslyInitializeAllTiles(); | 509 void SynchronouslyInitializeAllTiles(); |
508 | 510 |
509 virtual scoped_ptr<Rasterizer> CreateRasterizer(); | 511 virtual scoped_ptr<Rasterizer> CreateRasterizer(); |
510 virtual void CreateResourceAndTileTaskWorkerPool( | 512 virtual void CreateResourceAndTileTaskWorkerPool( |
511 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, | 513 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, |
512 scoped_ptr<ResourcePool>* resource_pool, | 514 scoped_ptr<ResourcePool>* resource_pool, |
513 scoped_ptr<ResourcePool>* staging_resource_pool); | 515 scoped_ptr<ResourcePool>* staging_resource_pool); |
514 | 516 |
515 bool prepare_tiles_needed() const { return tile_priorities_dirty_; } | 517 bool prepare_tiles_needed() const { return tile_priorities_dirty_; } |
516 | 518 |
| 519 FrameTimingTracker* frame_timing_tracker() { |
| 520 return frame_timing_tracker_.get(); |
| 521 } |
| 522 |
517 protected: | 523 protected: |
518 LayerTreeHostImpl( | 524 LayerTreeHostImpl( |
519 const LayerTreeSettings& settings, | 525 const LayerTreeSettings& settings, |
520 LayerTreeHostImplClient* client, | 526 LayerTreeHostImplClient* client, |
521 Proxy* proxy, | 527 Proxy* proxy, |
522 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 528 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
523 SharedBitmapManager* shared_bitmap_manager, | 529 SharedBitmapManager* shared_bitmap_manager, |
524 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 530 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
525 int id); | 531 int id); |
526 | 532 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 int id_; | 731 int id_; |
726 | 732 |
727 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 733 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
728 | 734 |
729 std::vector<PictureLayerImpl*> picture_layers_; | 735 std::vector<PictureLayerImpl*> picture_layers_; |
730 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; | 736 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; |
731 | 737 |
732 bool requires_high_res_to_draw_; | 738 bool requires_high_res_to_draw_; |
733 bool is_likely_to_require_a_draw_; | 739 bool is_likely_to_require_a_draw_; |
734 | 740 |
| 741 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; |
| 742 |
735 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 743 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
736 }; | 744 }; |
737 | 745 |
738 } // namespace cc | 746 } // namespace cc |
739 | 747 |
740 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 748 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
OLD | NEW |