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

Unified Diff: cc/trees/layer_tree_host_in_process.cc

Issue 2393213002: cc: Update scroll offset before property tree scrolling and animation. (Closed)
Patch Set: Nit change. Created 4 years, 2 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 | « no previous file | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_in_process.cc
diff --git a/cc/trees/layer_tree_host_in_process.cc b/cc/trees/layer_tree_host_in_process.cc
index 57e2ea414e8bda672595b1955847274a3fc862d6..e59898a3acebe6a75ab14bdc17e69e16b566d0af 100644
--- a/cc/trees/layer_tree_host_in_process.cc
+++ b/cc/trees/layer_tree_host_in_process.cc
@@ -421,8 +421,7 @@ void LayerTreeHostInProcess::RequestMainFrameUpdate() {
// this function, keep in mind that the function *runs* on the impl thread! Any
// code that is logically a main thread operation, e.g. deletion of a Layer,
// should be delayed until the LayerTreeHostInProcess::CommitComplete, which
-// will run
-// after the commit, but on the main thread.
+// will run after the commit, but on the main thread.
void LayerTreeHostInProcess::FinishCommitOnImplThread(
LayerTreeHostImpl* host_impl) {
DCHECK(!IsRemoteServer());
@@ -478,6 +477,10 @@ void LayerTreeHostInProcess::FinishCommitOnImplThread(
TreeSynchronizer::PushLayerProperties(layer_tree_.get(), sync_tree);
+ // This must happen after synchronizing property trees and after pushing
+ // properties, which updates the clobber_active_value flag.
+ sync_tree->UpdatePropertyTreeScrollOffset(layer_tree_->property_trees());
+
// This must happen after synchronizing property trees and after push
// properties, which updates property tree indices, but before animation
// host pushes properties as animation host push properties can change
@@ -491,10 +494,6 @@ void LayerTreeHostInProcess::FinishCommitOnImplThread(
host_impl->animation_host());
}
- // This must happen after synchronizing property trees and after pushing
- // properties, which updates the clobber_active_value flag.
- sync_tree->UpdatePropertyTreeScrollOffset(layer_tree_->property_trees());
-
micro_benchmark_controller_.ScheduleImplBenchmarks(host_impl);
layer_tree_->property_trees()->ResetAllChangeTracking();
}
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_unittest_scroll.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698