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 6022 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6033 break; | 6033 break; |
6034 } | 6034 } |
6035 } | 6035 } |
6036 | 6036 |
6037 void NotifyTileStateChangedOnThread(LayerTreeHostImpl* host_impl, | 6037 void NotifyTileStateChangedOnThread(LayerTreeHostImpl* host_impl, |
6038 const Tile* tile) override { | 6038 const Tile* tile) override { |
6039 if (frame_ == 3) { | 6039 if (frame_ == 3) { |
6040 // On frame 3, we will have a lower res tile complete for the pinch-out | 6040 // On frame 3, we will have a lower res tile complete for the pinch-out |
6041 // gesture even though it's not displayed. We wait for it here to prevent | 6041 // gesture even though it's not displayed. We wait for it here to prevent |
6042 // flakiness. | 6042 // flakiness. |
6043 EXPECT_EQ(0.75f, tile->contents_scale()); | 6043 EXPECT_EQ(ScaleTranslate2d(0.75f, gfx::Vector2dF()), |
| 6044 tile->raster_transform()); |
6044 PostNextAfterDraw(host_impl); | 6045 PostNextAfterDraw(host_impl); |
6045 } | 6046 } |
6046 // On frame_ == 4, we are preventing texture uploads from completing, | 6047 // On frame_ == 4, we are preventing texture uploads from completing, |
6047 // so this verifies they are not completing before frame_ == 5. | 6048 // so this verifies they are not completing before frame_ == 5. |
6048 // Flaky failures here indicate we're failing to prevent uploads from | 6049 // Flaky failures here indicate we're failing to prevent uploads from |
6049 // completing. | 6050 // completing. |
6050 EXPECT_NE(4, frame_) << tile->contents_scale(); | 6051 EXPECT_NE(4, frame_) << tile->contents_scale_key(); |
6051 } | 6052 } |
6052 | 6053 |
6053 void AfterTest() override {} | 6054 void AfterTest() override {} |
6054 | 6055 |
6055 FakeContentLayerClient client_; | 6056 FakeContentLayerClient client_; |
6056 int frame_; | 6057 int frame_; |
6057 bool posted_; | 6058 bool posted_; |
6058 base::WaitableEvent playback_allowed_event_; | 6059 base::WaitableEvent playback_allowed_event_; |
6059 }; | 6060 }; |
6060 | 6061 |
(...skipping 1270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7331 DCHECK_EQ(hud->scroll_tree_index(), root_layer->scroll_tree_index()); | 7332 DCHECK_EQ(hud->scroll_tree_index(), root_layer->scroll_tree_index()); |
7332 } | 7333 } |
7333 | 7334 |
7334 void AfterTest() override {} | 7335 void AfterTest() override {} |
7335 }; | 7336 }; |
7336 | 7337 |
7337 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestHudLayerWithLayerLists); | 7338 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestHudLayerWithLayerLists); |
7338 | 7339 |
7339 } // namespace | 7340 } // namespace |
7340 } // namespace cc | 7341 } // namespace cc |
OLD | NEW |