summaryrefslogtreecommitdiffstats
path: root/cc/trees
diff options
context:
space:
mode:
authorclholgat@chromium.org <clholgat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-19 21:16:50 +0000
committerclholgat@chromium.org <clholgat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-19 21:16:50 +0000
commit00c51dc84d6b1cc306ca188b20f350280109890a (patch)
treef7ed310c944f652e1827328e8f820bcbd9446561 /cc/trees
parentf7da594651537af7c800eaeb94fbd2901dd40ef1 (diff)
downloadchromium_src-00c51dc84d6b1cc306ca188b20f350280109890a.zip
chromium_src-00c51dc84d6b1cc306ca188b20f350280109890a.tar.gz
chromium_src-00c51dc84d6b1cc306ca188b20f350280109890a.tar.bz2
Fix and reenable BrowserCompositorInvalidateLayerTreePerfTest.DenseBrowserUI
Resolved the race condition that lead to the test timing out most of the time. BUG=352683 Review URL: https://codereview.chromium.org/198923006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258098 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees')
-rw-r--r--cc/trees/layer_tree_host_perftest.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/cc/trees/layer_tree_host_perftest.cc b/cc/trees/layer_tree_host_perftest.cc
index 375334f..4afbf42 100644
--- a/cc/trees/layer_tree_host_perftest.cc
+++ b/cc/trees/layer_tree_host_perftest.cc
@@ -255,7 +255,9 @@ class BrowserCompositorInvalidateLayerTreePerfTest
: public LayerTreeHostPerfTestJsonReader {
public:
BrowserCompositorInvalidateLayerTreePerfTest()
- : next_sync_point_(1), clean_up_started_(false) {}
+ : LayerTreeHostPerfTestJsonReader(),
+ next_sync_point_(1),
+ clean_up_started_(false) {}
virtual void BuildTree() OVERRIDE {
LayerTreeHostPerfTestJsonReader::BuildTree();
@@ -269,6 +271,8 @@ class BrowserCompositorInvalidateLayerTreePerfTest
}
virtual void WillCommit() OVERRIDE {
+ if (CleanUpStarted())
+ return;
gpu::Mailbox gpu_mailbox;
std::ostringstream name_stream;
name_stream << "name" << next_sync_point_;
@@ -288,11 +292,6 @@ class BrowserCompositorInvalidateLayerTreePerfTest
layer_tree_host()->SetNeedsCommit();
}
- virtual void DidCommitAndDrawFrame() OVERRIDE {
- if (CleanUpStarted())
- EndTest();
- }
-
virtual void CleanUpAndEndTest(LayerTreeHostImpl* host_impl) OVERRIDE {
clean_up_started_ = true;
MainThreadTaskRunner()->PostTask(
@@ -305,6 +304,7 @@ class BrowserCompositorInvalidateLayerTreePerfTest
void CleanUpAndEndTestOnMainThread() {
tab_contents_->SetTextureMailbox(TextureMailbox(),
scoped_ptr<SingleReleaseCallback>());
+ EndTest();
}
virtual bool CleanUpStarted() OVERRIDE { return clean_up_started_; }
@@ -315,7 +315,8 @@ class BrowserCompositorInvalidateLayerTreePerfTest
bool clean_up_started_;
};
-TEST_F(BrowserCompositorInvalidateLayerTreePerfTest, DISABLED_DenseBrowserUI) {
+TEST_F(BrowserCompositorInvalidateLayerTreePerfTest, DenseBrowserUI) {
+ measure_commit_cost_ = true;
SetTestName("dense_layer_tree");
ReadTestFile("dense_layer_tree");
RunTestWithImplSidePainting();