| 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 18 matching lines...) Expand all Loading... |
| 29 new FakePictureLayerImpl(tree_impl, id())).PassAs<LayerImpl>(); | 29 new FakePictureLayerImpl(tree_impl, id())).PassAs<LayerImpl>(); |
| 30 } | 30 } |
| 31 | 31 |
| 32 void FakePictureLayerImpl::AppendQuads(QuadSink* quad_sink, | 32 void FakePictureLayerImpl::AppendQuads(QuadSink* quad_sink, |
| 33 AppendQuadsData* append_quads_data) { | 33 AppendQuadsData* append_quads_data) { |
| 34 PictureLayerImpl::AppendQuads(quad_sink, append_quads_data); | 34 PictureLayerImpl::AppendQuads(quad_sink, append_quads_data); |
| 35 ++append_quads_count_; | 35 ++append_quads_count_; |
| 36 } | 36 } |
| 37 | 37 |
| 38 gfx::Size FakePictureLayerImpl::CalculateTileSize( | 38 gfx::Size FakePictureLayerImpl::CalculateTileSize( |
| 39 const gfx::Size& content_bounds) const { | 39 gfx::Size content_bounds) const { |
| 40 if (fixed_tile_size_.IsEmpty()) { | 40 if (fixed_tile_size_.IsEmpty()) { |
| 41 return PictureLayerImpl::CalculateTileSize(content_bounds); | 41 return PictureLayerImpl::CalculateTileSize(content_bounds); |
| 42 } | 42 } |
| 43 | 43 |
| 44 return fixed_tile_size_; | 44 return fixed_tile_size_; |
| 45 } | 45 } |
| 46 | 46 |
| 47 PictureLayerTiling* FakePictureLayerImpl::HighResTiling() const { | 47 PictureLayerTiling* FakePictureLayerImpl::HighResTiling() const { |
| 48 PictureLayerTiling* result = NULL; | 48 PictureLayerTiling* result = NULL; |
| 49 for (size_t i = 0; i < tilings_->num_tilings(); ++i) { | 49 for (size_t i = 0; i < tilings_->num_tilings(); ++i) { |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 DCHECK_EQ(tilings()->tiling_at(0)->resolution(), HIGH_RESOLUTION); | 117 DCHECK_EQ(tilings()->tiling_at(0)->resolution(), HIGH_RESOLUTION); |
| 118 DCHECK_EQ(tilings()->tiling_at(1)->resolution(), LOW_RESOLUTION); | 118 DCHECK_EQ(tilings()->tiling_at(1)->resolution(), LOW_RESOLUTION); |
| 119 HighResTiling()->CreateAllTilesForTesting(); | 119 HighResTiling()->CreateAllTilesForTesting(); |
| 120 LowResTiling()->CreateAllTilesForTesting(); | 120 LowResTiling()->CreateAllTilesForTesting(); |
| 121 } else { | 121 } else { |
| 122 DCHECK_EQ(tilings()->num_tilings(), 0u); | 122 DCHECK_EQ(tilings()->num_tilings(), 0u); |
| 123 } | 123 } |
| 124 } | 124 } |
| 125 | 125 |
| 126 } // namespace cc | 126 } // namespace cc |
| OLD | NEW |