| Index: cc/resources/picture_layer_tiling.cc
|
| diff --git a/cc/resources/picture_layer_tiling.cc b/cc/resources/picture_layer_tiling.cc
|
| index b52ba9cdf13fbe5b37f85047ebf71b138d48357e..8c5d88c7df25e2d9f603384f3fc16a44482fdc8b 100644
|
| --- a/cc/resources/picture_layer_tiling.cc
|
| +++ b/cc/resources/picture_layer_tiling.cc
|
| @@ -564,11 +564,17 @@ gfx::Rect PictureLayerTiling::ComputeSkewport(
|
| extrapolation_multiplier * (old_right - new_right),
|
| extrapolation_multiplier * (old_bottom - new_bottom));
|
|
|
| - // Clip the skewport to |max_skewport|.
|
| + // Ensure that visible rect is contained in the skewport.
|
| + skewport.Union(visible_rect_in_content_space);
|
| +
|
| + // Clip the skewport to |max_skewport|. This needs to happen after the
|
| + // union in case intersecting would have left the empty rect.
|
| skewport.Intersect(max_skewport);
|
|
|
| - // Finally, ensure that visible rect is contained in the skewport.
|
| - skewport.Union(visible_rect_in_content_space);
|
| + // The max_skewport should always contain the visible_rect_in_content_space
|
| + // so this should still be true.
|
| + DCHECK(skewport.Contains(visible_rect_in_content_space));
|
| +
|
| return skewport;
|
| }
|
|
|
|
|