Index: cc/trees/layer_tree_host.cc |
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc |
index 5b656a8f7363adb04b77919df722098ecb258218..8c6eeef76452e7cdaffaaa041997487d4e1e6a73 100644 |
--- a/cc/trees/layer_tree_host.cc |
+++ b/cc/trees/layer_tree_host.cc |
@@ -343,6 +343,18 @@ void LayerTreeHost::FinishCommitOnImplThread(LayerTreeHostImpl* host_impl) { |
host_impl->set_gpu_rasterization_status(GetGpuRasterizationStatus()); |
RecordGpuRasterizationHistogram(); |
+ // When we are using GPU rasterization, tile size is based on the viewport |
+ // width. We could have layers that change in size, but are not invalidated |
+ // because no layout is required. When this happens, we need to notify the |
+ // layers that they require a PushProperties to resize the tiles correctly. |
+ if (root_layer() && |
+ device_viewport_size_ != host_impl->device_viewport_size() && |
+ UseGpuRasterization()) { |
+ LayerTreeHostCommon::CallFunctionForSubtree(root_layer(), [](Layer* layer) { |
+ layer->OnDeviceViewportSizeChanged(); |
+ }); |
+ } |
+ |
host_impl->SetViewportSize(device_viewport_size_); |
host_impl->SetDeviceScaleFactor(device_scale_factor_); |
host_impl->SetDebugState(debug_state_); |