| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 break; | 187 break; |
| 188 default: | 188 default: |
| 189 NOTREACHED(); | 189 NOTREACHED(); |
| 190 break; | 190 break; |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 | 193 |
| 194 void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override { | 194 void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, bool result) override { |
| 195 EXPECT_TRUE(result); | 195 EXPECT_TRUE(result); |
| 196 std::vector<uint32_t>& satisfied = | 196 std::vector<uint32_t>& satisfied = |
| 197 output_surface()->last_sent_frame().metadata.satisfies_sequences; | 197 output_surface()->last_sent_frame()->metadata.satisfies_sequences; |
| 198 EXPECT_LE(satisfied.size(), 1u); | 198 EXPECT_LE(satisfied.size(), 1u); |
| 199 if (satisfied.size() == 1) { | 199 if (satisfied.size() == 1) { |
| 200 // Eventually the one SurfaceSequence should be satisfied, but only | 200 // Eventually the one SurfaceSequence should be satisfied, but only |
| 201 // after the layer was removed from the tree, and only once. | 201 // after the layer was removed from the tree, and only once. |
| 202 EXPECT_EQ(1u, satisfied[0]); | 202 EXPECT_EQ(1u, satisfied[0]); |
| 203 EXPECT_LE(1, commit_count_); | 203 EXPECT_LE(1, commit_count_); |
| 204 EXPECT_FALSE(sequence_was_satisfied_); | 204 EXPECT_FALSE(sequence_was_satisfied_); |
| 205 sequence_was_satisfied_ = true; | 205 sequence_was_satisfied_ = true; |
| 206 EndTest(); | 206 EndTest(); |
| 207 } | 207 } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 EXPECT_EQ(1u, required_set_.size()); | 253 EXPECT_EQ(1u, required_set_.size()); |
| 254 // Sequence should have been satisfied with the callback. | 254 // Sequence should have been satisfied with the callback. |
| 255 EXPECT_TRUE(satisfied_sequence_ == SurfaceSequence(1u, 1u)); | 255 EXPECT_TRUE(satisfied_sequence_ == SurfaceSequence(1u, 1u)); |
| 256 } | 256 } |
| 257 }; | 257 }; |
| 258 | 258 |
| 259 MULTI_THREAD_TEST_F(SurfaceLayerSwapPromiseWithoutDraw); | 259 MULTI_THREAD_TEST_F(SurfaceLayerSwapPromiseWithoutDraw); |
| 260 | 260 |
| 261 } // namespace | 261 } // namespace |
| 262 } // namespace cc | 262 } // namespace cc |
| OLD | NEW |