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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 class Layer; | 51 class Layer; |
52 class LayerTreeHostClient; | 52 class LayerTreeHostClient; |
53 class LayerTreeHostImpl; | 53 class LayerTreeHostImpl; |
54 class LayerTreeHostImplClient; | 54 class LayerTreeHostImplClient; |
55 class LayerTreeHostSingleThreadClient; | 55 class LayerTreeHostSingleThreadClient; |
56 class LayerTreeMutator; | 56 class LayerTreeMutator; |
57 class MutatorEvents; | 57 class MutatorEvents; |
58 class MutatorHost; | 58 class MutatorHost; |
59 struct PendingPageScaleAnimation; | 59 struct PendingPageScaleAnimation; |
60 class RenderingStatsInstrumentation; | 60 class RenderingStatsInstrumentation; |
| 61 struct ScrollBoundaryBehavior; |
61 class TaskGraphRunner; | 62 class TaskGraphRunner; |
62 class UIResourceManager; | 63 class UIResourceManager; |
63 struct RenderingStats; | 64 struct RenderingStats; |
64 struct ScrollAndScaleSet; | 65 struct ScrollAndScaleSet; |
65 | 66 |
66 class CC_EXPORT LayerTreeHost : public NON_EXPORTED_BASE(SurfaceReferenceOwner), | 67 class CC_EXPORT LayerTreeHost : public NON_EXPORTED_BASE(SurfaceReferenceOwner), |
67 public NON_EXPORTED_BASE(MutatorHostClient) { | 68 public NON_EXPORTED_BASE(MutatorHostClient) { |
68 public: | 69 public: |
69 struct CC_EXPORT InitParams { | 70 struct CC_EXPORT InitParams { |
70 LayerTreeHostClient* client = nullptr; | 71 LayerTreeHostClient* client = nullptr; |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 EventListenerClass event_class) const { | 282 EventListenerClass event_class) const { |
282 return event_listener_properties_[static_cast<size_t>(event_class)]; | 283 return event_listener_properties_[static_cast<size_t>(event_class)]; |
283 } | 284 } |
284 | 285 |
285 void SetViewportSize(const gfx::Size& device_viewport_size); | 286 void SetViewportSize(const gfx::Size& device_viewport_size); |
286 gfx::Size device_viewport_size() const { return device_viewport_size_; } | 287 gfx::Size device_viewport_size() const { return device_viewport_size_; } |
287 | 288 |
288 void SetBrowserControlsHeight(float height, bool shrink); | 289 void SetBrowserControlsHeight(float height, bool shrink); |
289 void SetBrowserControlsShownRatio(float ratio); | 290 void SetBrowserControlsShownRatio(float ratio); |
290 void SetBottomControlsHeight(float height); | 291 void SetBottomControlsHeight(float height); |
| 292 void SetScrollBoundaryBehavior( |
| 293 const ScrollBoundaryBehavior& scroll_boundary_behavior); |
291 | 294 |
292 void SetPageScaleFactorAndLimits(float page_scale_factor, | 295 void SetPageScaleFactorAndLimits(float page_scale_factor, |
293 float min_page_scale_factor, | 296 float min_page_scale_factor, |
294 float max_page_scale_factor); | 297 float max_page_scale_factor); |
295 float page_scale_factor() const { return page_scale_factor_; } | 298 float page_scale_factor() const { return page_scale_factor_; } |
296 float min_page_scale_factor() const { return min_page_scale_factor_; } | 299 float min_page_scale_factor() const { return min_page_scale_factor_; } |
297 float max_page_scale_factor() const { return max_page_scale_factor_; } | 300 float max_page_scale_factor() const { return max_page_scale_factor_; } |
298 | 301 |
299 void set_background_color(SkColor color) { background_color_ = color; } | 302 void set_background_color(SkColor color) { background_color_ = color; } |
300 SkColor background_color() const { return background_color_; } | 303 SkColor background_color() const { return background_color_; } |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 SurfaceSequenceGenerator surface_sequence_generator_; | 583 SurfaceSequenceGenerator surface_sequence_generator_; |
581 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0; | 584 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0; |
582 | 585 |
583 scoped_refptr<Layer> root_layer_; | 586 scoped_refptr<Layer> root_layer_; |
584 | 587 |
585 ViewportLayers viewport_layers_; | 588 ViewportLayers viewport_layers_; |
586 | 589 |
587 float top_controls_height_ = 0.f; | 590 float top_controls_height_ = 0.f; |
588 float top_controls_shown_ratio_ = 0.f; | 591 float top_controls_shown_ratio_ = 0.f; |
589 bool browser_controls_shrink_blink_size_ = false; | 592 bool browser_controls_shrink_blink_size_ = false; |
| 593 ScrollBoundaryBehavior scroll_boundary_behavior_; |
590 | 594 |
591 float bottom_controls_height_ = 0.f; | 595 float bottom_controls_height_ = 0.f; |
592 | 596 |
593 float device_scale_factor_ = 1.f; | 597 float device_scale_factor_ = 1.f; |
594 float painted_device_scale_factor_ = 1.f; | 598 float painted_device_scale_factor_ = 1.f; |
595 float page_scale_factor_ = 1.f; | 599 float page_scale_factor_ = 1.f; |
596 float min_page_scale_factor_ = 1.f; | 600 float min_page_scale_factor_ = 1.f; |
597 float max_page_scale_factor_ = 1.f; | 601 float max_page_scale_factor_ = 1.f; |
598 gfx::ColorSpace raster_color_space_; | 602 gfx::ColorSpace raster_color_space_; |
599 | 603 |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 | 650 |
647 std::vector<std::pair<PaintImage, base::Callback<void(bool)>>> | 651 std::vector<std::pair<PaintImage, base::Callback<void(bool)>>> |
648 queued_image_decodes_; | 652 queued_image_decodes_; |
649 | 653 |
650 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 654 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
651 }; | 655 }; |
652 | 656 |
653 } // namespace cc | 657 } // namespace cc |
654 | 658 |
655 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 659 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |