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 1145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1156 layer->SetTouchEventHandlerRegion(inputs_.touch_event_handler_region); | 1156 layer->SetTouchEventHandlerRegion(inputs_.touch_event_handler_region); |
1157 layer->SetContentsOpaque(inputs_.contents_opaque); | 1157 layer->SetContentsOpaque(inputs_.contents_opaque); |
1158 layer->SetPosition(inputs_.position); | 1158 layer->SetPosition(inputs_.position); |
1159 layer->set_should_flatten_transform_from_property_tree( | 1159 layer->set_should_flatten_transform_from_property_tree( |
1160 should_flatten_transform_from_property_tree_); | 1160 should_flatten_transform_from_property_tree_); |
1161 layer->set_draw_blend_mode(draw_blend_mode_); | 1161 layer->set_draw_blend_mode(draw_blend_mode_); |
1162 layer->SetUseParentBackfaceVisibility(inputs_.use_parent_backface_visibility); | 1162 layer->SetUseParentBackfaceVisibility(inputs_.use_parent_backface_visibility); |
1163 layer->SetUseLocalTransformForBackfaceVisibility( | 1163 layer->SetUseLocalTransformForBackfaceVisibility( |
1164 use_local_transform_for_backface_visibility_); | 1164 use_local_transform_for_backface_visibility_); |
1165 layer->SetShouldCheckBackfaceVisibility(should_check_backface_visibility_); | 1165 layer->SetShouldCheckBackfaceVisibility(should_check_backface_visibility_); |
1166 if (!TransformIsAnimating()) | |
1167 layer->SetTransform(inputs_.transform); | |
1168 layer->Set3dSortingContextId(inputs_.sorting_context_id); | 1166 layer->Set3dSortingContextId(inputs_.sorting_context_id); |
1169 | 1167 |
1170 layer->SetScrollClipLayer(inputs_.scroll_clip_layer_id); | 1168 layer->SetScrollClipLayer(inputs_.scroll_clip_layer_id); |
1171 layer->set_user_scrollable_horizontal(inputs_.user_scrollable_horizontal); | 1169 layer->set_user_scrollable_horizontal(inputs_.user_scrollable_horizontal); |
1172 layer->set_user_scrollable_vertical(inputs_.user_scrollable_vertical); | 1170 layer->set_user_scrollable_vertical(inputs_.user_scrollable_vertical); |
1173 layer->SetElementId(inputs_.element_id); | 1171 layer->SetElementId(inputs_.element_id); |
1174 layer->SetMutableProperties(inputs_.mutable_properties); | 1172 layer->SetMutableProperties(inputs_.mutable_properties); |
1175 | 1173 |
1176 // When a scroll offset animation is interrupted the new scroll position on | 1174 // When a scroll offset animation is interrupted the new scroll position on |
1177 // the pending tree will clobber any impl-side scrolling occuring on the | 1175 // the pending tree will clobber any impl-side scrolling occuring on the |
(...skipping 704 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1882 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); | 1880 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); |
1883 return draw_property_utils::ScreenSpaceTransform( | 1881 return draw_property_utils::ScreenSpaceTransform( |
1884 this, layer_tree_host_->property_trees()->transform_tree); | 1882 this, layer_tree_host_->property_trees()->transform_tree); |
1885 } | 1883 } |
1886 | 1884 |
1887 LayerTree* Layer::GetLayerTree() const { | 1885 LayerTree* Layer::GetLayerTree() const { |
1888 return layer_tree_; | 1886 return layer_tree_; |
1889 } | 1887 } |
1890 | 1888 |
1891 } // namespace cc | 1889 } // namespace cc |
OLD | NEW |