Competing WindowPortMus |
|
Issue descriptionBackground: I'm working on a patch to fix a bug with sending incorrect Surface Sync messages from the browser to the renderer. This involves a new CHECK in RenderWidgetHostImpl. During which I found issue 920006 related to strange bounds animations in Multi-Process-Mash. This is up in: https://chromium-review.googlesource.com/c/chromium/src/+/1379972/18 The fix for Multi-Process-Mash however does not work with Single-Process-Mash. It appears that there are two WindowPortMus' which are both connected to the same cc::LayerTreeHost 1) WindowTreeClient::OnWindowBoundsChanged receives messages from WindowService. 2) Root Window's WindowTreeMus, which is connected to the same WindowTreeClient. With the patch above this begins providing LocalSurfaceIds: aura::WindowPortMus::OnDidChangeBounds() aura::Window::OnLayerBoundsChanged() ui::Layer::SetBoundsFromAnimation() ui::LayerAnimator::SetBounds() ui::Layer::SetBounds() aura::Window::SetBoundsInternal() aura::Window::SetBounds() aura::WindowTreeHost::UpdateRootWindowSizeInPixels() aura::WindowTreeHost::OnHostResizedInPixels() aura::WindowTreeHostPlatform::OnBoundsChanged() ui::StubWindow::SetBounds() aura::WindowTreeHostPlatform::SetBoundsInPixels() aura::WindowTreeHostMus::SetBoundsInPixels() content::(anonymous namespace)::ShellWindowDelegateView::SetWebContents() content::Shell::PlatformSetContents() content::Shell::CreateShell() content::Shell::CreateNewWindow() Both update the LayerTreeHost the same way: cc::LayerTreeHost::SetLocalSurfaceIdAllocationFromParent() cc::LayerTreeHost::SetViewportSizeAndScale() ui::Compositor::SetScaleAndSize() aura::WindowTreeHost::OnHostResizedInPixels() aura::WindowTreeHostPlatform::OnBoundsChanged() ui::StubWindow::SetBounds() aura::WindowTreeHostPlatform::SetBoundsInPixels() aura::WindowTreeHostMus::SetBoundsInPixels() aura::WindowTreeHostMus::SetBoundsFromServerInPixels() aura::WindowTreeClient::SetWindowBoundsFromServer() aura::InFlightBoundsChange::Revert() aura::WindowTreeClient::OnChangeCompleted() For my patch I can detect that the Root Window's WindowTreeMus has no valid LSId, so it shouldn't respond to OnDidChangeBounds. However there is the risk that we could see this parallel connection leading to similar issues in the future. I think that sky@'s work with ChildLocalSurfaceIdAllocator could prevent this. As the Root Window's WindowTreeMus could update its internal LocalSurfaceIdAllocation with that of the parent in the Window Service. With the patch this can be reproduced with: ./out/cros/content_browsertests --gtest_filter=OpenedByDOMTest.Popup --enable-features=SingleProcessMash
,
Jan 18
(4 days ago)
Patch #27 in that change has #if !defined(OS_CHROMEOS) in render_widget_host_impl.cc SynchronizeVisualProperties. That needs to be removed to reproduce this now. (I added it in order to be able to land) I can still repro this locally with that modification. Including after adding https://chromium-review.googlesource.com/c/chromium/src/+/1379972/ |
|
►
Sign in to add a comment |
|
Comment 1 by sky@chromium.org
, Jan 17 (5 days ago)Labels: OS-Chrome
Owner: sky@chromium.org
Status: Started (was: Untriaged)