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

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

Issue 2128633002: cc: Set up the framework to restrict access to Layer internals. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Move data from embedder into struct. Created 4 years, 5 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
« cc/layers/layer.h ('K') | « cc/test/fake_picture_layer.cc ('k') | no next file » | 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 53
54 class MockLayer : public Layer { 54 class MockLayer : public Layer {
55 public: 55 public:
56 static scoped_refptr<MockLayer> Create( 56 static scoped_refptr<MockLayer> Create(
57 std::vector<int>* layer_impl_destruction_list) { 57 std::vector<int>* layer_impl_destruction_list) {
58 return make_scoped_refptr(new MockLayer(layer_impl_destruction_list)); 58 return make_scoped_refptr(new MockLayer(layer_impl_destruction_list));
59 } 59 }
60 60
61 std::unique_ptr<LayerImpl> CreateLayerImpl( 61 std::unique_ptr<LayerImpl> CreateLayerImpl(
62 LayerTreeImpl* tree_impl) override { 62 LayerTreeImpl* tree_impl) override {
63 return MockLayerImpl::Create(tree_impl, layer_id_); 63 return MockLayerImpl::Create(tree_impl, id());
64 } 64 }
65 65
66 void PushPropertiesTo(LayerImpl* layer_impl) override { 66 void PushPropertiesTo(LayerImpl* layer_impl) override {
67 Layer::PushPropertiesTo(layer_impl); 67 Layer::PushPropertiesTo(layer_impl);
68 68
69 MockLayerImpl* mock_layer_impl = static_cast<MockLayerImpl*>(layer_impl); 69 MockLayerImpl* mock_layer_impl = static_cast<MockLayerImpl*>(layer_impl);
70 mock_layer_impl->SetLayerImplDestructionList(layer_impl_destruction_list_); 70 mock_layer_impl->SetLayerImplDestructionList(layer_impl_destruction_list_);
71 } 71 }
72 72
73 private: 73 private:
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 host_->CommitAndCreatePendingTree(); 698 host_->CommitAndCreatePendingTree();
699 host_impl->ActivateSyncTree(); 699 host_impl->ActivateSyncTree();
700 EXPECT_EQ( 700 EXPECT_EQ(
701 CombinedAnimationScale(0.f, 0.f), 701 CombinedAnimationScale(0.f, 0.f),
702 host_impl->active_tree()->property_trees()->GetAnimationScales( 702 host_impl->active_tree()->property_trees()->GetAnimationScales(
703 transform_layer->transform_tree_index(), host_impl->active_tree())); 703 transform_layer->transform_tree_index(), host_impl->active_tree()));
704 } 704 }
705 705
706 } // namespace 706 } // namespace
707 } // namespace cc 707 } // namespace cc
OLDNEW
« cc/layers/layer.h ('K') | « cc/test/fake_picture_layer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698