diff options
author | skyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-29 23:06:17 +0000 |
---|---|---|
committer | skyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-29 23:06:17 +0000 |
commit | 62a2d508ba1b13b185c03a4fd60eaf326bd7ab9a (patch) | |
tree | 396736a4b96573bdabeab84fdcfa58ded3abf966 /cc/trees | |
parent | eeb7fb2b0a7faf4428351023e637031ab7ad9147 (diff) | |
download | chromium_src-62a2d508ba1b13b185c03a4fd60eaf326bd7ab9a.zip chromium_src-62a2d508ba1b13b185c03a4fd60eaf326bd7ab9a.tar.gz chromium_src-62a2d508ba1b13b185c03a4fd60eaf326bd7ab9a.tar.bz2 |
cc: Make heavy layer tree test more realistic
The heavy layer tree test is supposed to simulate a complex layer tree
with transform animation. Currently it does so by forcing repaint of all
layers, but we should only really animate layer transforms to better
match reality.
BUG=348100
Review URL: https://codereview.chromium.org/305903003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273646 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees')
-rw-r--r-- | cc/trees/layer_tree_host_perftest.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/cc/trees/layer_tree_host_perftest.cc b/cc/trees/layer_tree_host_perftest.cc index 70b2a64..5a938af 100644 --- a/cc/trees/layer_tree_host_perftest.cc +++ b/cc/trees/layer_tree_host_perftest.cc @@ -38,6 +38,7 @@ class LayerTreeHostPerfTest : public LayerTreeTest { base::TimeDelta::FromMilliseconds(kTimeLimitMillis), kTimeCheckInterval), commit_timer_(0, base::TimeDelta(), 1), + animation_frame_(0), full_damage_each_frame_(false), animation_driven_drawing_(false), measure_commit_cost_(false) { @@ -56,7 +57,9 @@ class LayerTreeHostPerfTest : public LayerTreeTest { virtual void Animate(base::TimeTicks monotonic_time) OVERRIDE { if (animation_driven_drawing_ && !TestEnded()) { layer_tree_host()->SetNeedsAnimate(); - layer_tree_host()->SetNextCommitForcesRedraw(); + // Simulate a transform animation on the root layer. + Layer* layer = layer_tree_host()->root_layer(); + layer->SetPosition(gfx::PointF(0, animation_frame_++ % 2)); } } @@ -104,6 +107,7 @@ class LayerTreeHostPerfTest : public LayerTreeTest { protected: LapTimer draw_timer_; LapTimer commit_timer_; + int animation_frame_; std::string test_name_; FakeContentLayerClient fake_content_layer_client_; |