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

Side by Side Diff: cc/trees/layer_tree_host_impl_unittest.cc

Issue 1921503005: cc: Move main thread hierarchy dependencies into PropertyTreeBuilder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/trees/layer_tree_host_impl.h" 5 #include "cc/trees/layer_tree_host_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 1416 matching lines...) Expand 10 before | Expand all | Expand 10 after
1427 child->SetBounds(gfx::Size(10, 10)); 1427 child->SetBounds(gfx::Size(10, 10));
1428 child->draw_properties().visible_layer_rect = gfx::Rect(10, 10); 1428 child->draw_properties().visible_layer_rect = gfx::Rect(10, 10);
1429 child->SetDrawsContent(true); 1429 child->SetDrawsContent(true);
1430 AddAnimatedTransformToLayerWithPlayer(child->id(), timeline(), 10.0, 3, 0); 1430 AddAnimatedTransformToLayerWithPlayer(child->id(), timeline(), 10.0, 3, 0);
1431 1431
1432 // Set up the property trees so that UpdateDrawProperties will work in 1432 // Set up the property trees so that UpdateDrawProperties will work in
1433 // CommitComplete below. 1433 // CommitComplete below.
1434 LayerImplList list; 1434 LayerImplList list;
1435 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs( 1435 LayerTreeHostCommon::CalcDrawPropsImplInputsForTesting inputs(
1436 root, gfx::Size(50, 50), &list); 1436 root, gfx::Size(50, 50), &list);
1437 LayerTreeHostCommon::CalculateDrawProperties(&inputs); 1437 LayerTreeHostCommon::CalculateDrawPropertiesForTesting(&inputs);
1438 1438
1439 EXPECT_FALSE(did_request_next_frame_); 1439 EXPECT_FALSE(did_request_next_frame_);
1440 EXPECT_FALSE(did_request_redraw_); 1440 EXPECT_FALSE(did_request_redraw_);
1441 EXPECT_FALSE(did_request_commit_); 1441 EXPECT_FALSE(did_request_commit_);
1442 1442
1443 host_impl_->CommitComplete(); 1443 host_impl_->CommitComplete();
1444 1444
1445 // Animations on the active tree should be started and ticked, and a new frame 1445 // Animations on the active tree should be started and ticked, and a new frame
1446 // should be requested to continue ticking them. 1446 // should be requested to continue ticking them.
1447 EXPECT_TRUE(did_request_next_frame_); 1447 EXPECT_TRUE(did_request_next_frame_);
(...skipping 9231 matching lines...) Expand 10 before | Expand all | Expand 10 after
10679 // There should not be any jitter measured till we hit the fixed point hits 10679 // There should not be any jitter measured till we hit the fixed point hits
10680 // threshold. 10680 // threshold.
10681 float expected_jitter = 10681 float expected_jitter =
10682 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0; 10682 (i == pending_tree->kFixedPointHitsThreshold) ? 500 : 0;
10683 EXPECT_EQ(jitter, expected_jitter); 10683 EXPECT_EQ(jitter, expected_jitter);
10684 } 10684 }
10685 } 10685 }
10686 10686
10687 } // namespace 10687 } // namespace
10688 } // namespace cc 10688 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_common_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_serialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698