| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 void DidChangeTopControlsPosition() override; | 178 void DidChangeTopControlsPosition() override; |
| 178 bool HaveRootScrollLayer() const override; | 179 bool HaveRootScrollLayer() const override; |
| 179 | 180 |
| 180 struct CC_EXPORT FrameData : public RenderPassSink { | 181 struct CC_EXPORT FrameData : public RenderPassSink { |
| 181 FrameData(); | 182 FrameData(); |
| 182 ~FrameData() override; | 183 ~FrameData() override; |
| 183 void AsValueInto(base::debug::TracedValue* value) const; | 184 void AsValueInto(base::debug::TracedValue* value) const; |
| 184 | 185 |
| 185 std::vector<gfx::Rect> occluding_screen_space_rects; | 186 std::vector<gfx::Rect> occluding_screen_space_rects; |
| 186 std::vector<gfx::Rect> non_occluding_screen_space_rects; | 187 std::vector<gfx::Rect> non_occluding_screen_space_rects; |
| 188 std::vector<FrameTimingTracker::FrameAndRectIds> composite_events; |
| 187 RenderPassList render_passes; | 189 RenderPassList render_passes; |
| 188 RenderPassIdHashMap render_passes_by_id; | 190 RenderPassIdHashMap render_passes_by_id; |
| 189 const LayerImplList* render_surface_layer_list; | 191 const LayerImplList* render_surface_layer_list; |
| 190 LayerImplList will_draw_layers; | 192 LayerImplList will_draw_layers; |
| 191 bool has_no_damage; | 193 bool has_no_damage; |
| 192 | 194 |
| 193 // RenderPassSink implementation. | 195 // RenderPassSink implementation. |
| 194 void AppendRenderPass(scoped_ptr<RenderPass> render_pass) override; | 196 void AppendRenderPass(scoped_ptr<RenderPass> render_pass) override; |
| 195 }; | 197 }; |
| 196 | 198 |
| (...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 void SynchronouslyInitializeAllTiles(); | 508 void SynchronouslyInitializeAllTiles(); |
| 507 | 509 |
| 508 virtual scoped_ptr<Rasterizer> CreateRasterizer(); | 510 virtual scoped_ptr<Rasterizer> CreateRasterizer(); |
| 509 virtual void CreateResourceAndTileTaskWorkerPool( | 511 virtual void CreateResourceAndTileTaskWorkerPool( |
| 510 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, | 512 scoped_ptr<TileTaskWorkerPool>* tile_task_worker_pool, |
| 511 scoped_ptr<ResourcePool>* resource_pool, | 513 scoped_ptr<ResourcePool>* resource_pool, |
| 512 scoped_ptr<ResourcePool>* staging_resource_pool); | 514 scoped_ptr<ResourcePool>* staging_resource_pool); |
| 513 | 515 |
| 514 bool prepare_tiles_needed() const { return tile_priorities_dirty_; } | 516 bool prepare_tiles_needed() const { return tile_priorities_dirty_; } |
| 515 | 517 |
| 518 FrameTimingTracker* frame_timing_tracker() { |
| 519 return frame_timing_tracker_.get(); |
| 520 } |
| 521 |
| 516 protected: | 522 protected: |
| 517 LayerTreeHostImpl( | 523 LayerTreeHostImpl( |
| 518 const LayerTreeSettings& settings, | 524 const LayerTreeSettings& settings, |
| 519 LayerTreeHostImplClient* client, | 525 LayerTreeHostImplClient* client, |
| 520 Proxy* proxy, | 526 Proxy* proxy, |
| 521 RenderingStatsInstrumentation* rendering_stats_instrumentation, | 527 RenderingStatsInstrumentation* rendering_stats_instrumentation, |
| 522 SharedBitmapManager* shared_bitmap_manager, | 528 SharedBitmapManager* shared_bitmap_manager, |
| 523 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 529 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
| 524 int id); | 530 int id); |
| 525 | 531 |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 724 int id_; | 730 int id_; |
| 725 | 731 |
| 726 std::set<SwapPromiseMonitor*> swap_promise_monitor_; | 732 std::set<SwapPromiseMonitor*> swap_promise_monitor_; |
| 727 | 733 |
| 728 std::vector<PictureLayerImpl*> picture_layers_; | 734 std::vector<PictureLayerImpl*> picture_layers_; |
| 729 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; | 735 std::vector<PictureLayerImpl::Pair> picture_layer_pairs_; |
| 730 | 736 |
| 731 bool requires_high_res_to_draw_; | 737 bool requires_high_res_to_draw_; |
| 732 bool is_likely_to_require_a_draw_; | 738 bool is_likely_to_require_a_draw_; |
| 733 | 739 |
| 740 scoped_ptr<FrameTimingTracker> frame_timing_tracker_; |
| 741 |
| 734 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 742 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 735 }; | 743 }; |
| 736 | 744 |
| 737 } // namespace cc | 745 } // namespace cc |
| 738 | 746 |
| 739 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 747 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |