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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 550073002: Revert of cc: Single-threaded impl-side painting for unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 08cd030b46eacc7981093c4e9966bf3a9c7ee81f..1fd7f6e2355bf15323858f310a34e2dbf61f7a9a 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -529,8 +529,7 @@
scoped_refptr<ContentLayer> root_layer_;
};
-SINGLE_AND_MULTI_THREAD_BLOCKNOTIFY_TEST_F(
- LayerTreeHostTestSetNextCommitForcesRedraw);
+SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSetNextCommitForcesRedraw);
// Tests that if a layer is not drawn because of some reason in the parent then
// its damage is preserved until the next time it is drawn.
@@ -738,8 +737,7 @@
virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) OVERRIDE {
EXPECT_EQ(frame_count_with_pending_tree_, 0);
- if (impl->settings().impl_side_painting)
- impl->BlockNotifyReadyToActivateForTesting(true);
+ impl->BlockNotifyReadyToActivateForTesting(true);
}
virtual void WillBeginImplFrameOnThread(LayerTreeHostImpl* impl,
@@ -750,8 +748,7 @@
if (frame_count_with_pending_tree_ == 1) {
EXPECT_EQ(first_frame_time_.ToInternalValue(), 0);
first_frame_time_ = impl->CurrentBeginFrameArgs().frame_time;
- } else if (frame_count_with_pending_tree_ == 2 &&
- impl->settings().impl_side_painting) {
+ } else if (frame_count_with_pending_tree_ == 2) {
impl->BlockNotifyReadyToActivateForTesting(false);
}
}
@@ -780,7 +777,7 @@
base::TimeTicks first_frame_time_;
};
-SINGLE_AND_MULTI_THREAD_BLOCKNOTIFY_TEST_F(
+SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostTestFrameTimeUpdatesAfterActivationFails);
// This test verifies that LayerTreeHostImpl's current frame time gets
@@ -2406,18 +2403,12 @@
LayerTreeHostTestChangeLayerPropertiesInPaintContents() : num_commits_(0) {}
virtual void SetupTree() OVERRIDE {
- if (layer_tree_host()->settings().impl_side_painting) {
- scoped_refptr<PictureLayer> root_layer = PictureLayer::Create(&client_);
- layer_tree_host()->SetRootLayer(root_layer);
- } else {
- scoped_refptr<ContentLayer> root_layer = ContentLayer::Create(&client_);
- layer_tree_host()->SetRootLayer(root_layer);
- }
- Layer* root_layer = layer_tree_host()->root_layer();
+ scoped_refptr<ContentLayer> root_layer = ContentLayer::Create(&client_);
root_layer->SetIsDrawable(true);
root_layer->SetBounds(gfx::Size(1, 1));
- client_.set_layer(root_layer);
+ layer_tree_host()->SetRootLayer(root_layer);
+ client_.set_layer(root_layer.get());
LayerTreeHostTest::SetupTree();
}
@@ -2425,7 +2416,7 @@
virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); }
virtual void AfterTest() OVERRIDE {}
- virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
+ virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
num_commits_++;
if (num_commits_ == 1) {
LayerImpl* root_layer = host_impl->active_tree()->root_layer();
@@ -2442,8 +2433,7 @@
int num_commits_;
};
-SINGLE_AND_MULTI_THREAD_TEST_F(
- LayerTreeHostTestChangeLayerPropertiesInPaintContents);
+SINGLE_THREAD_TEST_F(LayerTreeHostTestChangeLayerPropertiesInPaintContents);
class MockIOSurfaceWebGraphicsContext3D : public TestWebGraphicsContext3D {
public:
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698