| 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 <cmath> | 8 #include <cmath> |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 1129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1140 | 1140 |
| 1141 float PictureLayerImpl::MaximumTilingContentsScale() const { | 1141 float PictureLayerImpl::MaximumTilingContentsScale() const { |
| 1142 float max_contents_scale = tilings_->GetMaximumContentsScale(); | 1142 float max_contents_scale = tilings_->GetMaximumContentsScale(); |
| 1143 return std::max(max_contents_scale, MinimumContentsScale()); | 1143 return std::max(max_contents_scale, MinimumContentsScale()); |
| 1144 } | 1144 } |
| 1145 | 1145 |
| 1146 scoped_ptr<PictureLayerTilingSet> | 1146 scoped_ptr<PictureLayerTilingSet> |
| 1147 PictureLayerImpl::CreatePictureLayerTilingSet() { | 1147 PictureLayerImpl::CreatePictureLayerTilingSet() { |
| 1148 const LayerTreeSettings& settings = layer_tree_impl()->settings(); | 1148 const LayerTreeSettings& settings = layer_tree_impl()->settings(); |
| 1149 return PictureLayerTilingSet::Create( | 1149 return PictureLayerTilingSet::Create( |
| 1150 GetTree(), this, settings.max_tiles_for_interest_area, | 1150 GetTree(), this, settings.tiling_interest_area_viewport_multiplier, |
| 1151 layer_tree_impl()->use_gpu_rasterization() | 1151 layer_tree_impl()->use_gpu_rasterization() |
| 1152 ? settings.gpu_rasterization_skewport_target_time_in_seconds | 1152 ? settings.gpu_rasterization_skewport_target_time_in_seconds |
| 1153 : settings.skewport_target_time_in_seconds, | 1153 : settings.skewport_target_time_in_seconds, |
| 1154 settings.skewport_extrapolation_limit_in_content_pixels); | 1154 settings.skewport_extrapolation_limit_in_content_pixels); |
| 1155 } | 1155 } |
| 1156 | 1156 |
| 1157 void PictureLayerImpl::UpdateIdealScales() { | 1157 void PictureLayerImpl::UpdateIdealScales() { |
| 1158 DCHECK(CanHaveTilings()); | 1158 DCHECK(CanHaveTilings()); |
| 1159 | 1159 |
| 1160 float min_contents_scale = MinimumContentsScale(); | 1160 float min_contents_scale = MinimumContentsScale(); |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1243 | 1243 |
| 1244 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { | 1244 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { |
| 1245 return !layer_tree_impl()->IsRecycleTree(); | 1245 return !layer_tree_impl()->IsRecycleTree(); |
| 1246 } | 1246 } |
| 1247 | 1247 |
| 1248 bool PictureLayerImpl::HasValidTilePriorities() const { | 1248 bool PictureLayerImpl::HasValidTilePriorities() const { |
| 1249 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); | 1249 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); |
| 1250 } | 1250 } |
| 1251 | 1251 |
| 1252 } // namespace cc | 1252 } // namespace cc |
| OLD | NEW |