| 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 |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 FakePictureLayerImpl::FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id) | 35 FakePictureLayerImpl::FakePictureLayerImpl(LayerTreeImpl* tree_impl, int id) |
| 36 : PictureLayerImpl(tree_impl, id), append_quads_count_(0) {} | 36 : PictureLayerImpl(tree_impl, id), append_quads_count_(0) {} |
| 37 | 37 |
| 38 scoped_ptr<LayerImpl> FakePictureLayerImpl::CreateLayerImpl( | 38 scoped_ptr<LayerImpl> FakePictureLayerImpl::CreateLayerImpl( |
| 39 LayerTreeImpl* tree_impl) { | 39 LayerTreeImpl* tree_impl) { |
| 40 return make_scoped_ptr( | 40 return make_scoped_ptr( |
| 41 new FakePictureLayerImpl(tree_impl, id())).PassAs<LayerImpl>(); | 41 new FakePictureLayerImpl(tree_impl, id())).PassAs<LayerImpl>(); |
| 42 } | 42 } |
| 43 | 43 |
| 44 void FakePictureLayerImpl::AppendQuads(QuadSink* quad_sink, | 44 void FakePictureLayerImpl::AppendQuads( |
| 45 AppendQuadsData* append_quads_data) { | 45 RenderPass* render_pass, |
| 46 PictureLayerImpl::AppendQuads(quad_sink, append_quads_data); | 46 const OcclusionTracker<LayerImpl>& occlusion_tracker, |
| 47 AppendQuadsData* append_quads_data) { |
| 48 PictureLayerImpl::AppendQuads( |
| 49 render_pass, occlusion_tracker, append_quads_data); |
| 47 ++append_quads_count_; | 50 ++append_quads_count_; |
| 48 } | 51 } |
| 49 | 52 |
| 50 gfx::Size FakePictureLayerImpl::CalculateTileSize( | 53 gfx::Size FakePictureLayerImpl::CalculateTileSize( |
| 51 const gfx::Size& content_bounds) const { | 54 const gfx::Size& content_bounds) const { |
| 52 if (fixed_tile_size_.IsEmpty()) { | 55 if (fixed_tile_size_.IsEmpty()) { |
| 53 return PictureLayerImpl::CalculateTileSize(content_bounds); | 56 return PictureLayerImpl::CalculateTileSize(content_bounds); |
| 54 } | 57 } |
| 55 | 58 |
| 56 return fixed_tile_size_; | 59 return fixed_tile_size_; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 if (layer_tree_impl()->settings().create_low_res_tiling) { | 148 if (layer_tree_impl()->settings().create_low_res_tiling) { |
| 146 DCHECK_EQ(tilings()->tiling_at(1)->resolution(), LOW_RESOLUTION); | 149 DCHECK_EQ(tilings()->tiling_at(1)->resolution(), LOW_RESOLUTION); |
| 147 LowResTiling()->CreateAllTilesForTesting(); | 150 LowResTiling()->CreateAllTilesForTesting(); |
| 148 } | 151 } |
| 149 } else { | 152 } else { |
| 150 DCHECK_EQ(tilings()->num_tilings(), 0u); | 153 DCHECK_EQ(tilings()->num_tilings(), 0u); |
| 151 } | 154 } |
| 152 } | 155 } |
| 153 | 156 |
| 154 } // namespace cc | 157 } // namespace cc |
| OLD | NEW |