| 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 194 TileRequirementCheck is_tile_required_callback) const { | 194 TileRequirementCheck is_tile_required_callback) const { |
| 195 if (!HasValidTilePriorities()) | 195 if (!HasValidTilePriorities()) |
| 196 return 0; | 196 return 0; |
| 197 | 197 |
| 198 if (!tilings_) | 198 if (!tilings_) |
| 199 return 0; | 199 return 0; |
| 200 | 200 |
| 201 if (visible_rect_for_tile_priority_.IsEmpty()) | 201 if (visible_rect_for_tile_priority_.IsEmpty()) |
| 202 return 0; | 202 return 0; |
| 203 | 203 |
| 204 gfx::Rect rect = GetViewportForTilePriorityInContentSpace(); | 204 gfx::Rect rect = viewport_rect_for_tile_priority_in_content_space_; |
| 205 rect.Intersect(visible_rect_for_tile_priority_); | 205 rect.Intersect(visible_rect_for_tile_priority_); |
| 206 | 206 |
| 207 size_t count = 0; | 207 size_t count = 0; |
| 208 | 208 |
| 209 for (size_t i = 0; i < tilings_->num_tilings(); ++i) { | 209 for (size_t i = 0; i < tilings_->num_tilings(); ++i) { |
| 210 PictureLayerTiling* tiling = tilings_->tiling_at(i); | 210 PictureLayerTiling* tiling = tilings_->tiling_at(i); |
| 211 if (tiling->resolution() != HIGH_RESOLUTION && | 211 if (tiling->resolution() != HIGH_RESOLUTION && |
| 212 tiling->resolution() != LOW_RESOLUTION) | 212 tiling->resolution() != LOW_RESOLUTION) |
| 213 continue; | 213 continue; |
| 214 | 214 |
| (...skipping 33 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 |