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

Unified Diff: cc/layers/layer.cc

Issue 2929873002: Shifting layer position for sticky element to avoid passing unnessary variable to cc (Closed)
Patch Set: Bug fix Created 3 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl_test_properties.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/layer.cc
diff --git a/cc/layers/layer.cc b/cc/layers/layer.cc
index 390d5d5163ed878bc371a0e84fb710092ba23f87..2b631c60afc942a6f4a42f3c1a2cf9f75e511dda 100644
--- a/cc/layers/layer.cc
+++ b/cc/layers/layer.cc
@@ -1110,31 +1110,6 @@ void Layer::SetStickyPositionConstraint(
SetNeedsCommit();
}
-void Layer::SetOffsetForStickyPositionFromMainThread(const gfx::Size& offset) {
- DCHECK(IsPropertyChangeAllowed());
- if (inputs_.offset_for_sticky_position_from_main_thread == offset)
- return;
- inputs_.offset_for_sticky_position_from_main_thread = offset;
-
- if (!layer_tree_host_)
- return;
-
- SetSubtreePropertyChanged();
- PropertyTrees* property_trees = layer_tree_host_->property_trees();
- if (TransformNode* transform_node =
- property_trees->transform_tree.FindNodeFromElementId(
- inputs_.element_id)) {
- DCHECK_EQ(transform_tree_index(), transform_node->id);
- transform_node->offset_for_sticky_position_from_main_thread =
- gfx::Vector2dF(offset.width(), offset.height());
- transform_node->needs_local_transform_update = true;
- transform_node->transform_changed = true;
- layer_tree_host_->property_trees()->transform_tree.set_needs_update(true);
- }
-
- SetNeedsCommit();
-}
-
static void RunCopyCallbackOnMainThread(
std::unique_ptr<CopyOutputRequest> request,
std::unique_ptr<CopyOutputResult> result) {
« no previous file with comments | « cc/layers/layer.h ('k') | cc/layers/layer_impl_test_properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698