This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Threaded Compositor] Flickering and rendering artifacts when resizin…
…g the web view https://bugs.webkit.org/show_bug.cgi?id=154070 Reviewed by Žan Doberšek. Resizing the web view is expected to be a sync operation, the UI process creates a new backing store state ID, sends UpdateBackingStoreState message with the flag RespondImmediately to the web process and waits up to 500ms for the reply (DidUpdateBackingStoreState message). When using the threaded compositor, we schedule a task in the compositing thread to update the viewport size, and return immediately, so that we reply to the UI process before the compositing thread has actually updated its size. There's a moment in which sizes are out of sync causing the flickering and rendering artifacts, the UI process continues rendering at the new size, while the web process is still rendering at the previous size. We can prevent this from happening just by making the resize task synchronous in the threaded compositor. * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp: (WebKit::CompositingRunLoop::performTaskSync): Add sync version of performTask(). * Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.h: * Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp: (WebKit::ThreadedCompositor::didChangeViewportSize): Use performTaskSync(). Canonical link: https://commits.webkit.org/176816@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@202037 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing 4 changed files with 39 additions and 3 deletions.