| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/layers/picture_layer_impl.h" | 5 #include "cc/layers/picture_layer_impl.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 1097 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1108 if (!raster_source_->HasRecordings()) | 1108 if (!raster_source_->HasRecordings()) |
| 1109 return false; | 1109 return false; |
| 1110 // If the |raster_source_| has a recording it should have non-empty bounds. | 1110 // If the |raster_source_| has a recording it should have non-empty bounds. |
| 1111 DCHECK(!raster_source_->GetSize().IsEmpty()); | 1111 DCHECK(!raster_source_->GetSize().IsEmpty()); |
| 1112 if (MaximumContentsScale() < MinimumContentsScale()) | 1112 if (MaximumContentsScale() < MinimumContentsScale()) |
| 1113 return false; | 1113 return false; |
| 1114 return true; | 1114 return true; |
| 1115 } | 1115 } |
| 1116 | 1116 |
| 1117 void PictureLayerImpl::SanityCheckTilingState() const { | 1117 void PictureLayerImpl::SanityCheckTilingState() const { |
| 1118 #if DCHECK_IS_ON | 1118 #if DCHECK_IS_ON() |
| 1119 // Recycle tree doesn't have any restrictions. | 1119 // Recycle tree doesn't have any restrictions. |
| 1120 if (layer_tree_impl()->IsRecycleTree()) | 1120 if (layer_tree_impl()->IsRecycleTree()) |
| 1121 return; | 1121 return; |
| 1122 | 1122 |
| 1123 if (!CanHaveTilings()) { | 1123 if (!CanHaveTilings()) { |
| 1124 DCHECK_EQ(0u, tilings_->num_tilings()); | 1124 DCHECK_EQ(0u, tilings_->num_tilings()); |
| 1125 return; | 1125 return; |
| 1126 } | 1126 } |
| 1127 if (tilings_->num_tilings() == 0) | 1127 if (tilings_->num_tilings() == 0) |
| 1128 return; | 1128 return; |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1309 | 1309 |
| 1310 bool PictureLayerImpl::AllTilesRequiredForDrawAreReadyToDraw() const { | 1310 bool PictureLayerImpl::AllTilesRequiredForDrawAreReadyToDraw() const { |
| 1311 if (!layer_tree_impl()->IsActiveTree()) | 1311 if (!layer_tree_impl()->IsActiveTree()) |
| 1312 return true; | 1312 return true; |
| 1313 | 1313 |
| 1314 return AllTilesRequiredAreReadyToDraw( | 1314 return AllTilesRequiredAreReadyToDraw( |
| 1315 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); | 1315 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); |
| 1316 } | 1316 } |
| 1317 | 1317 |
| 1318 } // namespace cc | 1318 } // namespace cc |
| OLD | NEW |