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

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

Issue 2216203002: Refactor MutatorHostClient from LayerTreeHost to LayerTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on another LTH refactor CL. Created 4 years, 4 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/tree_synchronizer.cc ('k') | content/renderer/gpu/gpu_benchmarking_extension.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/tree_synchronizer.h" 5 #include "cc/trees/tree_synchronizer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <set> 10 #include <set>
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 explicit MockLayer(std::vector<int>* layer_impl_destruction_list) 76 explicit MockLayer(std::vector<int>* layer_impl_destruction_list)
77 : layer_impl_destruction_list_(layer_impl_destruction_list) {} 77 : layer_impl_destruction_list_(layer_impl_destruction_list) {}
78 ~MockLayer() override {} 78 ~MockLayer() override {}
79 79
80 std::vector<int>* layer_impl_destruction_list_; 80 std::vector<int>* layer_impl_destruction_list_;
81 }; 81 };
82 82
83 void ExpectTreesAreIdentical(Layer* root_layer, 83 void ExpectTreesAreIdentical(Layer* root_layer,
84 LayerImpl* root_layer_impl, 84 LayerImpl* root_layer_impl,
85 LayerTreeImpl* tree_impl) { 85 LayerTreeImpl* tree_impl) {
86 auto layer_iter = root_layer->layer_tree_host()->begin(); 86 auto layer_iter = root_layer->GetLayerTree()->begin();
87 auto layer_impl_iter = tree_impl->begin(); 87 auto layer_impl_iter = tree_impl->begin();
88 for (; layer_iter != root_layer->layer_tree_host()->end(); 88 for (; layer_iter != root_layer->GetLayerTree()->end();
89 ++layer_iter, ++layer_impl_iter) { 89 ++layer_iter, ++layer_impl_iter) {
90 Layer* layer = *layer_iter; 90 Layer* layer = *layer_iter;
91 LayerImpl* layer_impl = *layer_impl_iter; 91 LayerImpl* layer_impl = *layer_impl_iter;
92 ASSERT_TRUE(layer); 92 ASSERT_TRUE(layer);
93 ASSERT_TRUE(layer_impl); 93 ASSERT_TRUE(layer_impl);
94 94
95 EXPECT_EQ(layer->id(), layer_impl->id()); 95 EXPECT_EQ(layer->id(), layer_impl->id());
96 EXPECT_EQ(layer_impl->layer_tree_impl(), tree_impl); 96 EXPECT_EQ(layer_impl->layer_tree_impl(), tree_impl);
97 97
98 EXPECT_EQ(layer->non_fast_scrollable_region(), 98 EXPECT_EQ(layer->non_fast_scrollable_region(),
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 host_->CommitAndCreatePendingTree(); 699 host_->CommitAndCreatePendingTree();
700 host_impl->ActivateSyncTree(); 700 host_impl->ActivateSyncTree();
701 EXPECT_EQ( 701 EXPECT_EQ(
702 CombinedAnimationScale(0.f, 0.f), 702 CombinedAnimationScale(0.f, 0.f),
703 host_impl->active_tree()->property_trees()->GetAnimationScales( 703 host_impl->active_tree()->property_trees()->GetAnimationScales(
704 transform_layer->transform_tree_index(), host_impl->active_tree())); 704 transform_layer->transform_tree_index(), host_impl->active_tree()));
705 } 705 }
706 706
707 } // namespace 707 } // namespace
708 } // namespace cc 708 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/tree_synchronizer.cc ('k') | content/renderer/gpu/gpu_benchmarking_extension.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698