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 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1152 | 1152 |
1153 float PictureLayerImpl::MaximumTilingContentsScale() const { | 1153 float PictureLayerImpl::MaximumTilingContentsScale() const { |
1154 float max_contents_scale = tilings_->GetMaximumContentsScale(); | 1154 float max_contents_scale = tilings_->GetMaximumContentsScale(); |
1155 return std::max(max_contents_scale, MinimumContentsScale()); | 1155 return std::max(max_contents_scale, MinimumContentsScale()); |
1156 } | 1156 } |
1157 | 1157 |
1158 scoped_ptr<PictureLayerTilingSet> | 1158 scoped_ptr<PictureLayerTilingSet> |
1159 PictureLayerImpl::CreatePictureLayerTilingSet() { | 1159 PictureLayerImpl::CreatePictureLayerTilingSet() { |
1160 const LayerTreeSettings& settings = layer_tree_impl()->settings(); | 1160 const LayerTreeSettings& settings = layer_tree_impl()->settings(); |
1161 return PictureLayerTilingSet::Create( | 1161 return PictureLayerTilingSet::Create( |
1162 GetTree(), this, settings.max_tiles_for_interest_area, | 1162 GetTree(), this, settings.tiling_interest_area_viewport_multiplier, |
1163 layer_tree_impl()->use_gpu_rasterization() | 1163 layer_tree_impl()->use_gpu_rasterization() |
1164 ? settings.gpu_rasterization_skewport_target_time_in_seconds | 1164 ? settings.gpu_rasterization_skewport_target_time_in_seconds |
1165 : settings.skewport_target_time_in_seconds, | 1165 : settings.skewport_target_time_in_seconds, |
1166 settings.skewport_extrapolation_limit_in_content_pixels); | 1166 settings.skewport_extrapolation_limit_in_content_pixels); |
1167 } | 1167 } |
1168 | 1168 |
1169 void PictureLayerImpl::UpdateIdealScales() { | 1169 void PictureLayerImpl::UpdateIdealScales() { |
1170 DCHECK(CanHaveTilings()); | 1170 DCHECK(CanHaveTilings()); |
1171 | 1171 |
1172 float min_contents_scale = MinimumContentsScale(); | 1172 float min_contents_scale = MinimumContentsScale(); |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1255 | 1255 |
1256 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { | 1256 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { |
1257 return !layer_tree_impl()->IsRecycleTree(); | 1257 return !layer_tree_impl()->IsRecycleTree(); |
1258 } | 1258 } |
1259 | 1259 |
1260 bool PictureLayerImpl::HasValidTilePriorities() const { | 1260 bool PictureLayerImpl::HasValidTilePriorities() const { |
1261 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); | 1261 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); |
1262 } | 1262 } |
1263 | 1263 |
1264 } // namespace cc | 1264 } // namespace cc |
OLD | NEW |