Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(88)

Side by Side Diff: cc/trees/layer_tree_host_unittest.cc

Issue 1846043002: cc : Make CallFunctionForSubtree on impl use layer iterator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_serialization.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl.cc ('k') | cc/trees/layer_tree_host_unittest_serialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698