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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 4542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4553 } | 4553 } |
4554 | 4554 |
4555 void DidActivate() override { | 4555 void DidActivate() override { |
4556 base::AutoLock lock(result_->lock); | 4556 base::AutoLock lock(result_->lock); |
4557 EXPECT_FALSE(result_->did_activate_called); | 4557 EXPECT_FALSE(result_->did_activate_called); |
4558 EXPECT_FALSE(result_->did_swap_called); | 4558 EXPECT_FALSE(result_->did_swap_called); |
4559 EXPECT_FALSE(result_->did_not_swap_called); | 4559 EXPECT_FALSE(result_->did_not_swap_called); |
4560 result_->did_activate_called = true; | 4560 result_->did_activate_called = true; |
4561 } | 4561 } |
4562 | 4562 |
4563 void DidSwap(CompositorFrameMetadata* metadata) override { | 4563 void WillSwap(CompositorFrameMetadata* metadata) override { |
4564 base::AutoLock lock(result_->lock); | 4564 base::AutoLock lock(result_->lock); |
4565 EXPECT_FALSE(result_->did_swap_called); | 4565 EXPECT_FALSE(result_->did_swap_called); |
4566 EXPECT_FALSE(result_->did_not_swap_called); | 4566 EXPECT_FALSE(result_->did_not_swap_called); |
4567 result_->did_swap_called = true; | 4567 result_->did_swap_called = true; |
4568 } | 4568 } |
4569 | 4569 |
| 4570 void DidSwap() override {} |
| 4571 |
4570 DidNotSwapAction DidNotSwap(DidNotSwapReason reason) override { | 4572 DidNotSwapAction DidNotSwap(DidNotSwapReason reason) override { |
4571 base::AutoLock lock(result_->lock); | 4573 base::AutoLock lock(result_->lock); |
4572 EXPECT_FALSE(result_->did_swap_called); | 4574 EXPECT_FALSE(result_->did_swap_called); |
4573 EXPECT_FALSE(result_->did_not_swap_called); | 4575 EXPECT_FALSE(result_->did_not_swap_called); |
4574 EXPECT_FALSE(result_->did_activate_called && | 4576 EXPECT_FALSE(result_->did_activate_called && |
4575 reason != DidNotSwapReason::SWAP_FAILS); | 4577 reason != DidNotSwapReason::SWAP_FAILS); |
4576 result_->did_not_swap_called = true; | 4578 result_->did_not_swap_called = true; |
4577 result_->reason = reason; | 4579 result_->reason = reason; |
4578 return DidNotSwapAction::BREAK_PROMISE; | 4580 return DidNotSwapAction::BREAK_PROMISE; |
4579 } | 4581 } |
(...skipping 2414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6994 EndTest(); | 6996 EndTest(); |
6995 } | 6997 } |
6996 | 6998 |
6997 void AfterTest() override {} | 6999 void AfterTest() override {} |
6998 }; | 7000 }; |
6999 | 7001 |
7000 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSubmitFrameResources); | 7002 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSubmitFrameResources); |
7001 | 7003 |
7002 } // namespace | 7004 } // namespace |
7003 } // namespace cc | 7005 } // namespace cc |
OLD | NEW |