| 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 6458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6469 affected_by_page_scale_.push_back(page_scale_grandchild->id()); | 6469 affected_by_page_scale_.push_back(page_scale_grandchild->id()); |
| 6470 | 6470 |
| 6471 not_affected_by_page_scale_.push_back(root->id()); | 6471 not_affected_by_page_scale_.push_back(root->id()); |
| 6472 not_affected_by_page_scale_.push_back(pre_page_scale->id()); | 6472 not_affected_by_page_scale_.push_back(pre_page_scale->id()); |
| 6473 not_affected_by_page_scale_.push_back(post_page_scale->id()); | 6473 not_affected_by_page_scale_.push_back(post_page_scale->id()); |
| 6474 } | 6474 } |
| 6475 | 6475 |
| 6476 void BeginTest() override { PostSetNeedsCommitToMainThread(); } | 6476 void BeginTest() override { PostSetNeedsCommitToMainThread(); } |
| 6477 | 6477 |
| 6478 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { | 6478 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { |
| 6479 LayerTreeHostCommon::CallFunctionForSubtree( | 6479 LayerTreeHostCommon::CallFunctionForEveryLayer( |
| 6480 host_impl->sync_tree()->root_layer(), [this](LayerImpl* layer) { | 6480 host_impl->sync_tree(), [this](LayerImpl* layer) { |
| 6481 const std::vector<int>& list = | 6481 const std::vector<int>& list = |
| 6482 layer->IsAffectedByPageScale() | 6482 layer->IsAffectedByPageScale() |
| 6483 ? this->affected_by_page_scale_ | 6483 ? this->affected_by_page_scale_ |
| 6484 : this->not_affected_by_page_scale_; | 6484 : this->not_affected_by_page_scale_; |
| 6485 EXPECT_TRUE(std::find(list.begin(), list.end(), layer->id()) != | 6485 EXPECT_TRUE(std::find(list.begin(), list.end(), layer->id()) != |
| 6486 list.end()); | 6486 list.end()); |
| 6487 }); | 6487 }); |
| 6488 | 6488 |
| 6489 EndTest(); | 6489 EndTest(); |
| 6490 } | 6490 } |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6596 EndTest(); | 6596 EndTest(); |
| 6597 } | 6597 } |
| 6598 | 6598 |
| 6599 void AfterTest() override {} | 6599 void AfterTest() override {} |
| 6600 }; | 6600 }; |
| 6601 | 6601 |
| 6602 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); | 6602 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); |
| 6603 | 6603 |
| 6604 } // namespace | 6604 } // namespace |
| 6605 } // namespace cc | 6605 } // namespace cc |
| OLD | NEW |