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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 2349713002: [cc] Remove unused parameter to DidUpdateScrollOffset (Closed)
Patch Set: address reviewer comments. Created 4 years, 3 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/trees/layer_tree_impl.h ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index 1376cdf6b5ec4b19aebd7f1168b88c25d401f620..88f47dd53a8b95c46def336b1485cdafd30fab51 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -144,18 +144,19 @@ bool LayerTreeImpl::IsViewportLayerId(int id) const {
return false;
}
-// TODO(sunxd): when we have a layer_id to property_tree index map in property
-// trees, use the transform_id parameter instead of looking for indices from
-// LayerImpls.
-void LayerTreeImpl::DidUpdateScrollOffset(int layer_id, int transform_id) {
+void LayerTreeImpl::DidUpdateScrollOffset(int layer_id) {
DidUpdateScrollState(layer_id);
TransformTree& transform_tree = property_trees()->transform_tree;
ScrollTree& scroll_tree = property_trees()->scroll_tree;
+ int transform_id = -1;
// If pending tree topology changed and we still want to notify the pending
// tree about scroll offset in the active tree, we may not find the
// corresponding pending layer.
if (LayerById(layer_id)) {
+ // TODO(sunxd): when we have a layer_id to property_tree index map in
+ // property trees, use the transform_id parameter instead of looking for
+ // indices from LayerImpls.
transform_id = LayerById(layer_id)->transform_tree_index();
} else {
DCHECK(!IsActiveTree());
@@ -175,8 +176,7 @@ void LayerTreeImpl::DidUpdateScrollOffset(int layer_id, int transform_id) {
}
if (IsActiveTree() && layer_tree_host_impl_->pending_tree())
- layer_tree_host_impl_->pending_tree()->DidUpdateScrollOffset(layer_id,
- transform_id);
+ layer_tree_host_impl_->pending_tree()->DidUpdateScrollOffset(layer_id);
}
void LayerTreeImpl::DidUpdateScrollState(int layer_id) {
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | cc/trees/property_tree.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698