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

Unified Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 1840883002: cc : Calculate jitter without using layer hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
Index: cc/trees/layer_tree_host_impl_unittest.cc
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index d81c3a8b4b790141b88935188548c5eff9792080..80dbed1c925af5f5b89c005659dd18956c33f4be 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -10349,9 +10349,11 @@ TEST_F(LayerTreeHostImplTest, JitterTest) {
content_layer->SetTransform(translate);
LayerTreeImpl* pending_tree = host_impl_->pending_tree();
+ LayerTreeImpl* active_tree = host_impl_->active_tree();
pending_tree->PushPageScaleFromMainThread(1.f, 1.f, 1.f);
- LayerImpl* last_scrolled_layer = pending_tree->LayerById(
- host_impl_->active_tree()->LastScrolledLayerId());
+ ScrollNode* node = active_tree->property_trees()->scroll_tree.Node(
+ active_tree->LastScrolledScrollNodeId());
+ LayerImpl* last_scrolled_layer = pending_tree->LayerById(node->owner_id);
// When building property trees from impl side, the builder uses the scroll
// offset of layer_impl to initialize the scroll offset in scroll tree:
@@ -10374,8 +10376,7 @@ TEST_F(LayerTreeHostImplTest, JitterTest) {
pending_tree->set_needs_update_draw_properties();
pending_tree->UpdateDrawProperties(false);
- float jitter =
- LayerTreeHostCommon::CalculateFrameJitter(last_scrolled_layer);
+ float jitter = LayerTreeHostCommon::CalculateFrameJitter(content_layer);
// There should not be any jitter measured till we hit the fixed point hits
// threshold.
float expected_jitter =

Powered by Google App Engine
This is Rietveld 408576698