| 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 4252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4263 overscroll_elasticity_layer, page_scale_layer, | 4263 overscroll_elasticity_layer, page_scale_layer, |
| 4264 inner_viewport_scroll_layer, nullptr); | 4264 inner_viewport_scroll_layer, nullptr); |
| 4265 LayerTreeHostTest::SetupTree(); | 4265 LayerTreeHostTest::SetupTree(); |
| 4266 client_.set_bounds(content_layer->bounds()); | 4266 client_.set_bounds(content_layer->bounds()); |
| 4267 } | 4267 } |
| 4268 | 4268 |
| 4269 void BeginTest() override { PostSetNeedsCommitToMainThread(); } | 4269 void BeginTest() override { PostSetNeedsCommitToMainThread(); } |
| 4270 | 4270 |
| 4271 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { | 4271 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { |
| 4272 if (host_impl->sync_tree()->source_frame_number() == 0) { | 4272 if (host_impl->sync_tree()->source_frame_number() == 0) { |
| 4273 scroll_elasticity_helper_ = host_impl->CreateScrollElasticityHelper(); | 4273 scroll_elasticity_helper_ = host_impl->CreateRootScrollElasticityHelper(); |
| 4274 } | 4274 } |
| 4275 } | 4275 } |
| 4276 | 4276 |
| 4277 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { | 4277 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { |
| 4278 num_draws_++; | 4278 num_draws_++; |
| 4279 LayerImpl* content_layer_impl = | 4279 LayerImpl* content_layer_impl = |
| 4280 host_impl->active_tree()->LayerById(content_layer_id_); | 4280 host_impl->active_tree()->LayerById(content_layer_id_); |
| 4281 gfx::Transform expected_draw_transform; | 4281 gfx::Transform expected_draw_transform; |
| 4282 switch (num_draws_) { | 4282 switch (num_draws_) { |
| 4283 case 1: | 4283 case 1: |
| (...skipping 2608 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6892 private: | 6892 private: |
| 6893 FakeContentLayerClient client_; | 6893 FakeContentLayerClient client_; |
| 6894 const gfx::Size viewport_size_; | 6894 const gfx::Size viewport_size_; |
| 6895 const gfx::Size large_image_size_; | 6895 const gfx::Size large_image_size_; |
| 6896 }; | 6896 }; |
| 6897 | 6897 |
| 6898 SINGLE_AND_MULTI_THREAD_TEST_F(GpuRasterizationSucceedsWithLargeImage); | 6898 SINGLE_AND_MULTI_THREAD_TEST_F(GpuRasterizationSucceedsWithLargeImage); |
| 6899 | 6899 |
| 6900 } // namespace | 6900 } // namespace |
| 6901 } // namespace cc | 6901 } // namespace cc |
| OLD | NEW |