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

Unified Diff: cc/trees/layer_tree_host_perftest.cc

Issue 12662021: cc: Don't draw and swap if the frame will not change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 8 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 | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_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_perftest.cc
diff --git a/cc/trees/layer_tree_host_perftest.cc b/cc/trees/layer_tree_host_perftest.cc
index bd3849e57fae5b360d5b29e0d03a78495c0aa456..8f247e8f3d88f3ab56c6db25eda7738534302a53 100644
--- a/cc/trees/layer_tree_host_perftest.cc
+++ b/cc/trees/layer_tree_host_perftest.cc
@@ -26,7 +26,8 @@ static const int kTimeCheckInterval = 10;
class LayerTreeHostPerfTest : public LayerTreeTest {
public:
LayerTreeHostPerfTest()
- : num_draws_(0) {
+ : num_draws_(0),
+ full_damage_each_frame_(false) {
fake_content_layer_client_.set_paint_all_opaque(true);
}
@@ -49,6 +50,8 @@ class LayerTreeHostPerfTest : public LayerTreeTest {
}
}
impl->setNeedsRedraw();
+ if (full_damage_each_frame_)
+ impl->SetFullRootLayerDamage();
}
virtual void BuildTree() {}
@@ -66,6 +69,7 @@ class LayerTreeHostPerfTest : public LayerTreeTest {
std::string test_name_;
base::TimeDelta elapsed_;
FakeContentLayerClient fake_content_layer_client_;
+ bool full_damage_each_frame_;
};
@@ -102,6 +106,14 @@ TEST_F(LayerTreeHostPerfTestJsonReader, TenTenSingleThread) {
RunTest(false);
}
+// Simulates a tab switcher scene with two stacks of 10 tabs each.
+TEST_F(LayerTreeHostPerfTestJsonReader,
+ TenTenSingleThread_FullDamageEachFrame) {
+ full_damage_each_frame_ = true;
+ ReadTestFile("10_10_layer_tree");
+ RunTest(false);
+}
+
// Simulates main-thread scrolling on each frame.
class ScrollingLayerTreePerfTest : public LayerTreeHostPerfTestJsonReader {
public:
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698