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 <limits> | 8 #include <limits> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
655 | 655 |
656 return layer_tree_impl()->tile_manager()->CreateTile( | 656 return layer_tree_impl()->tile_manager()->CreateTile( |
657 raster_source_.get(), content_rect.size(), content_rect, | 657 raster_source_.get(), content_rect.size(), content_rect, |
658 tiling->contents_scale(), id(), layer_tree_impl()->source_frame_number(), | 658 tiling->contents_scale(), id(), layer_tree_impl()->source_frame_number(), |
659 flags); | 659 flags); |
660 } | 660 } |
661 | 661 |
662 const Region* PictureLayerImpl::GetPendingInvalidation() { | 662 const Region* PictureLayerImpl::GetPendingInvalidation() { |
663 if (layer_tree_impl()->IsPendingTree()) | 663 if (layer_tree_impl()->IsPendingTree()) |
664 return &invalidation_; | 664 return &invalidation_; |
| 665 if (layer_tree_impl()->IsRecycleTree()) |
| 666 return nullptr; |
665 DCHECK(layer_tree_impl()->IsActiveTree()); | 667 DCHECK(layer_tree_impl()->IsActiveTree()); |
666 if (PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer()) | 668 if (PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer()) |
667 return &twin_layer->invalidation_; | 669 return &twin_layer->invalidation_; |
668 return nullptr; | 670 return nullptr; |
669 } | 671 } |
670 | 672 |
671 const PictureLayerTiling* PictureLayerImpl::GetPendingOrActiveTwinTiling( | 673 const PictureLayerTiling* PictureLayerImpl::GetPendingOrActiveTwinTiling( |
672 const PictureLayerTiling* tiling) const { | 674 const PictureLayerTiling* tiling) const { |
673 PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer(); | 675 PictureLayerImpl* twin_layer = GetPendingOrActiveTwinLayer(); |
674 if (!twin_layer) | 676 if (!twin_layer) |
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1309 | 1311 |
1310 bool PictureLayerImpl::AllTilesRequiredForDrawAreReadyToDraw() const { | 1312 bool PictureLayerImpl::AllTilesRequiredForDrawAreReadyToDraw() const { |
1311 if (!layer_tree_impl()->IsActiveTree()) | 1313 if (!layer_tree_impl()->IsActiveTree()) |
1312 return true; | 1314 return true; |
1313 | 1315 |
1314 return AllTilesRequiredAreReadyToDraw( | 1316 return AllTilesRequiredAreReadyToDraw( |
1315 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); | 1317 &PictureLayerTiling::IsTileRequiredForDrawIfVisible); |
1316 } | 1318 } |
1317 | 1319 |
1318 } // namespace cc | 1320 } // namespace cc |
OLD | NEW |