| 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 <list> | 8 #include <list> |
| 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/containers/hash_tables.h" | 14 #include "base/containers/hash_tables.h" |
| 15 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 16 #include "base/time/time.h" | 16 #include "base/time/time.h" |
| 17 #include "cc/animation/animation_events.h" | 17 #include "cc/animation/animation_events.h" |
| 18 #include "cc/animation/animation_registrar.h" | 18 #include "cc/animation/animation_registrar.h" |
| 19 #include "cc/animation/scrollbar_animation_controller.h" | 19 #include "cc/animation/scrollbar_animation_controller.h" |
| 20 #include "cc/base/cc_export.h" | 20 #include "cc/base/cc_export.h" |
| 21 #include "cc/base/synced_property.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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 | 353 |
| 353 void SetViewportSize(const gfx::Size& device_viewport_size); | 354 void SetViewportSize(const gfx::Size& device_viewport_size); |
| 354 gfx::Size device_viewport_size() const { return device_viewport_size_; } | 355 gfx::Size device_viewport_size() const { return device_viewport_size_; } |
| 355 | 356 |
| 356 void SetOverhangUIResource(UIResourceId overhang_ui_resource_id, | 357 void SetOverhangUIResource(UIResourceId overhang_ui_resource_id, |
| 357 const gfx::Size& overhang_ui_resource_size); | 358 const gfx::Size& overhang_ui_resource_size); |
| 358 | 359 |
| 359 void SetDeviceScaleFactor(float device_scale_factor); | 360 void SetDeviceScaleFactor(float device_scale_factor); |
| 360 float device_scale_factor() const { return device_scale_factor_; } | 361 float device_scale_factor() const { return device_scale_factor_; } |
| 361 | 362 |
| 363 void SetPageScaleOnActiveTree(float page_scale_factor); |
| 364 |
| 362 const gfx::Transform& DrawTransform() const; | 365 const gfx::Transform& DrawTransform() const; |
| 363 | 366 |
| 364 scoped_ptr<ScrollAndScaleSet> ProcessScrollDeltas(); | 367 scoped_ptr<ScrollAndScaleSet> ProcessScrollDeltas(); |
| 365 | 368 |
| 366 bool needs_animate_layers() const { | 369 bool needs_animate_layers() const { |
| 367 return !animation_registrar_->active_animation_controllers().empty(); | 370 return !animation_registrar_->active_animation_controllers().empty(); |
| 368 } | 371 } |
| 369 | 372 |
| 370 void set_max_memory_needed_bytes(size_t bytes) { | 373 void set_max_memory_needed_bytes(size_t bytes) { |
| 371 max_memory_needed_bytes_ = bytes; | 374 max_memory_needed_bytes_ = bytes; |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 482 // to unregister itself. | 485 // to unregister itself. |
| 483 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor); | 486 void InsertSwapPromiseMonitor(SwapPromiseMonitor* monitor); |
| 484 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); | 487 void RemoveSwapPromiseMonitor(SwapPromiseMonitor* monitor); |
| 485 | 488 |
| 486 void RegisterPictureLayerImpl(PictureLayerImpl* layer); | 489 void RegisterPictureLayerImpl(PictureLayerImpl* layer); |
| 487 void UnregisterPictureLayerImpl(PictureLayerImpl* layer); | 490 void UnregisterPictureLayerImpl(PictureLayerImpl* layer); |
| 488 | 491 |
| 489 void GetPictureLayerImplPairs(std::vector<PictureLayerImpl::Pair>* layers, | 492 void GetPictureLayerImplPairs(std::vector<PictureLayerImpl::Pair>* layers, |
| 490 bool need_valid_tile_priorities) const; | 493 bool need_valid_tile_priorities) const; |
| 491 | 494 |
| 492 void SetTopControlsLayoutHeight(float height); | |
| 493 | |
| 494 void SetRequiresHighResToDraw() { requires_high_res_to_draw_ = true; } | 495 void SetRequiresHighResToDraw() { requires_high_res_to_draw_ = true; } |
| 495 void ResetRequiresHighResToDraw() { requires_high_res_to_draw_ = false; } | 496 void ResetRequiresHighResToDraw() { requires_high_res_to_draw_ = false; } |
| 496 bool RequiresHighResToDraw() const { return requires_high_res_to_draw_; } | 497 bool RequiresHighResToDraw() const { return requires_high_res_to_draw_; } |
| 497 | 498 |
| 498 // Only valid for synchronous (non-scheduled) single-threaded case. | 499 // Only valid for synchronous (non-scheduled) single-threaded case. |
| 499 void SynchronouslyInitializeAllTiles(); | 500 void SynchronouslyInitializeAllTiles(); |
| 500 | 501 |
| 501 virtual void CreateResourceAndRasterWorkerPool( | 502 virtual void CreateResourceAndRasterWorkerPool( |
| 502 scoped_ptr<RasterWorkerPool>* raster_worker_pool, | 503 scoped_ptr<RasterWorkerPool>* raster_worker_pool, |
| 503 scoped_ptr<ResourcePool>* resource_pool, | 504 scoped_ptr<ResourcePool>* resource_pool, |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 | 726 |
| 726 bool requires_high_res_to_draw_; | 727 bool requires_high_res_to_draw_; |
| 727 bool required_for_draw_tile_is_top_of_raster_queue_; | 728 bool required_for_draw_tile_is_top_of_raster_queue_; |
| 728 | 729 |
| 729 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); | 730 DISALLOW_COPY_AND_ASSIGN(LayerTreeHostImpl); |
| 730 }; | 731 }; |
| 731 | 732 |
| 732 } // namespace cc | 733 } // namespace cc |
| 733 | 734 |
| 734 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ | 735 #endif // CC_TREES_LAYER_TREE_HOST_IMPL_H_ |
| OLD | NEW |