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

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

Issue 1864183002: cc: Main thread skip single layers instead of subtrees (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Format the comments 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 6479 matching lines...) Expand 10 before | Expand all | Expand 10 after
6490 6490
6491 not_affected_by_page_scale_.push_back(root->id()); 6491 not_affected_by_page_scale_.push_back(root->id());
6492 not_affected_by_page_scale_.push_back(pre_page_scale->id()); 6492 not_affected_by_page_scale_.push_back(pre_page_scale->id());
6493 not_affected_by_page_scale_.push_back(post_page_scale->id()); 6493 not_affected_by_page_scale_.push_back(post_page_scale->id());
6494 } 6494 }
6495 6495
6496 void BeginTest() override { PostSetNeedsCommitToMainThread(); } 6496 void BeginTest() override { PostSetNeedsCommitToMainThread(); }
6497 6497
6498 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override { 6498 void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
6499 LayerTreeHostCommon::CallFunctionForEveryLayer( 6499 LayerTreeHostCommon::CallFunctionForEveryLayer(
6500 host_impl->sync_tree(), [this](LayerImpl* layer) { 6500 host_impl->sync_tree(),
6501 [this](LayerImpl* layer) {
6501 const std::vector<int>& list = 6502 const std::vector<int>& list =
6502 layer->IsAffectedByPageScale() 6503 layer->IsAffectedByPageScale()
6503 ? this->affected_by_page_scale_ 6504 ? this->affected_by_page_scale_
6504 : this->not_affected_by_page_scale_; 6505 : this->not_affected_by_page_scale_;
6505 EXPECT_TRUE(std::find(list.begin(), list.end(), layer->id()) != 6506 EXPECT_TRUE(std::find(list.begin(), list.end(), layer->id()) !=
6506 list.end()); 6507 list.end());
6507 }); 6508 },
6509 CallFunctionLayerType::ALL_LAYERS);
6508 6510
6509 EndTest(); 6511 EndTest();
6510 } 6512 }
6511 6513
6512 void AfterTest() override {} 6514 void AfterTest() override {}
6513 6515
6514 std::vector<int> affected_by_page_scale_; 6516 std::vector<int> affected_by_page_scale_;
6515 std::vector<int> not_affected_by_page_scale_; 6517 std::vector<int> not_affected_by_page_scale_;
6516 }; 6518 };
6517 6519
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
6616 EndTest(); 6618 EndTest();
6617 } 6619 }
6618 6620
6619 void AfterTest() override {} 6621 void AfterTest() override {}
6620 }; 6622 };
6621 6623
6622 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor); 6624 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostTestPaintedDeviceScaleFactor);
6623 6625
6624 } // namespace 6626 } // namespace
6625 } // namespace cc 6627 } // 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