OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/layers/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 #include <utility> | 10 #include <utility> |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 | 125 |
126 void SetupPendingTree(scoped_refptr<PicturePileImpl> pile) { | 126 void SetupPendingTree(scoped_refptr<PicturePileImpl> pile) { |
127 host_impl_.CreatePendingTree(); | 127 host_impl_.CreatePendingTree(); |
128 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); | 128 LayerTreeImpl* pending_tree = host_impl_.pending_tree(); |
129 // Clear recycled tree. | 129 // Clear recycled tree. |
130 pending_tree->DetachLayerTree(); | 130 pending_tree->DetachLayerTree(); |
131 | 131 |
132 scoped_ptr<FakePictureLayerImpl> pending_layer = | 132 scoped_ptr<FakePictureLayerImpl> pending_layer = |
133 FakePictureLayerImpl::CreateWithPile(pending_tree, id_, pile); | 133 FakePictureLayerImpl::CreateWithPile(pending_tree, id_, pile); |
134 pending_layer->SetDrawsContent(true); | 134 pending_layer->SetDrawsContent(true); |
135 pending_layer->SetAnchorPoint(gfx::PointF()); | 135 pending_layer->SetTransformOrigin(gfx::Point3F()); |
136 pending_tree->SetRootLayer(pending_layer.PassAs<LayerImpl>()); | 136 pending_tree->SetRootLayer(pending_layer.PassAs<LayerImpl>()); |
137 | 137 |
138 pending_layer_ = static_cast<FakePictureLayerImpl*>( | 138 pending_layer_ = static_cast<FakePictureLayerImpl*>( |
139 host_impl_.pending_tree()->LayerById(id_)); | 139 host_impl_.pending_tree()->LayerById(id_)); |
140 pending_layer_->DoPostCommitInitializationIfNeeded(); | 140 pending_layer_->DoPostCommitInitializationIfNeeded(); |
141 } | 141 } |
142 | 142 |
143 static void VerifyAllTilesExistAndHavePile( | 143 static void VerifyAllTilesExistAndHavePile( |
144 const PictureLayerTiling* tiling, | 144 const PictureLayerTiling* tiling, |
145 PicturePileImpl* pile) { | 145 PicturePileImpl* pile) { |
(...skipping 2810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2956 1.f, // maximum animation scale | 2956 1.f, // maximum animation scale |
2957 false, | 2957 false, |
2958 &result_scale_x, | 2958 &result_scale_x, |
2959 &result_scale_y, | 2959 &result_scale_y, |
2960 &result_bounds); | 2960 &result_bounds); |
2961 EXPECT_EQ(1u, pending_layer_->tilings()->num_tilings()); | 2961 EXPECT_EQ(1u, pending_layer_->tilings()->num_tilings()); |
2962 } | 2962 } |
2963 | 2963 |
2964 } // namespace | 2964 } // namespace |
2965 } // namespace cc | 2965 } // namespace cc |
OLD | NEW |