| OLD | NEW |
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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.h" | 5 #include "cc/layers/layer.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 1139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 layer->SetBackgroundFilters(background_filters()); | 1150 layer->SetBackgroundFilters(background_filters()); |
| 1151 layer->SetMasksToBounds(masks_to_bounds_); | 1151 layer->SetMasksToBounds(masks_to_bounds_); |
| 1152 layer->set_main_thread_scrolling_reasons(main_thread_scrolling_reasons_); | 1152 layer->set_main_thread_scrolling_reasons(main_thread_scrolling_reasons_); |
| 1153 layer->SetNonFastScrollableRegion(non_fast_scrollable_region_); | 1153 layer->SetNonFastScrollableRegion(non_fast_scrollable_region_); |
| 1154 layer->SetTouchEventHandlerRegion(touch_event_handler_region_); | 1154 layer->SetTouchEventHandlerRegion(touch_event_handler_region_); |
| 1155 layer->SetContentsOpaque(contents_opaque_); | 1155 layer->SetContentsOpaque(contents_opaque_); |
| 1156 if (!layer->OpacityIsAnimatingOnImplOnly() && !OpacityIsAnimating()) | 1156 if (!layer->OpacityIsAnimatingOnImplOnly() && !OpacityIsAnimating()) |
| 1157 layer->SetOpacity(opacity_); | 1157 layer->SetOpacity(opacity_); |
| 1158 DCHECK(!(OpacityIsAnimating() && layer->OpacityIsAnimatingOnImplOnly())); | 1158 DCHECK(!(OpacityIsAnimating() && layer->OpacityIsAnimatingOnImplOnly())); |
| 1159 layer->SetBlendMode(blend_mode_); | 1159 layer->SetBlendMode(blend_mode_); |
| 1160 layer->SetIsRootForIsolatedGroup(is_root_for_isolated_group_); | |
| 1161 layer->SetPosition(position_); | 1160 layer->SetPosition(position_); |
| 1162 layer->SetIsContainerForFixedPositionLayers( | |
| 1163 IsContainerForFixedPositionLayers()); | |
| 1164 layer->SetPositionConstraint(position_constraint_); | |
| 1165 layer->SetShouldFlattenTransform(should_flatten_transform_); | |
| 1166 layer->set_should_flatten_transform_from_property_tree( | 1161 layer->set_should_flatten_transform_from_property_tree( |
| 1167 should_flatten_transform_from_property_tree_); | 1162 should_flatten_transform_from_property_tree_); |
| 1168 layer->set_draw_blend_mode(draw_blend_mode_); | 1163 layer->set_draw_blend_mode(draw_blend_mode_); |
| 1169 layer->SetUseParentBackfaceVisibility(use_parent_backface_visibility_); | 1164 layer->SetUseParentBackfaceVisibility(use_parent_backface_visibility_); |
| 1170 layer->SetUseLocalTransformForBackfaceVisibility( | 1165 layer->SetUseLocalTransformForBackfaceVisibility( |
| 1171 use_local_transform_for_backface_visibility_); | 1166 use_local_transform_for_backface_visibility_); |
| 1172 layer->SetShouldCheckBackfaceVisibility(should_check_backface_visibility_); | 1167 layer->SetShouldCheckBackfaceVisibility(should_check_backface_visibility_); |
| 1173 if (!layer->TransformIsAnimatingOnImplOnly() && !TransformIsAnimating()) | 1168 if (!layer->TransformIsAnimatingOnImplOnly() && !TransformIsAnimating()) |
| 1174 layer->SetTransformAndInvertibility(transform_, transform_is_invertible_); | 1169 layer->SetTransform(transform_); |
| 1175 DCHECK(!(TransformIsAnimating() && layer->TransformIsAnimatingOnImplOnly())); | 1170 DCHECK(!(TransformIsAnimating() && layer->TransformIsAnimatingOnImplOnly())); |
| 1176 layer->Set3dSortingContextId(sorting_context_id_); | 1171 layer->Set3dSortingContextId(sorting_context_id_); |
| 1177 layer->SetNumDescendantsThatDrawContent(num_descendants_that_draw_content_); | |
| 1178 | 1172 |
| 1179 layer->SetScrollClipLayer(scroll_clip_layer_id_); | 1173 layer->SetScrollClipLayer(scroll_clip_layer_id_); |
| 1180 layer->set_user_scrollable_horizontal(user_scrollable_horizontal_); | 1174 layer->set_user_scrollable_horizontal(user_scrollable_horizontal_); |
| 1181 layer->set_user_scrollable_vertical(user_scrollable_vertical_); | 1175 layer->set_user_scrollable_vertical(user_scrollable_vertical_); |
| 1182 layer->SetElementId(element_id_); | 1176 layer->SetElementId(element_id_); |
| 1183 layer->SetMutableProperties(mutable_properties_); | 1177 layer->SetMutableProperties(mutable_properties_); |
| 1184 | 1178 |
| 1185 LayerImpl* scroll_parent = nullptr; | 1179 LayerImpl* scroll_parent = nullptr; |
| 1186 if (scroll_parent_) { | 1180 if (scroll_parent_) { |
| 1187 scroll_parent = layer->layer_tree_impl()->LayerById(scroll_parent_->id()); | 1181 scroll_parent = layer->layer_tree_impl()->LayerById(scroll_parent_->id()); |
| (...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1817 ->data.num_copy_requests_in_subtree; | 1811 ->data.num_copy_requests_in_subtree; |
| 1818 } | 1812 } |
| 1819 | 1813 |
| 1820 gfx::Transform Layer::screen_space_transform() const { | 1814 gfx::Transform Layer::screen_space_transform() const { |
| 1821 DCHECK_NE(transform_tree_index_, -1); | 1815 DCHECK_NE(transform_tree_index_, -1); |
| 1822 return draw_property_utils::ScreenSpaceTransform( | 1816 return draw_property_utils::ScreenSpaceTransform( |
| 1823 this, layer_tree_host_->property_trees()->transform_tree); | 1817 this, layer_tree_host_->property_trees()->transform_tree); |
| 1824 } | 1818 } |
| 1825 | 1819 |
| 1826 } // namespace cc | 1820 } // namespace cc |
| OLD | NEW |