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

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
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 6420 matching lines...) Expand 10 before | Expand all | Expand 10 after
6431 affected_by_page_scale_.push_back(page_scale_grandchild->id()); 6431 affected_by_page_scale_.push_back(page_scale_grandchild->id());
6432 6432
6433 not_affected_by_page_scale_.push_back(root->id()); 6433 not_affected_by_page_scale_.push_back(root->id());
6434 not_affected_by_page_scale_.push_back(pre_page_scale->id()); 6434 not_affected_by_page_scale_.push_back(pre_page_scale->id());
6435 not_affected_by_page_scale_.push_back(post_page_scale->id()); 6435 not_affected_by_page_scale_.push_back(post_page_scale->id());
6436 } 6436 }
6437 6437
6438 void BeginTest() override { PostSetNeedsCommitToMainThread(); } 6438 void BeginTest() override { PostSetNeedsCommitToMainThread(); }
6439 6439
6440 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { 6440 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
6441 LayerTreeHostCommon::CallFunctionForSubtree( 6441 LayerTreeHostCommon::CallFunctionForEveryLayer(
6442 host_impl->sync_tree()->root_layer(), [this](LayerImpl* layer) { 6442 host_impl->sync_tree()->root_layer(), [this](LayerImpl* layer) {
6443 const std::vector<int>& list = 6443 const std::vector<int>& list =
6444 layer->IsAffectedByPageScale() 6444 layer->IsAffectedByPageScale()
6445 ? this->affected_by_page_scale_ 6445 ? this->affected_by_page_scale_
6446 : this->not_affected_by_page_scale_; 6446 : this->not_affected_by_page_scale_;
6447 EXPECT_TRUE(std::find(list.begin(), list.end(), layer->id()) != 6447 EXPECT_TRUE(std::find(list.begin(), list.end(), layer->id()) !=
6448 list.end()); 6448 list.end());
6449 }); 6449 });
6450 6450
6451 EndTest(); 6451 EndTest();
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
6558 EndTest(); 6558 EndTest();
6559 } 6559 }
6560 6560
6561 void AfterTest() override {} 6561 void AfterTest() override {}
6562 }; 6562 };
6563 6563
6564 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); 6564 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor);
6565 6565
6566 } // namespace 6566 } // namespace
6567 } // namespace cc 6567 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698