Commit b582e844 authored by Fady Samuel's avatar Fady Samuel Committed by Commit Bot

Surface synchronization: Simplify child allocation of LocalSurfaceIds

We should always allocate a new viz::LocalSurfaceId on auto-resize.

We no longer require a non-empty viewport along with a valid
viz::LocalSurfaceId, and so we can simplify the code here a bit.

Bug: 672962
Change-Id: Ic0c121815e869fc26cf4ba20ff218b52ec445fd3
Reviewed-on: https://chromium-review.googlesource.com/1026792Reviewed-by: default avatarSaman Sami <samans@chromium.org>
Commit-Queue: Fady Samuel <fsamuel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#553576}
parent 82b9f92f
......@@ -2272,11 +2272,9 @@ void RenderWidget::DidAutoResize(const gfx::Size& new_size) {
// take into account device emulation.
gfx::Size new_compositor_viewport_pixel_size =
gfx::ScaleToCeiledSize(size_, GetWebScreenInfo().device_scale_factor);
viz::LocalSurfaceId local_surface_id;
if (!new_compositor_viewport_pixel_size.IsEmpty())
local_surface_id = child_local_surface_id_allocator_.GenerateId();
UpdateSurfaceAndScreenInfo(
local_surface_id, new_compositor_viewport_pixel_size, screen_info_);
UpdateSurfaceAndScreenInfo(child_local_surface_id_allocator_.GenerateId(),
new_compositor_viewport_pixel_size,
screen_info_);
if (!resizing_mode_selector_->is_synchronous_mode())
need_resize_ack_for_auto_resize_ = true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment