| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_ |
| 6 #define CC_TREES_LAYER_TREE_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_IMPL_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 int source_frame_number() const { return source_frame_number_; } | 103 int source_frame_number() const { return source_frame_number_; } |
| 104 void set_source_frame_number(int frame_number) { | 104 void set_source_frame_number(int frame_number) { |
| 105 source_frame_number_ = frame_number; | 105 source_frame_number_ = frame_number; |
| 106 } | 106 } |
| 107 | 107 |
| 108 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; } | 108 HeadsUpDisplayLayerImpl* hud_layer() { return hud_layer_; } |
| 109 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { | 109 void set_hud_layer(HeadsUpDisplayLayerImpl* layer_impl) { |
| 110 hud_layer_ = layer_impl; | 110 hud_layer_ = layer_impl; |
| 111 } | 111 } |
| 112 | 112 |
| 113 LayerImpl* RootScrollLayer() const; | 113 LayerImpl* InnerViewportScrollLayer() const; |
| 114 // This function may return NULL, it is the caller's responsibility to check. |
| 115 LayerImpl* OuterViewportScrollLayer() const; |
| 116 gfx::Vector2dF TotalScrollOffset() const; |
| 117 gfx::Vector2dF TotalMaxScrollOffset() const; |
| 118 gfx::Vector2dF TotalScrollDelta() const; |
| 119 |
| 114 LayerImpl* RootContainerLayer() const; | 120 LayerImpl* RootContainerLayer() const; |
| 115 LayerImpl* CurrentlyScrollingLayer() const; | 121 LayerImpl* CurrentlyScrollingLayer() const; |
| 116 void SetCurrentlyScrollingLayer(LayerImpl* layer); | 122 void SetCurrentlyScrollingLayer(LayerImpl* layer); |
| 117 void ClearCurrentlyScrollingLayer(); | 123 void ClearCurrentlyScrollingLayer(); |
| 118 | 124 |
| 119 void FindRootScrollLayer(); | |
| 120 void UpdateMaxScrollOffset(); | |
| 121 void SetViewportLayersFromIds(int page_scale_layer_id, | 125 void SetViewportLayersFromIds(int page_scale_layer_id, |
| 122 int inner_viewport_scroll_layer_id, | 126 int inner_viewport_scroll_layer_id, |
| 123 int outer_viewport_scroll_layer_id); | 127 int outer_viewport_scroll_layer_id); |
| 124 void ClearViewportLayers(); | 128 void ClearViewportLayers(); |
| 129 LayerImpl* page_scale_layer() { return page_scale_layer_; } |
| 125 void ApplySentScrollAndScaleDeltasFromAbortedCommit(); | 130 void ApplySentScrollAndScaleDeltasFromAbortedCommit(); |
| 126 void ApplyScrollDeltasSinceBeginMainFrame(); | 131 void ApplyScrollDeltasSinceBeginMainFrame(); |
| 127 | 132 |
| 128 SkColor background_color() const { return background_color_; } | 133 SkColor background_color() const { return background_color_; } |
| 129 void set_background_color(SkColor color) { background_color_ = color; } | 134 void set_background_color(SkColor color) { background_color_ = color; } |
| 130 | 135 |
| 131 bool has_transparent_background() const { | 136 bool has_transparent_background() const { |
| 132 return has_transparent_background_; | 137 return has_transparent_background_; |
| 133 } | 138 } |
| 134 void set_has_transparent_background(bool transparent) { | 139 void set_has_transparent_background(bool transparent) { |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const; | 217 ResourceProvider::ResourceId ResourceIdForUIResource(UIResourceId uid) const; |
| 213 void ProcessUIResourceRequestQueue(); | 218 void ProcessUIResourceRequestQueue(); |
| 214 | 219 |
| 215 void AddLayerWithCopyOutputRequest(LayerImpl* layer); | 220 void AddLayerWithCopyOutputRequest(LayerImpl* layer); |
| 216 void RemoveLayerWithCopyOutputRequest(LayerImpl* layer); | 221 void RemoveLayerWithCopyOutputRequest(LayerImpl* layer); |
| 217 const std::vector<LayerImpl*> LayersWithCopyOutputRequest() const; | 222 const std::vector<LayerImpl*> LayersWithCopyOutputRequest() const; |
| 218 | 223 |
| 219 protected: | 224 protected: |
| 220 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); | 225 explicit LayerTreeImpl(LayerTreeHostImpl* layer_tree_host_impl); |
| 221 | 226 |
| 222 void UpdateSolidColorScrollbars(); | |
| 223 | |
| 224 void UpdateRootScrollLayerSizeDelta(); | 227 void UpdateRootScrollLayerSizeDelta(); |
| 225 | 228 |
| 226 LayerTreeHostImpl* layer_tree_host_impl_; | 229 LayerTreeHostImpl* layer_tree_host_impl_; |
| 227 int source_frame_number_; | 230 int source_frame_number_; |
| 228 scoped_ptr<LayerImpl> root_layer_; | 231 scoped_ptr<LayerImpl> root_layer_; |
| 229 HeadsUpDisplayLayerImpl* hud_layer_; | 232 HeadsUpDisplayLayerImpl* hud_layer_; |
| 230 LayerImpl* root_scroll_layer_; | |
| 231 LayerImpl* currently_scrolling_layer_; | 233 LayerImpl* currently_scrolling_layer_; |
| 232 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; | 234 LayerScrollOffsetDelegate* root_layer_scroll_offset_delegate_; |
| 233 SkColor background_color_; | 235 SkColor background_color_; |
| 234 bool has_transparent_background_; | 236 bool has_transparent_background_; |
| 235 | 237 |
| 236 LayerImpl* page_scale_layer_; | 238 LayerImpl* page_scale_layer_; |
| 237 LayerImpl* inner_viewport_scroll_layer_; | 239 LayerImpl* inner_viewport_scroll_layer_; |
| 238 LayerImpl* outer_viewport_scroll_layer_; | 240 LayerImpl* outer_viewport_scroll_layer_; |
| 239 | 241 |
| 240 float page_scale_factor_; | 242 float page_scale_factor_; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 269 | 271 |
| 270 UIResourceRequestQueue ui_resource_request_queue_; | 272 UIResourceRequestQueue ui_resource_request_queue_; |
| 271 | 273 |
| 272 private: | 274 private: |
| 273 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 275 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
| 274 }; | 276 }; |
| 275 | 277 |
| 276 } // namespace cc | 278 } // namespace cc |
| 277 | 279 |
| 278 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 280 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
| OLD | NEW |