| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 layer_tree_host()->SetRootLayer(blank_layer_); | 184 layer_tree_host()->SetRootLayer(blank_layer_); |
| 185 break; | 185 break; |
| 186 case 2: | 186 case 2: |
| 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 SwapBuffersCompleteOnThread() override { |
| 195 EXPECT_TRUE(result); | |
| 196 std::vector<uint32_t>& satisfied = | 195 std::vector<uint32_t>& satisfied = |
| 197 output_surface()->last_sent_frame()->metadata.satisfies_sequences; | 196 output_surface()->last_sent_frame()->metadata.satisfies_sequences; |
| 198 EXPECT_LE(satisfied.size(), 1u); | 197 EXPECT_LE(satisfied.size(), 1u); |
| 199 if (satisfied.size() == 1) { | 198 if (satisfied.size() == 1) { |
| 200 // Eventually the one SurfaceSequence should be satisfied, but only | 199 // Eventually the one SurfaceSequence should be satisfied, but only |
| 201 // after the layer was removed from the tree, and only once. | 200 // after the layer was removed from the tree, and only once. |
| 202 EXPECT_EQ(1u, satisfied[0]); | 201 EXPECT_EQ(1u, satisfied[0]); |
| 203 EXPECT_LE(1, commit_count_); | 202 EXPECT_LE(1, commit_count_); |
| 204 EXPECT_FALSE(sequence_was_satisfied_); | 203 EXPECT_FALSE(sequence_was_satisfied_); |
| 205 sequence_was_satisfied_ = true; | 204 sequence_was_satisfied_ = true; |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 EXPECT_EQ(1u, required_set_.size()); | 252 EXPECT_EQ(1u, required_set_.size()); |
| 254 // Sequence should have been satisfied with the callback. | 253 // Sequence should have been satisfied with the callback. |
| 255 EXPECT_TRUE(satisfied_sequence_ == SurfaceSequence(1u, 1u)); | 254 EXPECT_TRUE(satisfied_sequence_ == SurfaceSequence(1u, 1u)); |
| 256 } | 255 } |
| 257 }; | 256 }; |
| 258 | 257 |
| 259 MULTI_THREAD_TEST_F(SurfaceLayerSwapPromiseWithoutDraw); | 258 MULTI_THREAD_TEST_F(SurfaceLayerSwapPromiseWithoutDraw); |
| 260 | 259 |
| 261 } // namespace | 260 } // namespace |
| 262 } // namespace cc | 261 } // namespace cc |
| OLD | NEW |