| 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..b6ff4f8c11bdf6f6b7055b8de6e9b1ea960ed4fc 100644
|
| --- a/cc/resources/picture_layer_tiling.cc
|
| +++ b/cc/resources/picture_layer_tiling.cc
|
| @@ -529,6 +529,9 @@ gfx::Rect PictureLayerTiling::ComputeSkewport(
|
| double current_frame_time_in_seconds,
|
| const gfx::Rect& visible_rect_in_content_space) const {
|
| gfx::Rect skewport = visible_rect_in_content_space;
|
| + if (skewport.IsEmpty())
|
| + return skewport;
|
| +
|
| if (visible_rect_history_[1].frame_time_in_seconds == 0.0)
|
| return skewport;
|
|
|
| @@ -564,11 +567,13 @@ 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);
|
| return skewport;
|
| }
|
|
|
|
|