[webkit-changes] [WebKit/WebKit] 433f17: ImageBufferBackend::clearContents() is redundant f...

Kimmo Kinnunen noreply at github.com
Thu Mar 2 01:42:37 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 433f17507ed5091eb42fdd4f1d0ac638665f101c
      https://github.com/WebKit/WebKit/commit/433f17507ed5091eb42fdd4f1d0ac638665f101c
  Author: Kimmo Kinnunen <kkinnunen at apple.com>
  Date:   2023-03-02 (Thu, 02 Mar 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/ImageBuffer.cpp
    M Source/WebCore/platform/graphics/ImageBuffer.h
    M Source/WebCore/platform/graphics/ImageBufferBackend.h
    M Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.h
    M Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.mm
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm

  Log Message:
  -----------
  ImageBufferBackend::clearContents() is redundant function
https://bugs.webkit.org/show_bug.cgi?id=253065
rdar://problem/106020763

Reviewed by Antti Koivisto.

Remove ImageBuffer{,Backend}::clearContents(), it is only implemented
for CG display list -backed ImageBuffers.

Use ImageBuffer::releaseGraphicsContext() to remove all commands to
CG display list -backed ImageBuffer. This should stay consistent with the
abstraction that the caller expects: For the purposes of the call, e.g.
ensuring that the list does not grow indefinitively, it is expected that
the relevant draw commands are part of the context.

* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::clearContents): Deleted.
* Source/WebCore/platform/graphics/ImageBuffer.h:
* Source/WebCore/platform/graphics/ImageBufferBackend.h:
(WebCore::ImageBufferBackend::clearContents): Deleted.
* Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.h:
* Source/WebKit/Shared/RemoteLayerTree/CGDisplayListImageBufferBackend.mm:
(WebKit::CGDisplayListImageBufferBackend::releaseGraphicsContext):
(WebKit::CGDisplayListImageBufferBackend::clearContents): Deleted.
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):

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




More information about the webkit-changes mailing list