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 93d658159516549e0164c2e55790fea982a05370..08e0a6ee870539bb0ed883a6bd33d9998b7f3f27 100644 |
| --- a/cc/layers/picture_layer_impl.cc |
| +++ b/cc/layers/picture_layer_impl.cc |
| @@ -390,6 +390,19 @@ bool PictureLayerImpl::UpdateTiles(bool resourceless_software_draw) { |
| DCHECK_EQ(1.f, contents_scale_x()); |
| DCHECK_EQ(1.f, contents_scale_y()); |
| + // GPU rasterization can cause a tile size change when the viewport changes. |
| + // Ensure that the tiling's texture sizes are correct after a viewport resize |
| + // by tracking the last viewport rect and updating the current raster source, |
| + // which will in turn update the tiling's texture size. |
| + if (!last_viewport_size_.IsEmpty() && |
|
danakj
2015/03/18 21:46:14
This looks like it should be below the !CanHaveTil
hendrikw
2015/03/18 22:06:31
Yeah, you're right.
|
| + last_viewport_size_ != layer_tree_impl()->device_viewport_size() && |
| + layer_tree_impl()->IsPendingTree()) { |
| + tilings_->UpdateTilingsToCurrentRasterSource( |
|
vmpstr
2015/03/18 21:36:39
In "typical" situations where the device viewport
danakj
2015/03/18 21:46:14
What if there's no pending tree (commit to active,
hendrikw
2015/03/18 22:06:31
Yeah, my first change (https://codereview.chromium
|
| + raster_source_, nullptr, invalidation_, MinimumContentsScale(), |
| + MaximumContentsScale()); |
| + } |
| + last_viewport_size_ = layer_tree_impl()->device_viewport_size(); |
| + |
| if (!resourceless_software_draw) { |
| visible_rect_for_tile_priority_ = visible_content_rect(); |
| } |