Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 126e5bd39128. rdar://120666136
Cherry-pick 272394@main (5ce41d8). rdar://120666136 Wikipedia video control icon backgrounds flicker. https://bugs.webkit.org/show_bug.cgi?id=266726 <rdar://119868478> Reviewed by Simon Fraser. The previous code always required a full repaint of the layer whenever a buffer was allocated, so the copy-forward code didn't run on the second paint of a layer. This meant the copy-forward code, and the 'buffer is already clear' optimization were mutually exclusive. The new code uses copy-forward and partial repaints whenever possible, even if the front buffer was newly allocated (or existing, but purged). The copy-forward code tries to only copy pixels that won't be re-drawn this frame, but is rounded out to a single rectangle, not a complex region. If the copy-forwards ends up copying pixels that we'll also drawn this frame, we can no longer consider the buffer to be 'clear' and have to manually clear the paint region. * LayoutTests/compositing/repaint/copy-forward-clear-rect-expected.html: Added. * LayoutTests/compositing/repaint/copy-forward-clear-rect.html: Added. * Source/WebKit/GPUProcess/graphics/RemoteImageBufferSet.cpp: (WebKit::RemoteImageBufferSet::prepareBufferForDisplay): Canonical link: https://commits.webkit.org/272394@main Canonical link: https://commits.webkit.org/271831.79@safari-7619.0.1-branch
- Loading branch information