diff options
author | jaydasika <jaydasika@chromium.org> | 2015-10-15 08:25:14 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-15 15:26:09 +0000 |
commit | 5160e6758a1fc1d25ce16f797ac83c6980dfb811 (patch) | |
tree | 97badfc589b269e094a05122d6523c5f66f0655b /cc/trees/layer_tree_host_common.cc | |
parent | 341becdb476be9fe2e9ae6009f8e45bb1f8cad46 (diff) | |
download | chromium_src-5160e6758a1fc1d25ce16f797ac83c6980dfb811.zip chromium_src-5160e6758a1fc1d25ce16f797ac83c6980dfb811.tar.gz chromium_src-5160e6758a1fc1d25ce16f797ac83c6980dfb811.tar.bz2 |
Don't call gfx::ToEnclosedRect with a rect that has NaN coordinates.
Due to large transforms the render surface's drawable content rect can
end up with NaN coordinates. gfx::ToEnclosedRect crashes when called on
a rect with NaN coordinates. This CL adds a NaN check in
RenderSurfaceImpl::DrawableContentRect and also adds a
unit test with large transform and NaN-coordinate rects.
BUG=537684
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1407553002
Cr-Commit-Position: refs/heads/master@{#354274}
Diffstat (limited to 'cc/trees/layer_tree_host_common.cc')
-rw-r--r-- | cc/trees/layer_tree_host_common.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cc/trees/layer_tree_host_common.cc b/cc/trees/layer_tree_host_common.cc index ac25fbb..51679c5 100644 --- a/cc/trees/layer_tree_host_common.cc +++ b/cc/trees/layer_tree_host_common.cc @@ -2624,7 +2624,7 @@ void CalculateRenderSurfaceLayerListInternal( layer->render_surface()->accumulated_content_rect()); if (render_to_separate_surface && !IsRootLayer(layer) && - layer->render_surface()->content_rect().IsEmpty()) { + layer->render_surface()->DrawableContentRect().IsEmpty()) { RemoveSurfaceForEarlyExit(layer, render_surface_layer_list); return; } |