| 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 4509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4520 page_scale_layer, | 4520 page_scale_layer, |
| 4521 inner_viewport_scroll_layer, nullptr); | 4521 inner_viewport_scroll_layer, nullptr); |
| 4522 LayerTreeHostTest::SetupTree(); | 4522 LayerTreeHostTest::SetupTree(); |
| 4523 client_.set_bounds(content_layer->bounds()); | 4523 client_.set_bounds(content_layer->bounds()); |
| 4524 } | 4524 } |
| 4525 | 4525 |
| 4526 void BeginTest() override { PostSetNeedsCommitToMainThread(); } | 4526 void BeginTest() override { PostSetNeedsCommitToMainThread(); } |
| 4527 | 4527 |
| 4528 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { | 4528 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { |
| 4529 if (host_impl->sync_tree()->source_frame_number() == 0) { | 4529 if (host_impl->sync_tree()->source_frame_number() == 0) { |
| 4530 scroll_elasticity_helper_ = host_impl->CreateScrollElasticityHelper(); | 4530 scroll_elasticity_helper_ = host_impl->CreateRootScrollElasticityHelper(); |
| 4531 } | 4531 } |
| 4532 } | 4532 } |
| 4533 | 4533 |
| 4534 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { | 4534 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { |
| 4535 num_draws_++; | 4535 num_draws_++; |
| 4536 LayerImpl* content_layer_impl = | 4536 LayerImpl* content_layer_impl = |
| 4537 host_impl->active_tree()->LayerById(content_layer_id_); | 4537 host_impl->active_tree()->LayerById(content_layer_id_); |
| 4538 gfx::Transform expected_draw_transform; | 4538 gfx::Transform expected_draw_transform; |
| 4539 switch (num_draws_) { | 4539 switch (num_draws_) { |
| 4540 case 1: | 4540 case 1: |
| (...skipping 2495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7036 EndTest(); | 7036 EndTest(); |
| 7037 } | 7037 } |
| 7038 | 7038 |
| 7039 void AfterTest() override {} | 7039 void AfterTest() override {} |
| 7040 }; | 7040 }; |
| 7041 | 7041 |
| 7042 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSubmitFrameResources); | 7042 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSubmitFrameResources); |
| 7043 | 7043 |
| 7044 } // namespace | 7044 } // namespace |
| 7045 } // namespace cc | 7045 } // namespace cc |
| OLD | NEW |