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 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
167 void FakePictureLayerImpl::SetAllTilesReadyInTiling( | 167 void FakePictureLayerImpl::SetAllTilesReadyInTiling( |
168 PictureLayerTiling* tiling) { | 168 PictureLayerTiling* tiling) { |
169 std::vector<Tile*> tiles = tiling->AllTilesForTesting(); | 169 std::vector<Tile*> tiles = tiling->AllTilesForTesting(); |
170 for (size_t tile_idx = 0; tile_idx < tiles.size(); ++tile_idx) { | 170 for (size_t tile_idx = 0; tile_idx < tiles.size(); ++tile_idx) { |
171 Tile* tile = tiles[tile_idx]; | 171 Tile* tile = tiles[tile_idx]; |
172 SetTileReady(tile); | 172 SetTileReady(tile); |
173 } | 173 } |
174 } | 174 } |
175 | 175 |
176 void FakePictureLayerImpl::SetTileReady(Tile* tile) { | 176 void FakePictureLayerImpl::SetTileReady(Tile* tile) { |
177 ManagedTileState& state = tile->managed_state(); | 177 TileDrawInfo& draw_info = tile->draw_info(); |
178 state.draw_info.SetSolidColorForTesting(true); | 178 draw_info.SetSolidColorForTesting(true); |
179 DCHECK(tile->IsReadyToDraw()); | 179 DCHECK(tile->IsReadyToDraw()); |
180 } | 180 } |
181 | 181 |
182 void FakePictureLayerImpl::DidBecomeActive() { | 182 void FakePictureLayerImpl::DidBecomeActive() { |
183 PictureLayerImpl::DidBecomeActive(); | 183 PictureLayerImpl::DidBecomeActive(); |
184 ++did_become_active_call_count_; | 184 ++did_become_active_call_count_; |
185 } | 185 } |
186 | 186 |
187 bool FakePictureLayerImpl::HasValidTilePriorities() const { | 187 bool FakePictureLayerImpl::HasValidTilePriorities() const { |
188 return use_set_valid_tile_priorities_flag_ | 188 return use_set_valid_tile_priorities_flag_ |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
248 return CountTilesRequired( | 248 return CountTilesRequired( |
249 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); | 249 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); |
250 } | 250 } |
251 | 251 |
252 void FakePictureLayerImpl::ReleaseResources() { | 252 void FakePictureLayerImpl::ReleaseResources() { |
253 PictureLayerImpl::ReleaseResources(); | 253 PictureLayerImpl::ReleaseResources(); |
254 ++release_resources_count_; | 254 ++release_resources_count_; |
255 } | 255 } |
256 | 256 |
257 } // namespace cc | 257 } // namespace cc |
OLD | NEW |