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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 class Layer; | 53 class Layer; |
54 class LayerTreeHostClient; | 54 class LayerTreeHostClient; |
55 class LayerTreeHostImpl; | 55 class LayerTreeHostImpl; |
56 class LayerTreeHostImplClient; | 56 class LayerTreeHostImplClient; |
57 class LayerTreeHostSingleThreadClient; | 57 class LayerTreeHostSingleThreadClient; |
58 class LayerTreeMutator; | 58 class LayerTreeMutator; |
59 class MutatorEvents; | 59 class MutatorEvents; |
60 class MutatorHost; | 60 class MutatorHost; |
61 struct PendingPageScaleAnimation; | 61 struct PendingPageScaleAnimation; |
62 class RenderingStatsInstrumentation; | 62 class RenderingStatsInstrumentation; |
| 63 struct ScrollBoundaryBehavior; |
63 class TaskGraphRunner; | 64 class TaskGraphRunner; |
64 class UIResourceManager; | 65 class UIResourceManager; |
65 struct RenderingStats; | 66 struct RenderingStats; |
66 struct ScrollAndScaleSet; | 67 struct ScrollAndScaleSet; |
67 | 68 |
68 class CC_EXPORT LayerTreeHost : public viz::SurfaceReferenceOwner, | 69 class CC_EXPORT LayerTreeHost : public viz::SurfaceReferenceOwner, |
69 public MutatorHostClient { | 70 public MutatorHostClient { |
70 public: | 71 public: |
71 struct CC_EXPORT InitParams { | 72 struct CC_EXPORT InitParams { |
72 LayerTreeHostClient* client = nullptr; | 73 LayerTreeHostClient* client = nullptr; |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 | 287 |
287 void SetViewportSize( | 288 void SetViewportSize( |
288 const gfx::Size& device_viewport_size, | 289 const gfx::Size& device_viewport_size, |
289 const viz::LocalSurfaceId& local_surface_id = viz::LocalSurfaceId()); | 290 const viz::LocalSurfaceId& local_surface_id = viz::LocalSurfaceId()); |
290 gfx::Size device_viewport_size() const { return device_viewport_size_; } | 291 gfx::Size device_viewport_size() const { return device_viewport_size_; } |
291 | 292 |
292 void SetBrowserControlsHeight(float top_height, | 293 void SetBrowserControlsHeight(float top_height, |
293 float bottom_height, | 294 float bottom_height, |
294 bool shrink); | 295 bool shrink); |
295 void SetBrowserControlsShownRatio(float ratio); | 296 void SetBrowserControlsShownRatio(float ratio); |
| 297 void SetScrollBoundaryBehavior( |
| 298 const ScrollBoundaryBehavior& scroll_boundary_behavior); |
296 | 299 |
297 void SetPageScaleFactorAndLimits(float page_scale_factor, | 300 void SetPageScaleFactorAndLimits(float page_scale_factor, |
298 float min_page_scale_factor, | 301 float min_page_scale_factor, |
299 float max_page_scale_factor); | 302 float max_page_scale_factor); |
300 float page_scale_factor() const { return page_scale_factor_; } | 303 float page_scale_factor() const { return page_scale_factor_; } |
301 float min_page_scale_factor() const { return min_page_scale_factor_; } | 304 float min_page_scale_factor() const { return min_page_scale_factor_; } |
302 float max_page_scale_factor() const { return max_page_scale_factor_; } | 305 float max_page_scale_factor() const { return max_page_scale_factor_; } |
303 | 306 |
304 void set_background_color(SkColor color) { background_color_ = color; } | 307 void set_background_color(SkColor color) { background_color_ = color; } |
305 SkColor background_color() const { return background_color_; } | 308 SkColor background_color() const { return background_color_; } |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 viz::SurfaceSequenceGenerator surface_sequence_generator_; | 602 viz::SurfaceSequenceGenerator surface_sequence_generator_; |
600 uint32_t num_consecutive_frames_without_slow_paths_ = 0; | 603 uint32_t num_consecutive_frames_without_slow_paths_ = 0; |
601 | 604 |
602 scoped_refptr<Layer> root_layer_; | 605 scoped_refptr<Layer> root_layer_; |
603 | 606 |
604 ViewportLayers viewport_layers_; | 607 ViewportLayers viewport_layers_; |
605 | 608 |
606 float top_controls_height_ = 0.f; | 609 float top_controls_height_ = 0.f; |
607 float top_controls_shown_ratio_ = 0.f; | 610 float top_controls_shown_ratio_ = 0.f; |
608 bool browser_controls_shrink_blink_size_ = false; | 611 bool browser_controls_shrink_blink_size_ = false; |
| 612 ScrollBoundaryBehavior scroll_boundary_behavior_; |
609 | 613 |
610 float bottom_controls_height_ = 0.f; | 614 float bottom_controls_height_ = 0.f; |
611 | 615 |
612 float device_scale_factor_ = 1.f; | 616 float device_scale_factor_ = 1.f; |
613 float painted_device_scale_factor_ = 1.f; | 617 float painted_device_scale_factor_ = 1.f; |
614 float recording_scale_factor_ = 1.f; | 618 float recording_scale_factor_ = 1.f; |
615 float page_scale_factor_ = 1.f; | 619 float page_scale_factor_ = 1.f; |
616 float min_page_scale_factor_ = 1.f; | 620 float min_page_scale_factor_ = 1.f; |
617 float max_page_scale_factor_ = 1.f; | 621 float max_page_scale_factor_ = 1.f; |
618 gfx::ColorSpace raster_color_space_; | 622 gfx::ColorSpace raster_color_space_; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 | 671 |
668 std::vector<std::pair<PaintImage, base::Callback<void(bool)>>> | 672 std::vector<std::pair<PaintImage, base::Callback<void(bool)>>> |
669 queued_image_decodes_; | 673 queued_image_decodes_; |
670 | 674 |
671 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 675 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
672 }; | 676 }; |
673 | 677 |
674 } // namespace cc | 678 } // namespace cc |
675 | 679 |
676 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 680 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |