RenderWidgetHostViewMac: Clean up surface synchronize
The function RWHVMac::SynchronizeVisualProperties was inappropriate in a few ways: - it belongs in BrowserCompositorMac -- we can see this because all of its calls are to BrowserCompositorMac (and two helper functions were added to BrowserCompositorMac to allow this function to be put in the wrong place) - it calls DelegatedFrameHost::EmbedSurface, yet several of its callers also call DelegatedFrameHost::EmbedSurface just before calling it, usually with the almost-the-same-arguments (only differing by accident), making the call redundant - similarly, it calls AllocateNewRendererLocalSurfaceId, which updates dfh_local_surface_id_allocator_, usually with arguments that were just retrieved from dfh_local_surface_id_allocator_, making it a convoluted no-op - it has two different modes which should be two different functions, namely (1) force creation of a new surface id and (2) notify the host of a changed surface id Make some motions in the direction of cleaning this up - Rename BrowserCompositorMacClient::SynchronizeVisualProperties (which is fairly meaningless at this point) to OnBrowserCompositorSurfaceIdChanged. - Also change this function to not take an optional argument. Inline the optional-argument-not-passed version of this function at its only callsite, RenderWidgetHostViewMac:: EnsureSurfaceSynchronizedForLayoutTest. - Rename BrowserCompositorMac::SynchronizeVisualProperties to UpdateSizeFromChild Bug: 897156 Change-Id: Ib01aae5c0ef4e92298697c1840da7bc6e8cbf3a0 Reviewed-on: https://chromium-review.googlesource.com/c/1316678 Commit-Queue: ccameron <ccameron@chromium.org> Reviewed-by:Fady Samuel <fsamuel@chromium.org> Cr-Commit-Position: refs/heads/master@{#605865}
Showing
Please register or sign in to comment