[webkit-changes] [WebKit/WebKit] 284c71: ReleaseSerializedImageBuffer doesn't release the u...

mattwoodrow noreply at github.com
Wed Mar 15 12:15:59 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 284c71ac630f11ba5d7ac6c362691567865a6b7c
      https://github.com/WebKit/WebKit/commit/284c71ac630f11ba5d7ac6c362691567865a6b7c
  Author: Matt Woodrow <mattwoodrow at apple.com>
  Date:   2023-03-15 (Wed, 15 Mar 2023)

  Changed paths:
    M Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.cpp

  Log Message:
  -----------
  ReleaseSerializedImageBuffer doesn't release the underlying IOSurface.
https://bugs.webkit.org/show_bug.cgi?id=253927

Reviewed by Kimmo Kinnunen.

We're adding a read reference in the RemoteSerializedImageBufferProxy constructor, and we never have any reads happen if we destroy the RemoteSerializedImageBufferProxy without transferring to an ImageBuffer.

This shouldn't happen often, but can happen if you draw to an OffscreenCanvas, call `commit()`, and then draw again quickly (not waiting for rAF).
Instead, only add the read reference when transferring to an ImageBuffer, since this both reads and writes (remove).

* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.cpp:
(WebKit::RemoteSerializedImageBufferProxy::RemoteSerializedImageBufferProxy):
(WebKit::RemoteSerializedImageBufferProxy::sinkIntoImageBuffer):

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




More information about the webkit-changes mailing list