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 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1111 float max_contents_scale = tilings_->GetMaximumContentsScale(); | 1111 float max_contents_scale = tilings_->GetMaximumContentsScale(); |
1112 return std::max(max_contents_scale, MinimumContentsScale()); | 1112 return std::max(max_contents_scale, MinimumContentsScale()); |
1113 } | 1113 } |
1114 | 1114 |
1115 scoped_ptr<PictureLayerTilingSet> | 1115 scoped_ptr<PictureLayerTilingSet> |
1116 PictureLayerImpl::CreatePictureLayerTilingSet() { | 1116 PictureLayerImpl::CreatePictureLayerTilingSet() { |
1117 const LayerTreeSettings& settings = layer_tree_impl()->settings(); | 1117 const LayerTreeSettings& settings = layer_tree_impl()->settings(); |
1118 return PictureLayerTilingSet::Create( | 1118 return PictureLayerTilingSet::Create( |
1119 this, settings.max_tiles_for_interest_area, | 1119 this, settings.max_tiles_for_interest_area, |
1120 layer_tree_impl()->use_gpu_rasterization() | 1120 layer_tree_impl()->use_gpu_rasterization() |
1121 ? 0.f | 1121 ? settings.gpu_rasterization_skewport_target_time_in_seconds |
1122 : settings.skewport_target_time_in_seconds, | 1122 : settings.skewport_target_time_in_seconds, |
1123 settings.skewport_extrapolation_limit_in_content_pixels); | 1123 settings.skewport_extrapolation_limit_in_content_pixels); |
1124 } | 1124 } |
1125 | 1125 |
1126 void PictureLayerImpl::UpdateIdealScales() { | 1126 void PictureLayerImpl::UpdateIdealScales() { |
1127 DCHECK(CanHaveTilings()); | 1127 DCHECK(CanHaveTilings()); |
1128 | 1128 |
1129 float min_contents_scale = MinimumContentsScale(); | 1129 float min_contents_scale = MinimumContentsScale(); |
1130 DCHECK_GT(min_contents_scale, 0.f); | 1130 DCHECK_GT(min_contents_scale, 0.f); |
1131 float min_page_scale = layer_tree_impl()->min_page_scale_factor(); | 1131 float min_page_scale = layer_tree_impl()->min_page_scale_factor(); |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1212 | 1212 |
1213 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { | 1213 bool PictureLayerImpl::IsOnActiveOrPendingTree() const { |
1214 return !layer_tree_impl()->IsRecycleTree(); | 1214 return !layer_tree_impl()->IsRecycleTree(); |
1215 } | 1215 } |
1216 | 1216 |
1217 bool PictureLayerImpl::HasValidTilePriorities() const { | 1217 bool PictureLayerImpl::HasValidTilePriorities() const { |
1218 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); | 1218 return IsOnActiveOrPendingTree() && IsDrawnRenderSurfaceLayerListMember(); |
1219 } | 1219 } |
1220 | 1220 |
1221 } // namespace cc | 1221 } // namespace cc |
OLD | NEW |