| 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 4a3fa7efdfe4b440a5dfd01a5f32bb60bbe70463..37c23209e6b5344a248950d2d10a0f7c486517a0 100644
|
| --- a/cc/trees/layer_tree_host_unittest.cc
|
| +++ b/cc/trees/layer_tree_host_unittest.cc
|
| @@ -529,7 +529,8 @@ class LayerTreeHostTestSetNextCommitForcesRedraw : public LayerTreeHostTest {
|
| scoped_refptr<ContentLayer> root_layer_;
|
| };
|
|
|
| -SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSetNextCommitForcesRedraw);
|
| +SINGLE_AND_MULTI_THREAD_BLOCKNOTIFY_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.
|
| @@ -737,7 +738,8 @@ class LayerTreeHostTestFrameTimeUpdatesAfterActivationFails
|
|
|
| virtual void BeginCommitOnThread(LayerTreeHostImpl* impl) OVERRIDE {
|
| EXPECT_EQ(frame_count_with_pending_tree_, 0);
|
| - impl->BlockNotifyReadyToActivateForTesting(true);
|
| + if (impl->settings().impl_side_painting)
|
| + impl->BlockNotifyReadyToActivateForTesting(true);
|
| }
|
|
|
| virtual void WillBeginImplFrameOnThread(LayerTreeHostImpl* impl,
|
| @@ -748,7 +750,8 @@ class LayerTreeHostTestFrameTimeUpdatesAfterActivationFails
|
| 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) {
|
| + } else if (frame_count_with_pending_tree_ == 2 &&
|
| + impl->settings().impl_side_painting) {
|
| impl->BlockNotifyReadyToActivateForTesting(false);
|
| }
|
| }
|
| @@ -777,7 +780,7 @@ class LayerTreeHostTestFrameTimeUpdatesAfterActivationFails
|
| base::TimeTicks first_frame_time_;
|
| };
|
|
|
| -SINGLE_AND_MULTI_THREAD_TEST_F(
|
| +SINGLE_AND_MULTI_THREAD_BLOCKNOTIFY_TEST_F(
|
| LayerTreeHostTestFrameTimeUpdatesAfterActivationFails);
|
|
|
| // This test verifies that LayerTreeHostImpl's current frame time gets
|
| @@ -2406,12 +2409,18 @@ class LayerTreeHostTestChangeLayerPropertiesInPaintContents
|
| LayerTreeHostTestChangeLayerPropertiesInPaintContents() : num_commits_(0) {}
|
|
|
| virtual void SetupTree() OVERRIDE {
|
| - scoped_refptr<ContentLayer> root_layer = ContentLayer::Create(&client_);
|
| + 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();
|
| root_layer->SetIsDrawable(true);
|
| root_layer->SetBounds(gfx::Size(1, 1));
|
|
|
| - layer_tree_host()->SetRootLayer(root_layer);
|
| - client_.set_layer(root_layer.get());
|
| + client_.set_layer(root_layer);
|
|
|
| LayerTreeHostTest::SetupTree();
|
| }
|
| @@ -2419,7 +2428,7 @@ class LayerTreeHostTestChangeLayerPropertiesInPaintContents
|
| virtual void BeginTest() OVERRIDE { PostSetNeedsCommitToMainThread(); }
|
| virtual void AfterTest() OVERRIDE {}
|
|
|
| - virtual void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
|
| + virtual void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) OVERRIDE {
|
| num_commits_++;
|
| if (num_commits_ == 1) {
|
| LayerImpl* root_layer = host_impl->active_tree()->root_layer();
|
| @@ -2436,7 +2445,8 @@ class LayerTreeHostTestChangeLayerPropertiesInPaintContents
|
| int num_commits_;
|
| };
|
|
|
| -SINGLE_THREAD_TEST_F(LayerTreeHostTestChangeLayerPropertiesInPaintContents);
|
| +SINGLE_AND_MULTI_THREAD_TEST_F(
|
| + LayerTreeHostTestChangeLayerPropertiesInPaintContents);
|
|
|
| class MockIOSurfaceWebGraphicsContext3D : public TestWebGraphicsContext3D {
|
| public:
|
|
|