| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 } | 98 } |
| 99 return result; | 99 return result; |
| 100 } | 100 } |
| 101 | 101 |
| 102 void FakePictureLayerImpl::SetRasterSource( | 102 void FakePictureLayerImpl::SetRasterSource( |
| 103 scoped_refptr<RasterSource> raster_source) { | 103 scoped_refptr<RasterSource> raster_source) { |
| 104 raster_source_.swap(raster_source); | 104 raster_source_.swap(raster_source); |
| 105 if (tilings()) { | 105 if (tilings()) { |
| 106 for (size_t i = 0; i < num_tilings(); ++i) { | 106 for (size_t i = 0; i < num_tilings(); ++i) { |
| 107 tilings()->tiling_at(i)->UpdateTilesToCurrentRasterSource( | 107 tilings()->tiling_at(i)->UpdateTilesToCurrentRasterSource( |
| 108 raster_source_.get(), Region(), raster_source_->GetSize()); | 108 raster_source_.get(), Region(), raster_source_->GetSize(), |
| 109 base::TimeTicks()); |
| 109 } | 110 } |
| 110 } | 111 } |
| 111 } | 112 } |
| 112 | 113 |
| 113 void FakePictureLayerImpl::SetAllTilesVisible() { | 114 void FakePictureLayerImpl::SetAllTilesVisible() { |
| 114 WhichTree tree = | 115 WhichTree tree = |
| 115 layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE; | 116 layer_tree_impl()->IsActiveTree() ? ACTIVE_TREE : PENDING_TREE; |
| 116 | 117 |
| 117 for (size_t tiling_idx = 0; tiling_idx < tilings_->num_tilings(); | 118 for (size_t tiling_idx = 0; tiling_idx < tilings_->num_tilings(); |
| 118 ++tiling_idx) { | 119 ++tiling_idx) { |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 251 return CountTilesRequired( | 252 return CountTilesRequired( |
| 252 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); | 253 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); |
| 253 } | 254 } |
| 254 | 255 |
| 255 void FakePictureLayerImpl::ReleaseResources() { | 256 void FakePictureLayerImpl::ReleaseResources() { |
| 256 PictureLayerImpl::ReleaseResources(); | 257 PictureLayerImpl::ReleaseResources(); |
| 257 ++release_resources_count_; | 258 ++release_resources_count_; |
| 258 } | 259 } |
| 259 | 260 |
| 260 } // namespace cc | 261 } // namespace cc |
| OLD | NEW |