OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "cc/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/auto_reset.h" | 9 #include "base/auto_reset.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 1598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1609 kCompletedMainFrame, | 1609 kCompletedMainFrame, |
1610 kCompletedImplFrame, | 1610 kCompletedImplFrame, |
1611 }; | 1611 }; |
1612 | 1612 |
1613 LayerTreeHostTestCompositeImmediatelyStateTransitions() | 1613 LayerTreeHostTestCompositeImmediatelyStateTransitions() |
1614 : current_state_(kInvalid), current_begin_frame_args_() {} | 1614 : current_state_(kInvalid), current_begin_frame_args_() {} |
1615 | 1615 |
1616 void InitializeSettings(LayerTreeSettings* settings) override { | 1616 void InitializeSettings(LayerTreeSettings* settings) override { |
1617 settings->single_thread_proxy_scheduler = false; | 1617 settings->single_thread_proxy_scheduler = false; |
1618 settings->use_zero_copy = true; | 1618 settings->use_zero_copy = true; |
| 1619 settings->use_one_copy = false; |
1619 } | 1620 } |
1620 | 1621 |
1621 void BeginTest() override { | 1622 void BeginTest() override { |
1622 current_state_ = kStartedTest; | 1623 current_state_ = kStartedTest; |
1623 PostCompositeImmediatelyToMainThread(); | 1624 PostCompositeImmediatelyToMainThread(); |
1624 } | 1625 } |
1625 | 1626 |
1626 void WillBeginImplFrameOnThread(LayerTreeHostImpl* host_impl, | 1627 void WillBeginImplFrameOnThread(LayerTreeHostImpl* host_impl, |
1627 const BeginFrameArgs& args) override { | 1628 const BeginFrameArgs& args) override { |
1628 EXPECT_EQ(current_state_, kStartedTest); | 1629 EXPECT_EQ(current_state_, kStartedTest); |
(...skipping 3288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4917 | 4918 |
4918 // Do a synchronous composite and assert that the swap promise succeeds. | 4919 // Do a synchronous composite and assert that the swap promise succeeds. |
4919 class LayerTreeHostTestSynchronousCompositeSwapPromise | 4920 class LayerTreeHostTestSynchronousCompositeSwapPromise |
4920 : public LayerTreeHostTest { | 4921 : public LayerTreeHostTest { |
4921 public: | 4922 public: |
4922 LayerTreeHostTestSynchronousCompositeSwapPromise() : commit_count_(0) {} | 4923 LayerTreeHostTestSynchronousCompositeSwapPromise() : commit_count_(0) {} |
4923 | 4924 |
4924 void InitializeSettings(LayerTreeSettings* settings) override { | 4925 void InitializeSettings(LayerTreeSettings* settings) override { |
4925 settings->single_thread_proxy_scheduler = false; | 4926 settings->single_thread_proxy_scheduler = false; |
4926 settings->use_zero_copy = true; | 4927 settings->use_zero_copy = true; |
| 4928 settings->use_one_copy = false; |
4927 } | 4929 } |
4928 | 4930 |
4929 void BeginTest() override { | 4931 void BeginTest() override { |
4930 // Successful composite. | 4932 // Successful composite. |
4931 scoped_ptr<SwapPromise> swap_promise0( | 4933 scoped_ptr<SwapPromise> swap_promise0( |
4932 new TestSwapPromise(&swap_promise_result_[0])); | 4934 new TestSwapPromise(&swap_promise_result_[0])); |
4933 layer_tree_host()->QueueSwapPromise(swap_promise0.Pass()); | 4935 layer_tree_host()->QueueSwapPromise(swap_promise0.Pass()); |
4934 layer_tree_host()->Composite(base::TimeTicks::Now()); | 4936 layer_tree_host()->Composite(base::TimeTicks::Now()); |
4935 | 4937 |
4936 // Fail to swap (no damage). | 4938 // Fail to swap (no damage). |
(...skipping 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6254 | 6256 |
6255 scoped_refptr<FakePictureLayer> content_child_layer_; | 6257 scoped_refptr<FakePictureLayer> content_child_layer_; |
6256 FakeContentLayerClient client_; | 6258 FakeContentLayerClient client_; |
6257 }; | 6259 }; |
6258 | 6260 |
6259 SINGLE_AND_MULTI_THREAD_TEST_F( | 6261 SINGLE_AND_MULTI_THREAD_TEST_F( |
6260 LayerTreeTestReflectionMaskLayerForSurfaceWithUnclippedChild); | 6262 LayerTreeTestReflectionMaskLayerForSurfaceWithUnclippedChild); |
6261 | 6263 |
6262 } // namespace | 6264 } // namespace |
6263 } // namespace cc | 6265 } // namespace cc |
OLD | NEW |