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 1113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1124 if (!raster_source_->HasRecordings()) | 1124 if (!raster_source_->HasRecordings()) |
1125 return false; | 1125 return false; |
1126 // If the |raster_source_| has a recording it should have non-empty bounds. | 1126 // If the |raster_source_| has a recording it should have non-empty bounds. |
1127 DCHECK(!raster_source_->GetSize().IsEmpty()); | 1127 DCHECK(!raster_source_->GetSize().IsEmpty()); |
1128 if (MaximumContentsScale() < MinimumContentsScale()) | 1128 if (MaximumContentsScale() < MinimumContentsScale()) |
1129 return false; | 1129 return false; |
1130 return true; | 1130 return true; |
1131 } | 1131 } |
1132 | 1132 |
1133 void PictureLayerImpl::SanityCheckTilingState() const { | 1133 void PictureLayerImpl::SanityCheckTilingState() const { |
1134 #if DCHECK_IS_ON | 1134 #if !DCHECK_IS_OFF |
1135 // Recycle tree doesn't have any restrictions. | 1135 // Recycle tree doesn't have any restrictions. |
1136 if (layer_tree_impl()->IsRecycleTree()) | 1136 if (layer_tree_impl()->IsRecycleTree()) |
1137 return; | 1137 return; |
1138 | 1138 |
1139 if (!CanHaveTilings()) { | 1139 if (!CanHaveTilings()) { |
1140 DCHECK_EQ(0u, tilings_->num_tilings()); | 1140 DCHECK_EQ(0u, tilings_->num_tilings()); |
1141 return; | 1141 return; |
1142 } | 1142 } |
1143 if (tilings_->num_tilings() == 0) | 1143 if (tilings_->num_tilings() == 0) |
1144 return; | 1144 return; |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 | 1325 |
1326 bool PictureLayerImpl::AllTilesRequiredForDrawAreReadyToDraw() const { | 1326 bool PictureLayerImpl::AllTilesRequiredForDrawAreReadyToDraw() const { |
1327 if (!layer_tree_impl()->IsActiveTree()) | 1327 if (!layer_tree_impl()->IsActiveTree()) |
1328 return true; | 1328 return true; |
1329 | 1329 |
1330 return AllTilesRequiredAreReadyToDraw( | 1330 return AllTilesRequiredAreReadyToDraw( |
1331 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); | 1331 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); |
1332 } | 1332 } |
1333 | 1333 |
1334 } // namespace cc | 1334 } // namespace cc |
OLD | NEW |