| 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 4481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4492 page_scale_layer, | 4492 page_scale_layer, |
| 4493 inner_viewport_scroll_layer, nullptr); | 4493 inner_viewport_scroll_layer, nullptr); |
| 4494 LayerTreeHostTest::SetupTree(); | 4494 LayerTreeHostTest::SetupTree(); |
| 4495 client_.set_bounds(content_layer->bounds()); | 4495 client_.set_bounds(content_layer->bounds()); |
| 4496 } | 4496 } |
| 4497 | 4497 |
| 4498 void BeginTest() override { PostSetNeedsCommitToMainThread(); } | 4498 void BeginTest() override { PostSetNeedsCommitToMainThread(); } |
| 4499 | 4499 |
| 4500 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { | 4500 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { |
| 4501 if (host_impl->sync_tree()->source_frame_number() == 0) { | 4501 if (host_impl->sync_tree()->source_frame_number() == 0) { |
| 4502 scroll_elasticity_helper_ = host_impl->CreateScrollElasticityHelper(); | 4502 scroll_elasticity_helper_ = host_impl->CreateRootScrollElasticityHelper(); |
| 4503 } | 4503 } |
| 4504 } | 4504 } |
| 4505 | 4505 |
| 4506 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { | 4506 void DrawLayersOnThread(LayerTreeHostImpl* host_impl) override { |
| 4507 num_draws_++; | 4507 num_draws_++; |
| 4508 LayerImpl* content_layer_impl = | 4508 LayerImpl* content_layer_impl = |
| 4509 host_impl->active_tree()->LayerById(content_layer_id_); | 4509 host_impl->active_tree()->LayerById(content_layer_id_); |
| 4510 gfx::Transform expected_draw_transform; | 4510 gfx::Transform expected_draw_transform; |
| 4511 switch (num_draws_) { | 4511 switch (num_draws_) { |
| 4512 case 1: | 4512 case 1: |
| (...skipping 2495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7008 EndTest(); | 7008 EndTest(); |
| 7009 } | 7009 } |
| 7010 | 7010 |
| 7011 void AfterTest() override {} | 7011 void AfterTest() override {} |
| 7012 }; | 7012 }; |
| 7013 | 7013 |
| 7014 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSubmitFrameResources); | 7014 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestSubmitFrameResources); |
| 7015 | 7015 |
| 7016 } // namespace | 7016 } // namespace |
| 7017 } // namespace cc | 7017 } // namespace cc |
| OLD | NEW |