Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(779)

Side by Side Diff: cc/layers/layer.cc

Issue 1981283005: cc : Delete Opacity/Transform/FilterIsAnimatingOnImplOnly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | cc/layers/layer_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 layer->SetTransformTreeIndex(transform_tree_index()); 1146 layer->SetTransformTreeIndex(transform_tree_index());
1147 layer->SetEffectTreeIndex(effect_tree_index()); 1147 layer->SetEffectTreeIndex(effect_tree_index());
1148 layer->SetClipTreeIndex(clip_tree_index()); 1148 layer->SetClipTreeIndex(clip_tree_index());
1149 layer->SetScrollTreeIndex(scroll_tree_index()); 1149 layer->SetScrollTreeIndex(scroll_tree_index());
1150 layer->set_offset_to_transform_parent(offset_to_transform_parent_); 1150 layer->set_offset_to_transform_parent(offset_to_transform_parent_);
1151 layer->SetDrawsContent(DrawsContent()); 1151 layer->SetDrawsContent(DrawsContent());
1152 // subtree_property_changed_ is propagated to all descendants while building 1152 // subtree_property_changed_ is propagated to all descendants while building
1153 // property trees. So, it is enough to check it only for the current layer. 1153 // property trees. So, it is enough to check it only for the current layer.
1154 if (subtree_property_changed_) 1154 if (subtree_property_changed_)
1155 layer->NoteLayerPropertyChanged(); 1155 layer->NoteLayerPropertyChanged();
1156 if (!layer->FilterIsAnimatingOnImplOnly() && !FilterIsAnimating()) 1156 if (!FilterIsAnimating())
1157 layer->SetFilters(filters_); 1157 layer->SetFilters(filters_);
1158 DCHECK(!(FilterIsAnimating() && layer->FilterIsAnimatingOnImplOnly()));
1159 layer->SetBackgroundFilters(background_filters()); 1158 layer->SetBackgroundFilters(background_filters());
1160 layer->SetMasksToBounds(masks_to_bounds_); 1159 layer->SetMasksToBounds(masks_to_bounds_);
1161 layer->set_main_thread_scrolling_reasons(main_thread_scrolling_reasons_); 1160 layer->set_main_thread_scrolling_reasons(main_thread_scrolling_reasons_);
1162 layer->SetNonFastScrollableRegion(non_fast_scrollable_region_); 1161 layer->SetNonFastScrollableRegion(non_fast_scrollable_region_);
1163 layer->SetTouchEventHandlerRegion(touch_event_handler_region_); 1162 layer->SetTouchEventHandlerRegion(touch_event_handler_region_);
1164 layer->SetContentsOpaque(contents_opaque_); 1163 layer->SetContentsOpaque(contents_opaque_);
1165 if (!layer->OpacityIsAnimatingOnImplOnly() && !OpacityIsAnimating()) 1164 if (!OpacityIsAnimating())
1166 layer->SetOpacity(opacity_); 1165 layer->SetOpacity(opacity_);
1167 DCHECK(!(OpacityIsAnimating() && layer->OpacityIsAnimatingOnImplOnly()));
1168 layer->SetBlendMode(blend_mode_); 1166 layer->SetBlendMode(blend_mode_);
1169 layer->SetPosition(position_); 1167 layer->SetPosition(position_);
1170 layer->set_should_flatten_transform_from_property_tree( 1168 layer->set_should_flatten_transform_from_property_tree(
1171 should_flatten_transform_from_property_tree_); 1169 should_flatten_transform_from_property_tree_);
1172 layer->set_draw_blend_mode(draw_blend_mode_); 1170 layer->set_draw_blend_mode(draw_blend_mode_);
1173 layer->SetUseParentBackfaceVisibility(use_parent_backface_visibility_); 1171 layer->SetUseParentBackfaceVisibility(use_parent_backface_visibility_);
1174 layer->SetUseLocalTransformForBackfaceVisibility( 1172 layer->SetUseLocalTransformForBackfaceVisibility(
1175 use_local_transform_for_backface_visibility_); 1173 use_local_transform_for_backface_visibility_);
1176 layer->SetShouldCheckBackfaceVisibility(should_check_backface_visibility_); 1174 layer->SetShouldCheckBackfaceVisibility(should_check_backface_visibility_);
1177 if (!layer->TransformIsAnimatingOnImplOnly() && !TransformIsAnimating()) 1175 if (!TransformIsAnimating())
1178 layer->SetTransform(transform_); 1176 layer->SetTransform(transform_);
1179 DCHECK(!(TransformIsAnimating() && layer->TransformIsAnimatingOnImplOnly()));
1180 layer->Set3dSortingContextId(sorting_context_id_); 1177 layer->Set3dSortingContextId(sorting_context_id_);
1181 1178
1182 layer->SetScrollClipLayer(scroll_clip_layer_id_); 1179 layer->SetScrollClipLayer(scroll_clip_layer_id_);
1183 layer->set_user_scrollable_horizontal(user_scrollable_horizontal_); 1180 layer->set_user_scrollable_horizontal(user_scrollable_horizontal_);
1184 layer->set_user_scrollable_vertical(user_scrollable_vertical_); 1181 layer->set_user_scrollable_vertical(user_scrollable_vertical_);
1185 layer->SetElementId(element_id_); 1182 layer->SetElementId(element_id_);
1186 layer->SetMutableProperties(mutable_properties_); 1183 layer->SetMutableProperties(mutable_properties_);
1187 1184
1188 // When a scroll offset animation is interrupted the new scroll position on 1185 // When a scroll offset animation is interrupted the new scroll position on
1189 // the pending tree will clobber any impl-side scrolling occuring on the 1186 // the pending tree will clobber any impl-side scrolling occuring on the
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1786 ->data.num_copy_requests_in_subtree; 1783 ->data.num_copy_requests_in_subtree;
1787 } 1784 }
1788 1785
1789 gfx::Transform Layer::screen_space_transform() const { 1786 gfx::Transform Layer::screen_space_transform() const {
1790 DCHECK_NE(transform_tree_index_, -1); 1787 DCHECK_NE(transform_tree_index_, -1);
1791 return draw_property_utils::ScreenSpaceTransform( 1788 return draw_property_utils::ScreenSpaceTransform(
1792 this, layer_tree_host_->property_trees()->transform_tree); 1789 this, layer_tree_host_->property_trees()->transform_tree);
1793 } 1790 }
1794 1791
1795 } // namespace cc 1792 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698