[webkit-changes] [WebKit/WebKit] 074ad4: REGRESSION (268251 at main): 2D contexts fail after G...

Kimmo Kinnunen noreply at github.com
Wed Jan 10 23:16:08 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 074ad42e866f713abc448fa3a42c2f84c5ee07e0
      https://github.com/WebKit/WebKit/commit/074ad42e866f713abc448fa3a42c2f84c5ee07e0
  Author: Kimmo Kinnunen <kkinnunen at apple.com>
  Date:   2024-01-10 (Wed, 10 Jan 2024)

  Changed paths:
    M LayoutTests/TestExpectations
    A LayoutTests/fast/canvas/2d.context.many.small-expected.html
    A LayoutTests/fast/canvas/2d.context.many.small.html
    M LayoutTests/fast/canvas/image-buffer-backend-variants-expected.txt
    M LayoutTests/fast/canvas/image-buffer-backend-variants.html
    M LayoutTests/platform/glib/fast/canvas/image-buffer-backend-variants-expected.txt
    M LayoutTests/platform/ios/fast/canvas/image-buffer-backend-variants-expected.txt
    M LayoutTests/platform/mac-wk1/fast/canvas/image-buffer-backend-variants-expected.txt
    M Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp
    M Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.cpp

  Log Message:
  -----------
  REGRESSION (268251 at main): 2D contexts fail after GPUP IOSurface limits have been exceeded
https://bugs.webkit.org/show_bug.cgi?id=267262
rdar://120695232

Reviewed by Matt Woodrow.

IOSurfaces fail to allocate when GPUP has too many of them. The commit
268251 at main removed the fallback for RemoteImageBuffer allocations,
where Accelerated buffers would fall back to normal Unaccelerated
buffers. Instead, the idea was to treat exceeding IOSurface limits as
OOM situation. This would be done to prepare being able to create the
specific Backend instance at RemoteImageBufferProxy instantiation time.

This would break existing content that would leak thousands of 2d
contexts. The content could still work with the fallback in place.

Reimplement the fallback to Unaccelerated.

* LayoutTests/fast/canvas/2d.context.many.small-expected.html: Added.
* LayoutTests/fast/canvas/2d.context.many.small.html: Added.
* LayoutTests/fast/canvas/image-buffer-backend-variants-expected.txt:
* LayoutTests/fast/canvas/image-buffer-backend-variants.html:
* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::allocateImageBufferInternal):
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.cpp:
(WebKit::RemoteImageBufferProxy::didCreateBackend):

Canonical link: https://commits.webkit.org/272892@main




More information about the webkit-changes mailing list