| 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 13 matching lines...) Expand all Loading... |
| 24 #include "cc/trees/layer_tree_impl.h" | 24 #include "cc/trees/layer_tree_impl.h" |
| 25 #include "ui/gfx/quad_f.h" | 25 #include "ui/gfx/quad_f.h" |
| 26 #include "ui/gfx/rect_conversions.h" | 26 #include "ui/gfx/rect_conversions.h" |
| 27 #include "ui/gfx/size_conversions.h" | 27 #include "ui/gfx/size_conversions.h" |
| 28 | 28 |
| 29 namespace { | 29 namespace { |
| 30 const float kMaxScaleRatioDuringPinch = 2.0f; | 30 const float kMaxScaleRatioDuringPinch = 2.0f; |
| 31 | 31 |
| 32 // When creating a new tiling during pinch, snap to an existing | 32 // When creating a new tiling during pinch, snap to an existing |
| 33 // tiling's scale if the desired scale is within this ratio. | 33 // tiling's scale if the desired scale is within this ratio. |
| 34 const float kSnapToExistingTilingRatio = 0.2f; | 34 const float kSnapToExistingTilingRatio = 1.2f; |
| 35 | 35 |
| 36 // Estimate skewport 60 frames ahead for pre-rasterization on the CPU. | 36 // Estimate skewport 60 frames ahead for pre-rasterization on the CPU. |
| 37 const float kCpuSkewportTargetTimeInFrames = 60.0f; | 37 const float kCpuSkewportTargetTimeInFrames = 60.0f; |
| 38 | 38 |
| 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 } // namespace | 42 } // namespace |
| 43 | 43 |
| 44 namespace cc { | 44 namespace cc { |
| (...skipping 1521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1566 return iterator_index_ < iterators_.size(); | 1566 return iterator_index_ < iterators_.size(); |
| 1567 } | 1567 } |
| 1568 | 1568 |
| 1569 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( | 1569 bool PictureLayerImpl::LayerEvictionTileIterator::IsCorrectType( |
| 1570 PictureLayerTiling::TilingEvictionTileIterator* it) const { | 1570 PictureLayerTiling::TilingEvictionTileIterator* it) const { |
| 1571 return it->get_type() == iteration_stage_ && | 1571 return it->get_type() == iteration_stage_ && |
| 1572 (**it)->required_for_activation() == required_for_activation_; | 1572 (**it)->required_for_activation() == required_for_activation_; |
| 1573 } | 1573 } |
| 1574 | 1574 |
| 1575 } // namespace cc | 1575 } // namespace cc |
| OLD | NEW |