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 6089 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6100 break; | 6100 break; |
6101 } | 6101 } |
6102 } | 6102 } |
6103 | 6103 |
6104 void NotifyTileStateChangedOnThread(LayerTreeHostImpl* host_impl, | 6104 void NotifyTileStateChangedOnThread(LayerTreeHostImpl* host_impl, |
6105 const Tile* tile) override { | 6105 const Tile* tile) override { |
6106 if (frame_ == 3) { | 6106 if (frame_ == 3) { |
6107 // On frame 3, we will have a lower res tile complete for the pinch-out | 6107 // On frame 3, we will have a lower res tile complete for the pinch-out |
6108 // gesture even though it's not displayed. We wait for it here to prevent | 6108 // gesture even though it's not displayed. We wait for it here to prevent |
6109 // flakiness. | 6109 // flakiness. |
6110 EXPECT_EQ(0.75f, tile->contents_scale_key()); | 6110 EXPECT_EQ(0.75f, tile->contents_scale()); |
6111 PostNextAfterDraw(host_impl); | 6111 PostNextAfterDraw(host_impl); |
6112 } | 6112 } |
6113 // On frame_ == 4, we are preventing texture uploads from completing, | 6113 // On frame_ == 4, we are preventing texture uploads from completing, |
6114 // so this verifies they are not completing before frame_ == 5. | 6114 // so this verifies they are not completing before frame_ == 5. |
6115 // Flaky failures here indicate we're failing to prevent uploads from | 6115 // Flaky failures here indicate we're failing to prevent uploads from |
6116 // completing. | 6116 // completing. |
6117 EXPECT_NE(4, frame_) << tile->contents_scale_key(); | 6117 EXPECT_NE(4, frame_) << tile->contents_scale(); |
6118 } | 6118 } |
6119 | 6119 |
6120 void AfterTest() override {} | 6120 void AfterTest() override {} |
6121 | 6121 |
6122 FakeContentLayerClient client_; | 6122 FakeContentLayerClient client_; |
6123 int frame_; | 6123 int frame_; |
6124 bool posted_; | 6124 bool posted_; |
6125 base::WaitableEvent playback_allowed_event_; | 6125 base::WaitableEvent playback_allowed_event_; |
6126 }; | 6126 }; |
6127 | 6127 |
(...skipping 1039 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7167 EndTest(); | 7167 EndTest(); |
7168 } | 7168 } |
7169 | 7169 |
7170 void AfterTest() override {} | 7170 void AfterTest() override {} |
7171 }; | 7171 }; |
7172 | 7172 |
7173 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSubmitFrameResources); | 7173 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSubmitFrameResources); |
7174 | 7174 |
7175 } // namespace | 7175 } // namespace |
7176 } // namespace cc | 7176 } // namespace cc |
OLD | NEW |