Commit ce4595d2 authored by enne@chromium.org's avatar enne@chromium.org

cc: Fix PostiveRatio crash by checking raster scale

The first time through ManageTilings, raster scale is zero, so you can't
use it to find a ratio.  This DCHECKS because the ratio is infinite.
If the raster scale is zero, we already create new tilings, so skipping
this check will just avoid the DCHECK.

R=reveman@chromium.org
BUG=174236


Review URL: https://chromiumcodereview.appspot.com/12209103

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181857 0039d316-1c4b-4281-b951-d872f2087c98
parent 8886ffcb
......@@ -570,7 +570,7 @@ void PictureLayerImpl::ManageTilings(bool animating_transform_to_screen) {
raster_source_scale_was_animating_ = animating_transform_to_screen;
}
if (is_active_layer && is_pinching) {
if (is_active_layer && is_pinching && raster_page_scale_) {
// If the page scale diverges too far during pinch, change raster target to
// the current page scale.
float ratio = PositiveRatio(ideal_page_scale_, raster_page_scale_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment