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

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: Update scroll offset before updating property tree scrolling and animation. 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/tree_synchronizer_unittest.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..f4cd7c488f793a398d2615f6ef25361f0c6b124e 100644
--- a/cc/trees/layer_tree_host_in_process.cc
+++ b/cc/trees/layer_tree_host_in_process.cc
@@ -421,12 +421,13 @@ 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());
- DCHECK(task_runner_provider_->IsImplThread());
+ // The function may also be called by single threaded unit test.
+ DCHECK(task_runner_provider_->IsImplThread() ||
+ !task_runner_provider_->ImplThreadTaskRunner());
ajuma 2016/10/07 18:38:30 Instead of calling this directly from your test, c
bool is_new_trace;
TRACE_EVENT_IS_NEW_TRACE(&is_new_trace);
@@ -478,6 +479,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 +496,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/tree_synchronizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698