diff options
author | clholgat@chromium.org <clholgat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-15 21:33:56 +0000 |
---|---|---|
committer | clholgat@chromium.org <clholgat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-10-15 21:33:56 +0000 |
commit | c0f7a7f495d1c10c11e1eaf9a83755d3fe944d06 (patch) | |
tree | 9acd4d89671eb779b5661381ac75aeacaff6ae5c | |
parent | 67b194950b1197c0ca2d8626b3f3e0db65bcabfa (diff) | |
download | chromium_src-c0f7a7f495d1c10c11e1eaf9a83755d3fe944d06.zip chromium_src-c0f7a7f495d1c10c11e1eaf9a83755d3fe944d06.tar.gz chromium_src-c0f7a7f495d1c10c11e1eaf9a83755d3fe944d06.tar.bz2 |
Adding threaded, impl-side painted LayerTreePerfTests
Review URL: https://codereview.chromium.org/27036005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228767 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | cc/test/layer_tree_test.cc | 4 | ||||
-rw-r--r-- | cc/test/layer_tree_test.h | 1 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_perftest.cc | 37 |
3 files changed, 34 insertions, 8 deletions
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc index 6a7cf50..da0ed55 100644 --- a/cc/test/layer_tree_test.cc +++ b/cc/test/layer_tree_test.cc @@ -640,6 +640,10 @@ void LayerTreeTest::RunTest(bool threaded, AfterTest(); } +void LayerTreeTest::RunTestWithImplSidePainting() { + RunTest(true, false, true); +} + scoped_ptr<OutputSurface> LayerTreeTest::CreateOutputSurface(bool fallback) { scoped_ptr<FakeOutputSurface> output_surface; if (delegating_renderer_) diff --git a/cc/test/layer_tree_test.h b/cc/test/layer_tree_test.h index d7607fb..f027c06 100644 --- a/cc/test/layer_tree_test.h +++ b/cc/test/layer_tree_test.h @@ -146,6 +146,7 @@ class LayerTreeTest : public testing::Test, public TestHooks { virtual void RunTest(bool threaded, bool delegating_renderer, bool impl_side_painting); + virtual void RunTestWithImplSidePainting(); bool HasImplThread() { return proxy() ? proxy()->HasImplThread() : false; } base::SingleThreadTaskRunner* ImplThreadTaskRunner() { diff --git a/cc/trees/layer_tree_host_perftest.cc b/cc/trees/layer_tree_host_perftest.cc index 5ca78b6..c82852e 100644 --- a/cc/trees/layer_tree_host_perftest.cc +++ b/cc/trees/layer_tree_host_perftest.cc @@ -142,6 +142,12 @@ TEST_F(LayerTreeHostPerfTestJsonReader, TenTenSingleThread) { RunTest(false, false, false); } +TEST_F(LayerTreeHostPerfTestJsonReader, TenTenThreadedImplSide) { + SetTestName("10_10_threaded_impl_side"); + ReadTestFile("10_10_layer_tree"); + RunTestWithImplSidePainting(); +} + // Simulates a tab switcher scene with two stacks of 10 tabs each. TEST_F(LayerTreeHostPerfTestJsonReader, TenTenSingleThread_FullDamageEachFrame) { @@ -151,6 +157,14 @@ TEST_F(LayerTreeHostPerfTestJsonReader, RunTest(false, false, false); } +TEST_F(LayerTreeHostPerfTestJsonReader, + TenTenThreadedImplSide_FullDamageEachFrame) { + full_damage_each_frame_ = true; + SetTestName("10_10_threaded_impl_side_full_damage_each_frame"); + ReadTestFile("10_10_layer_tree"); + RunTestWithImplSidePainting(); +} + // Invalidates a leaf layer in the tree on the main thread after every commit. class LayerTreeHostPerfTestLeafInvalidates : public LayerTreeHostPerfTestJsonReader { @@ -185,6 +199,12 @@ TEST_F(LayerTreeHostPerfTestLeafInvalidates, TenTenSingleThread) { RunTest(false, false, false); } +TEST_F(LayerTreeHostPerfTestLeafInvalidates, TenTenThreadedImplSide) { + SetTestName("10_10_threaded_impl_side_leaf_invalidates"); + ReadTestFile("10_10_layer_tree"); + RunTestWithImplSidePainting(); +} + // Simulates main-thread scrolling on each frame. class ScrollingLayerTreePerfTest : public LayerTreeHostPerfTestJsonReader { public: @@ -207,20 +227,20 @@ class ScrollingLayerTreePerfTest : public LayerTreeHostPerfTestJsonReader { scoped_refptr<Layer> scrollable_; }; -TEST_F(ScrollingLayerTreePerfTest, LongScrollablePage) { +TEST_F(ScrollingLayerTreePerfTest, LongScrollablePageSingleThread) { SetTestName("long_scrollable_page"); ReadTestFile("long_scrollable_page"); RunTest(false, false, false); } -class ImplSidePaintingPerfTest : public LayerTreeHostPerfTestJsonReader { - protected: - // Run test with impl-side painting. - void RunTestWithImplSidePainting() { RunTest(true, false, true); } -}; +TEST_F(ScrollingLayerTreePerfTest, LongScrollablePageThreadedImplSide) { + SetTestName("long_scrollable_page_threaded_impl_side"); + ReadTestFile("long_scrollable_page"); + RunTestWithImplSidePainting(); +} // Simulates a page with several large, transformed and animated layers. -TEST_F(ImplSidePaintingPerfTest, HeavyPage) { +TEST_F(LayerTreeHostPerfTestJsonReader, HeavyPageThreadedImplSide) { animation_driven_drawing_ = true; measure_commit_cost_ = true; SetTestName("heavy_page"); @@ -228,7 +248,8 @@ TEST_F(ImplSidePaintingPerfTest, HeavyPage) { RunTestWithImplSidePainting(); } -class PageScaleImplSidePaintingPerfTest : public ImplSidePaintingPerfTest { +class PageScaleImplSidePaintingPerfTest + : public LayerTreeHostPerfTestJsonReader { public: PageScaleImplSidePaintingPerfTest() : max_scale_(16.f), min_scale_(1.f / max_scale_) {} |