| 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 | 9 |
| 10 #include "base/debug/trace_event_argument.h" | 10 #include "base/debug/trace_event_argument.h" |
| (...skipping 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1610 return *this; | 1610 return *this; |
| 1611 } | 1611 } |
| 1612 | 1612 |
| 1613 PictureLayerImpl::LayerEvictionTileIterator::operator bool() const { | 1613 PictureLayerImpl::LayerEvictionTileIterator::operator bool() const { |
| 1614 return !!current_iterator_; | 1614 return !!current_iterator_; |
| 1615 } | 1615 } |
| 1616 | 1616 |
| 1617 bool PictureLayerImpl::LayerEvictionTileIterator::AdvanceToNextCategory() { | 1617 bool PictureLayerImpl::LayerEvictionTileIterator::AdvanceToNextCategory() { |
| 1618 switch (current_category_) { | 1618 switch (current_category_) { |
| 1619 case PictureLayerTiling::EVENTUALLY: | 1619 case PictureLayerTiling::EVENTUALLY: |
| 1620 current_category_ = |
| 1621 PictureLayerTiling::EVENTUALLY_AND_REQUIRED_FOR_ACTIVATION; |
| 1622 return true; |
| 1623 case PictureLayerTiling::EVENTUALLY_AND_REQUIRED_FOR_ACTIVATION: |
| 1620 current_category_ = PictureLayerTiling::SOON; | 1624 current_category_ = PictureLayerTiling::SOON; |
| 1621 return true; | 1625 return true; |
| 1622 case PictureLayerTiling::SOON: | 1626 case PictureLayerTiling::SOON: |
| 1627 current_category_ = PictureLayerTiling::SOON_AND_REQUIRED_FOR_ACTIVATION; |
| 1628 return true; |
| 1629 case PictureLayerTiling::SOON_AND_REQUIRED_FOR_ACTIVATION: |
| 1623 current_category_ = PictureLayerTiling::NOW; | 1630 current_category_ = PictureLayerTiling::NOW; |
| 1624 return true; | 1631 return true; |
| 1625 case PictureLayerTiling::NOW: | 1632 case PictureLayerTiling::NOW: |
| 1626 current_category_ = PictureLayerTiling::NOW_AND_REQUIRED_FOR_ACTIVATION; | 1633 current_category_ = PictureLayerTiling::NOW_AND_REQUIRED_FOR_ACTIVATION; |
| 1627 return true; | 1634 return true; |
| 1628 case PictureLayerTiling::NOW_AND_REQUIRED_FOR_ACTIVATION: | 1635 case PictureLayerTiling::NOW_AND_REQUIRED_FOR_ACTIVATION: |
| 1629 return false; | 1636 return false; |
| 1630 } | 1637 } |
| 1631 NOTREACHED(); | 1638 NOTREACHED(); |
| 1632 return false; | 1639 return false; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1689 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); | 1696 PictureLayerTilingSet::TilingRange tiling_range = CurrentTilingRange(); |
| 1690 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; | 1697 size_t current_tiling_range_offset = current_tiling_ - tiling_range.start; |
| 1691 return tiling_range.end - 1 - current_tiling_range_offset; | 1698 return tiling_range.end - 1 - current_tiling_range_offset; |
| 1692 } | 1699 } |
| 1693 } | 1700 } |
| 1694 NOTREACHED(); | 1701 NOTREACHED(); |
| 1695 return 0; | 1702 return 0; |
| 1696 } | 1703 } |
| 1697 | 1704 |
| 1698 } // namespace cc | 1705 } // namespace cc |
| OLD | NEW |