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

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

Issue 2873313004: Harmonize LayerTreeHost/LayerTreeHostImpl synchronization steps (Closed)
Patch Set: Ace of rebase Created 3 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/trees/layer_tree_host.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 1158 matching lines...) Expand 10 before | Expand all | Expand 10 after
1169 layer->SetUseParentBackfaceVisibility(inputs_.use_parent_backface_visibility); 1169 layer->SetUseParentBackfaceVisibility(inputs_.use_parent_backface_visibility);
1170 layer->SetUseLocalTransformForBackfaceVisibility( 1170 layer->SetUseLocalTransformForBackfaceVisibility(
1171 use_local_transform_for_backface_visibility_); 1171 use_local_transform_for_backface_visibility_);
1172 layer->SetShouldCheckBackfaceVisibility(should_check_backface_visibility_); 1172 layer->SetShouldCheckBackfaceVisibility(should_check_backface_visibility_);
1173 1173
1174 layer->SetScrollClipLayer(inputs_.scroll_clip_layer_id); 1174 layer->SetScrollClipLayer(inputs_.scroll_clip_layer_id);
1175 layer->set_user_scrollable_horizontal(inputs_.user_scrollable_horizontal); 1175 layer->set_user_scrollable_horizontal(inputs_.user_scrollable_horizontal);
1176 layer->set_user_scrollable_vertical(inputs_.user_scrollable_vertical); 1176 layer->set_user_scrollable_vertical(inputs_.user_scrollable_vertical);
1177 layer->SetMutableProperties(inputs_.mutable_properties); 1177 layer->SetMutableProperties(inputs_.mutable_properties);
1178 1178
1179 // The property trees must be safe to access because they will be used below
1180 // to call |SetScrollOffsetClobberActiveValue|.
1181 DCHECK(layer->layer_tree_impl()->lifecycle().AllowsPropertyTreeAccess());
1182
1179 // When a scroll offset animation is interrupted the new scroll position on 1183 // When a scroll offset animation is interrupted the new scroll position on
1180 // the pending tree will clobber any impl-side scrolling occuring on the 1184 // the pending tree will clobber any impl-side scrolling occuring on the
1181 // active tree. To do so, avoid scrolling the pending tree along with it 1185 // active tree. To do so, avoid scrolling the pending tree along with it
1182 // instead of trying to undo that scrolling later. 1186 // instead of trying to undo that scrolling later.
1183 if (ScrollOffsetAnimationWasInterrupted()) 1187 if (ScrollOffsetAnimationWasInterrupted())
1184 layer->layer_tree_impl() 1188 layer->layer_tree_impl()
1185 ->property_trees() 1189 ->property_trees()
1186 ->scroll_tree.SetScrollOffsetClobberActiveValue(layer->id()); 1190 ->scroll_tree.SetScrollOffsetClobberActiveValue(layer->id());
1187 1191
1188 if (needs_show_scrollbars_) 1192 if (needs_show_scrollbars_)
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1424 ->subtree_has_copy_request; 1428 ->subtree_has_copy_request;
1425 } 1429 }
1426 1430
1427 gfx::Transform Layer::ScreenSpaceTransform() const { 1431 gfx::Transform Layer::ScreenSpaceTransform() const {
1428 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId); 1432 DCHECK_NE(transform_tree_index_, TransformTree::kInvalidNodeId);
1429 return draw_property_utils::ScreenSpaceTransform( 1433 return draw_property_utils::ScreenSpaceTransform(
1430 this, layer_tree_host_->property_trees()->transform_tree); 1434 this, layer_tree_host_->property_trees()->transform_tree);
1431 } 1435 }
1432 1436
1433 } // namespace cc 1437 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/trees/layer_tree_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698