[webkit-changes] [WebKit/WebKit] b93687: Fold IOSurfaceImageBuffer into ImageBuffer

Tim Horton noreply at github.com
Mon Dec 4 14:06:41 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b9368743dc7a35dcd9f8d53113162bcb18d0f6f3
      https://github.com/WebKit/WebKit/commit/b9368743dc7a35dcd9f8d53113162bcb18d0f6f3
  Author: Tim Horton <thorton at apple.com>
  Date:   2023-12-04 (Mon, 04 Dec 2023)

  Changed paths:
    M Source/WTF/wtf/cocoa/TollFreeBridging.h
    M Source/WebCore/WebCore.xcodeproj/project.pbxproj
    M Source/WebCore/platform/graphics/ImageBuffer.cpp
    M Source/WebCore/platform/graphics/ImageBuffer.h
    M Source/WebCore/platform/graphics/ImageBufferBackend.h
    R Source/WebCore/platform/graphics/cg/IOSurfaceImageBuffer.h
    M Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h
    M Source/WebCore/platform/graphics/coreimage/FilterImageCoreImage.mm
    M Source/WebCore/platform/graphics/coreimage/SourceGraphicCoreImageApplier.mm

  Log Message:
  -----------
  Fold IOSurfaceImageBuffer into ImageBuffer
https://bugs.webkit.org/show_bug.cgi?id=265698
rdar://119050705

Reviewed by Said Abou-Hallawa.

IOSurfaceImageBuffer complicates adding new non-backend-specific ImageBuffer
subclasses, which seems more valuable than using a whole subclass to expose
backend-specific methods.

Remove it in favor of a failable getter on ImageBuffer.

Also fix up a questionable cast (assuming all accelerated image buffers
contain ImageBufferIOSurfaceBackend if IOSurface is enabled seems ill-advised).

* Source/WTF/wtf/cocoa/TollFreeBridging.h:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::create):
(WebCore::ImageBuffer::surface):
* Source/WebCore/platform/graphics/ImageBuffer.h:
* Source/WebCore/platform/graphics/ImageBufferBackend.h:
(WebCore::ImageBufferBackend::isImageBufferIOSurfaceBackend const):
* Source/WebCore/platform/graphics/cg/IOSurfaceImageBuffer.h: Removed.
* Source/WebCore/platform/graphics/cg/ImageBufferIOSurfaceBackend.h:
(isType):
* Source/WebCore/platform/graphics/coreimage/FilterImageCoreImage.mm:
(WebCore::FilterImage::imageBufferFromCIImage):
* Source/WebCore/platform/graphics/coreimage/SourceGraphicCoreImageApplier.mm:
(WebCore::SourceGraphicCoreImageApplier::apply const):

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




More information about the webkit-changes mailing list