Chromium Code Reviews| 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/test/fake_picture_layer_impl.h" | 5 #include "cc/test/fake_picture_layer_impl.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 #include "cc/resources/tile.h" | 8 #include "cc/resources/tile.h" |
| 9 #include "cc/trees/layer_tree_impl.h" | 9 #include "cc/trees/layer_tree_impl.h" |
| 10 | 10 |
| 11 namespace cc { | 11 namespace cc { |
| 12 | 12 |
| 13 FakePictureLayerImpl::FakePictureLayerImpl( | 13 FakePictureLayerImpl::FakePictureLayerImpl( |
| 14 LayerTreeImpl* tree_impl, | 14 LayerTreeImpl* tree_impl, |
| 15 int id, | 15 int id, |
| 16 scoped_refptr<PicturePileImpl> pile) | 16 scoped_refptr<PicturePileImpl> pile, |
| 17 const gfx::Size& layer_bounds) | |
| 17 : PictureLayerImpl(tree_impl, id), | 18 : PictureLayerImpl(tree_impl, id), |
| 18 append_quads_count_(0) { | 19 append_quads_count_(0) { |
| 19 pile_ = pile; | 20 pile_ = pile; |
| 20 SetBounds(pile_->size()); | 21 SetBounds(layer_bounds); |
|
enne (OOO)
2014/04/11 20:19:51
Why do you need the explicit bounds here? Can you
ernstm
2014/04/11 23:43:51
Done. This was intended for new test cases.
| |
| 21 } | 22 } |
| 22 | 23 |
| 23 FakePictureLayerImpl::FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id) | 24 FakePictureLayerImpl::FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id) |
| 24 : PictureLayerImpl(tree_impl, id), append_quads_count_(0) {} | 25 : PictureLayerImpl(tree_impl, id), append_quads_count_(0) {} |
| 25 | 26 |
| 26 scoped_ptr<LayerImpl> FakePictureLayerImpl::CreateLayerImpl( | 27 scoped_ptr<LayerImpl> FakePictureLayerImpl::CreateLayerImpl( |
| 27 LayerTreeImpl* tree_impl) { | 28 LayerTreeImpl* tree_impl) { |
| 28 return make_scoped_ptr( | 29 return make_scoped_ptr( |
| 29 new FakePictureLayerImpl(tree_impl, id())).PassAs<LayerImpl>(); | 30 new FakePictureLayerImpl(tree_impl, id())).PassAs<LayerImpl>(); |
| 30 } | 31 } |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 130 DCHECK_EQ(tilings()->tiling_at(0)->resolution(), HIGH_RESOLUTION); | 131 DCHECK_EQ(tilings()->tiling_at(0)->resolution(), HIGH_RESOLUTION); |
| 131 DCHECK_EQ(tilings()->tiling_at(1)->resolution(), LOW_RESOLUTION); | 132 DCHECK_EQ(tilings()->tiling_at(1)->resolution(), LOW_RESOLUTION); |
| 132 HighResTiling()->CreateAllTilesForTesting(); | 133 HighResTiling()->CreateAllTilesForTesting(); |
| 133 LowResTiling()->CreateAllTilesForTesting(); | 134 LowResTiling()->CreateAllTilesForTesting(); |
| 134 } else { | 135 } else { |
| 135 DCHECK_EQ(tilings()->num_tilings(), 0u); | 136 DCHECK_EQ(tilings()->num_tilings(), 0u); |
| 136 } | 137 } |
| 137 } | 138 } |
| 138 | 139 |
| 139 } // namespace cc | 140 } // namespace cc |
| OLD | NEW |