| 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/time/time.h" | 10 #include "base/time/time.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // Don't pre-rasterize on the GPU (except for kBackflingGuardDistancePixels in | 39 // Don't pre-rasterize on the GPU (except for kBackflingGuardDistancePixels in |
| 40 // TileManager::BinFromTilePriority). | 40 // TileManager::BinFromTilePriority). |
| 41 const float kGpuSkewportTargetTimeInFrames = 0.0f; | 41 const float kGpuSkewportTargetTimeInFrames = 0.0f; |
| 42 | 42 |
| 43 // Minimum width/height of a layer that would require analysis for tiles. | 43 // Minimum width/height of a layer that would require analysis for tiles. |
| 44 const int kMinDimensionsForAnalysis = 256; | 44 const int kMinDimensionsForAnalysis = 256; |
| 45 } // namespace | 45 } // namespace |
| 46 | 46 |
| 47 namespace cc { | 47 namespace cc { |
| 48 | 48 |
| 49 PictureLayerImpl::Pair::Pair() : active(NULL), pending(NULL) { |
| 50 } |
| 51 |
| 52 PictureLayerImpl::Pair::Pair(PictureLayerImpl* active_layer, |
| 53 PictureLayerImpl* pending_layer) |
| 54 : active(active_layer), pending(pending_layer) { |
| 55 } |
| 56 |
| 57 PictureLayerImpl::Pair::~Pair() { |
| 58 } |
| 59 |
| 49 PictureLayerImpl::PictureLayerImpl(LayerTreeImpl* tree_impl, int id) | 60 PictureLayerImpl::PictureLayerImpl(LayerTreeImpl* tree_impl, int id) |
| 50 : LayerImpl(tree_impl, id), | 61 : LayerImpl(tree_impl, id), |
| 51 twin_layer_(NULL), | 62 twin_layer_(NULL), |
| 52 pile_(PicturePileImpl::Create()), | 63 pile_(PicturePileImpl::Create()), |
| 53 is_mask_(false), | 64 is_mask_(false), |
| 54 ideal_page_scale_(0.f), | 65 ideal_page_scale_(0.f), |
| 55 ideal_device_scale_(0.f), | 66 ideal_device_scale_(0.f), |
| 56 ideal_source_scale_(0.f), | 67 ideal_source_scale_(0.f), |
| 57 ideal_contents_scale_(0.f), | 68 ideal_contents_scale_(0.f), |
| 58 raster_page_scale_(0.f), | 69 raster_page_scale_(0.f), |
| (...skipping 1570 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1629 return iterator_index_ < iterators_.size(); | 1640 return iterator_index_ < iterators_.size(); |
| 1630 } | 1641 } |
| 1631 | 1642 |
| 1632 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( | 1643 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( |
| 1633 PictureLayerTiling::TilingEvictionTileIterator* it) const { | 1644 PictureLayerTiling::TilingEvictionTileIterator* it) const { |
| 1634 return it->get_type() == iteration_stage_ && | 1645 return it->get_type() == iteration_stage_ && |
| 1635 (**it)->required_for_activation() == required_for_activation_; | 1646 (**it)->required_for_activation() == required_for_activation_; |
| 1636 } | 1647 } |
| 1637 | 1648 |
| 1638 } // namespace cc | 1649 } // namespace cc |
| OLD | NEW |