| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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_H_ | 5 #ifndef CC_TREES_LAYER_TREE_H_ |
| 6 #define CC_TREES_LAYER_TREE_H_ | 6 #define CC_TREES_LAYER_TREE_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <unordered_map> | 9 #include <unordered_map> |
| 10 #include <unordered_set> | 10 #include <unordered_set> |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 Layer* page_scale_layer() const { return inputs_.page_scale_layer.get(); } | 69 Layer* page_scale_layer() const { return inputs_.page_scale_layer.get(); } |
| 70 Layer* inner_viewport_scroll_layer() const { | 70 Layer* inner_viewport_scroll_layer() const { |
| 71 return inputs_.inner_viewport_scroll_layer.get(); | 71 return inputs_.inner_viewport_scroll_layer.get(); |
| 72 } | 72 } |
| 73 Layer* outer_viewport_scroll_layer() const { | 73 Layer* outer_viewport_scroll_layer() const { |
| 74 return inputs_.outer_viewport_scroll_layer.get(); | 74 return inputs_.outer_viewport_scroll_layer.get(); |
| 75 } | 75 } |
| 76 | 76 |
| 77 void RegisterSelection(const LayerSelection& selection); | 77 void RegisterSelection(const LayerSelection& selection); |
| 78 const LayerSelection& selection() const { return inputs_.selection; } |
| 78 | 79 |
| 79 void SetHaveScrollEventHandlers(bool have_event_handlers); | 80 void SetHaveScrollEventHandlers(bool have_event_handlers); |
| 80 bool have_scroll_event_handlers() const { | 81 bool have_scroll_event_handlers() const { |
| 81 return inputs_.have_scroll_event_handlers; | 82 return inputs_.have_scroll_event_handlers; |
| 82 } | 83 } |
| 83 | 84 |
| 84 void SetEventListenerProperties(EventListenerClass event_class, | 85 void SetEventListenerProperties(EventListenerClass event_class, |
| 85 EventListenerProperties event_properties); | 86 EventListenerProperties event_properties); |
| 86 EventListenerProperties event_listener_properties( | 87 EventListenerProperties event_listener_properties( |
| 87 EventListenerClass event_class) const { | 88 EventListenerClass event_class) const { |
| (...skipping 15 matching lines...) Expand all Loading... |
| 103 float page_scale_factor() const { return inputs_.page_scale_factor; } | 104 float page_scale_factor() const { return inputs_.page_scale_factor; } |
| 104 float min_page_scale_factor() const { return inputs_.min_page_scale_factor; } | 105 float min_page_scale_factor() const { return inputs_.min_page_scale_factor; } |
| 105 float max_page_scale_factor() const { return inputs_.max_page_scale_factor; } | 106 float max_page_scale_factor() const { return inputs_.max_page_scale_factor; } |
| 106 | 107 |
| 107 void set_background_color(SkColor color) { inputs_.background_color = color; } | 108 void set_background_color(SkColor color) { inputs_.background_color = color; } |
| 108 SkColor background_color() const { return inputs_.background_color; } | 109 SkColor background_color() const { return inputs_.background_color; } |
| 109 | 110 |
| 110 void set_has_transparent_background(bool transparent) { | 111 void set_has_transparent_background(bool transparent) { |
| 111 inputs_.has_transparent_background = transparent; | 112 inputs_.has_transparent_background = transparent; |
| 112 } | 113 } |
| 114 bool has_transparent_background() const { |
| 115 return inputs_.has_transparent_background; |
| 116 } |
| 113 | 117 |
| 114 void StartPageScaleAnimation(const gfx::Vector2d& target_offset, | 118 void StartPageScaleAnimation(const gfx::Vector2d& target_offset, |
| 115 bool use_anchor, | 119 bool use_anchor, |
| 116 float scale, | 120 float scale, |
| 117 base::TimeDelta duration); | 121 base::TimeDelta duration); |
| 118 bool HasPendingPageScaleAnimation() const; | 122 bool HasPendingPageScaleAnimation() const; |
| 119 | 123 |
| 120 void SetDeviceScaleFactor(float device_scale_factor); | 124 void SetDeviceScaleFactor(float device_scale_factor); |
| 121 float device_scale_factor() const { return inputs_.device_scale_factor; } | 125 float device_scale_factor() const { return inputs_.device_scale_factor; } |
| 122 | 126 |
| 123 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor); | 127 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor); |
| 128 float painted_device_scale_factor() const { |
| 129 return inputs_.painted_device_scale_factor; |
| 130 } |
| 124 | 131 |
| 125 void SetDeviceColorSpace(const gfx::ColorSpace& device_color_space); | 132 void SetDeviceColorSpace(const gfx::ColorSpace& device_color_space); |
| 126 const gfx::ColorSpace& device_color_space() const { | 133 const gfx::ColorSpace& device_color_space() const { |
| 127 return inputs_.device_color_space; | 134 return inputs_.device_color_space; |
| 128 } | 135 } |
| 129 | 136 |
| 130 // Used externally by blink for setting the PropertyTrees when | 137 // Used externally by blink for setting the PropertyTrees when |
| 131 // |settings_.use_layer_lists| is true. This is a SPV2 setting. | 138 // |settings_.use_layer_lists| is true. This is a SPV2 setting. |
| 132 PropertyTrees* property_trees() { return &property_trees_; } | 139 PropertyTrees* property_trees() { return &property_trees_; } |
| 133 | 140 |
| (...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 307 // external embedder. | 314 // external embedder. |
| 308 EnginePictureCache* engine_picture_cache_; | 315 EnginePictureCache* engine_picture_cache_; |
| 309 ClientPictureCache* client_picture_cache_; | 316 ClientPictureCache* client_picture_cache_; |
| 310 | 317 |
| 311 DISALLOW_COPY_AND_ASSIGN(LayerTree); | 318 DISALLOW_COPY_AND_ASSIGN(LayerTree); |
| 312 }; | 319 }; |
| 313 | 320 |
| 314 } // namespace cc | 321 } // namespace cc |
| 315 | 322 |
| 316 #endif // CC_TREES_LAYER_TREE_H_ | 323 #endif // CC_TREES_LAYER_TREE_H_ |
| OLD | NEW |