| 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 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 625 tiling->contents_scale(), | 625 tiling->contents_scale(), |
| 626 id(), | 626 id(), |
| 627 layer_tree_impl()->source_frame_number(), | 627 layer_tree_impl()->source_frame_number(), |
| 628 flags); | 628 flags); |
| 629 } | 629 } |
| 630 | 630 |
| 631 PicturePileImpl* PictureLayerImpl::GetPile() { | 631 PicturePileImpl* PictureLayerImpl::GetPile() { |
| 632 return pile_.get(); | 632 return pile_.get(); |
| 633 } | 633 } |
| 634 | 634 |
| 635 const Region* PictureLayerImpl::GetInvalidation() { | 635 const Region* PictureLayerImpl::GetPendingInvalidation() { |
| 636 return &invalidation_; | 636 if (layer_tree_impl()->IsPendingTree()) |
| 637 return &invalidation_; |
| 638 DCHECK(layer_tree_impl()->IsActiveTree()); |
| 639 if (PictureLayerImpl* twin_layer = GetTwinLayer()) |
| 640 return &twin_layer->invalidation_; |
| 641 return nullptr; |
| 637 } | 642 } |
| 638 | 643 |
| 639 const PictureLayerTiling* PictureLayerImpl::GetTwinTiling( | 644 const PictureLayerTiling* PictureLayerImpl::GetTwinTiling( |
| 640 const PictureLayerTiling* tiling) const { | 645 const PictureLayerTiling* tiling) const { |
| 641 if (!twin_layer_) | 646 if (!twin_layer_) |
| 642 return nullptr; | 647 return nullptr; |
| 643 return twin_layer_->tilings_->TilingAtScale(tiling->contents_scale()); | 648 return twin_layer_->tilings_->TilingAtScale(tiling->contents_scale()); |
| 644 } | 649 } |
| 645 | 650 |
| 646 PictureLayerTiling* PictureLayerImpl::GetRecycledTwinTiling( | 651 PictureLayerTiling* PictureLayerImpl::GetRecycledTwinTiling( |
| (...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1676 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); | 1681 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); |
| 1677 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; | 1682 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; |
| 1678 return tiling_range.end - 1 - current_tiling_range_offset; | 1683 return tiling_range.end - 1 - current_tiling_range_offset; |
| 1679 } | 1684 } |
| 1680 } | 1685 } |
| 1681 NOTREACHED(); | 1686 NOTREACHED(); |
| 1682 return 0; | 1687 return 0; |
| 1683 } | 1688 } |
| 1684 | 1689 |
| 1685 } // namespace cc | 1690 } // namespace cc |
| OLD | NEW |