Chromium Code Reviews| Index: cc/layers/picture_layer_impl.cc |
| diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc |
| index c3c7ca021104ba5f2468b233838d45beee16c845..3f0d6231577f8156a6773cc03e60ca39943a1774 100644 |
| --- a/cc/layers/picture_layer_impl.cc |
| +++ b/cc/layers/picture_layer_impl.cc |
| @@ -1087,9 +1087,6 @@ void PictureLayerImpl::RecalculateRasterScales() { |
| raster_contents_scale_ / raster_device_scale_ / raster_source_scale_; |
| } |
| - raster_contents_scale_ = |
| - std::max(raster_contents_scale_, MinimumContentsScale()); |
| - |
| // If we're not re-rasterizing during animation, rasterize at the maximum |
| // scale that will occur during the animation, if the maximum scale is |
| // known. However we want to avoid excessive memory use. If the scale is |
| @@ -1121,6 +1118,9 @@ void PictureLayerImpl::RecalculateRasterScales() { |
| raster_contents_scale_ = 1.f * ideal_page_scale_ * ideal_device_scale_; |
| } |
| + raster_contents_scale_ = |
| + std::max(raster_contents_scale_, MinimumContentsScale()); |
| + |
| // If this layer would create zero or one tiles at this content scale, |
| // don't create a low res tiling. |
| gfx::Size raster_bounds = gfx::ToCeiledSize( |
| @@ -1138,6 +1138,7 @@ void PictureLayerImpl::RecalculateRasterScales() { |
| low_res_raster_contents_scale_ = std::max( |
| raster_contents_scale_ * low_res_factor, |
| MinimumContentsScale()); |
| + DCHECK_LE(low_res_raster_contents_scale_, raster_contents_scale_); |
|
danakj
2014/11/04 16:45:01
can you DCHECK GE MinContentsScale() for both of t
danakj
2014/11/04 16:45:25
Well, I guess for for low res is enough since this
vmpstr
2014/11/04 17:24:02
Done.
|
| } |
| void PictureLayerImpl::CleanUpTilingsOnActiveLayer( |