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> |
| 8 #include <stdint.h> |
| 9 |
7 #include <algorithm> | 10 #include <algorithm> |
8 | 11 |
9 #include "base/auto_reset.h" | 12 #include "base/auto_reset.h" |
10 #include "base/location.h" | 13 #include "base/location.h" |
11 #include "base/single_thread_task_runner.h" | 14 #include "base/single_thread_task_runner.h" |
12 #include "base/synchronization/lock.h" | 15 #include "base/synchronization/lock.h" |
13 #include "base/thread_task_runner_handle.h" | 16 #include "base/thread_task_runner_handle.h" |
14 #include "cc/animation/timing_function.h" | 17 #include "cc/animation/timing_function.h" |
15 #include "cc/debug/frame_rate_counter.h" | 18 #include "cc/debug/frame_rate_counter.h" |
16 #include "cc/input/scroll_elasticity_helper.h" | 19 #include "cc/input/scroll_elasticity_helper.h" |
(...skipping 4071 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4088 void DidNotSwap(DidNotSwapReason reason) override { | 4091 void DidNotSwap(DidNotSwapReason reason) override { |
4089 base::AutoLock lock(result_->lock); | 4092 base::AutoLock lock(result_->lock); |
4090 EXPECT_FALSE(result_->did_swap_called); | 4093 EXPECT_FALSE(result_->did_swap_called); |
4091 EXPECT_FALSE(result_->did_not_swap_called); | 4094 EXPECT_FALSE(result_->did_not_swap_called); |
4092 EXPECT_FALSE(result_->did_activate_called && | 4095 EXPECT_FALSE(result_->did_activate_called && |
4093 reason != DidNotSwapReason::SWAP_FAILS); | 4096 reason != DidNotSwapReason::SWAP_FAILS); |
4094 result_->did_not_swap_called = true; | 4097 result_->did_not_swap_called = true; |
4095 result_->reason = reason; | 4098 result_->reason = reason; |
4096 } | 4099 } |
4097 | 4100 |
4098 int64 TraceId() const override { return 0; } | 4101 int64_t TraceId() const override { return 0; } |
4099 | 4102 |
4100 private: | 4103 private: |
4101 // Not owned. | 4104 // Not owned. |
4102 TestSwapPromiseResult* result_; | 4105 TestSwapPromiseResult* result_; |
4103 }; | 4106 }; |
4104 | 4107 |
4105 class PinnedLayerTreeSwapPromise : public LayerTreeHostTest { | 4108 class PinnedLayerTreeSwapPromise : public LayerTreeHostTest { |
4106 protected: | 4109 protected: |
4107 void BeginTest() override { | 4110 void BeginTest() override { |
4108 PostSetNextCommitForcesRedrawToMainThread(); | 4111 PostSetNextCommitForcesRedrawToMainThread(); |
(...skipping 2454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6563 EndTest(); | 6566 EndTest(); |
6564 } | 6567 } |
6565 | 6568 |
6566 void AfterTest() override {} | 6569 void AfterTest() override {} |
6567 }; | 6570 }; |
6568 | 6571 |
6569 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); | 6572 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); |
6570 | 6573 |
6571 } // namespace | 6574 } // namespace |
6572 } // namespace cc | 6575 } // namespace cc |
OLD | NEW |