| 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 #include "cc/layers/layer_impl.h" | 5 #include "cc/layers/layer_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 layer->scroll_tree_index_ = scroll_tree_index_; | 337 layer->scroll_tree_index_ = scroll_tree_index_; |
| 338 layer->has_will_change_transform_hint_ = has_will_change_transform_hint_; | 338 layer->has_will_change_transform_hint_ = has_will_change_transform_hint_; |
| 339 layer->scrollbars_hidden_ = scrollbars_hidden_; | 339 layer->scrollbars_hidden_ = scrollbars_hidden_; |
| 340 layer->needs_show_scrollbars_ = needs_show_scrollbars_; | 340 layer->needs_show_scrollbars_ = needs_show_scrollbars_; |
| 341 | 341 |
| 342 if (layer_property_changed_) { | 342 if (layer_property_changed_) { |
| 343 layer->layer_tree_impl()->set_needs_update_draw_properties(); | 343 layer->layer_tree_impl()->set_needs_update_draw_properties(); |
| 344 layer->layer_property_changed_ = true; | 344 layer->layer_property_changed_ = true; |
| 345 } | 345 } |
| 346 | 346 |
| 347 layer->SetElementId(element_id_); |
| 347 layer->SetBounds(bounds_); | 348 layer->SetBounds(bounds_); |
| 348 layer->SetScrollClipLayer(scroll_clip_layer_id_); | 349 layer->SetScrollClipLayer(scroll_clip_layer_id_); |
| 349 layer->SetElementId(element_id_); | |
| 350 layer->SetMutableProperties(mutable_properties_); | 350 layer->SetMutableProperties(mutable_properties_); |
| 351 | 351 |
| 352 // If the main thread commits multiple times before the impl thread actually | 352 // If the main thread commits multiple times before the impl thread actually |
| 353 // draws, then damage tracking will become incorrect if we simply clobber the | 353 // draws, then damage tracking will become incorrect if we simply clobber the |
| 354 // update_rect here. The LayerImpl's update_rect needs to accumulate (i.e. | 354 // update_rect here. The LayerImpl's update_rect needs to accumulate (i.e. |
| 355 // union) any update changes that have occurred on the main thread. | 355 // union) any update changes that have occurred on the main thread. |
| 356 update_rect_.Union(layer->update_rect()); | 356 update_rect_.Union(layer->update_rect()); |
| 357 layer->SetUpdateRect(update_rect_); | 357 layer->SetUpdateRect(update_rect_); |
| 358 | 358 |
| 359 if (owned_debug_info_) | 359 if (owned_debug_info_) |
| (...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 974 | 974 |
| 975 ScrollTree& LayerImpl::GetScrollTree() const { | 975 ScrollTree& LayerImpl::GetScrollTree() const { |
| 976 return GetPropertyTrees()->scroll_tree; | 976 return GetPropertyTrees()->scroll_tree; |
| 977 } | 977 } |
| 978 | 978 |
| 979 TransformTree& LayerImpl::GetTransformTree() const { | 979 TransformTree& LayerImpl::GetTransformTree() const { |
| 980 return GetPropertyTrees()->transform_tree; | 980 return GetPropertyTrees()->transform_tree; |
| 981 } | 981 } |
| 982 | 982 |
| 983 } // namespace cc | 983 } // namespace cc |
| OLD | NEW |