[webkit-changes] [WebKit/WebKit] bd8e99: Use an alpha-less pixel format for 32 bit IOSurfac...

Cameron McCormack noreply at github.com
Mon Jan 9 02:33:18 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: bd8e9982ce3ea314fbb6c5c132e391dd159b69ab
      https://github.com/WebKit/WebKit/commit/bd8e9982ce3ea314fbb6c5c132e391dd159b69ab
  Author: Cameron McCormack <heycam at apple.com>
  Date:   2023-01-09 (Mon, 09 Jan 2023)

  Changed paths:
    M Source/WebCore/platform/graphics/PixelBuffer.cpp
    M Source/WebCore/platform/graphics/PixelBufferConversion.cpp
    M Source/WebCore/platform/graphics/PixelFormat.cpp
    M Source/WebCore/platform/graphics/PixelFormat.h
    M Source/WebCore/platform/graphics/cg/IOSurfacePool.cpp
    M Source/WebCore/platform/graphics/cocoa/IOSurface.h
    M Source/WebCore/platform/graphics/cocoa/IOSurface.mm
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm
    M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in

  Log Message:
  -----------
  Use an alpha-less pixel format for 32 bit IOSurfaces when RemoteLayerBackingStore::Parameters::isOpaque is true
https://bugs.webkit.org/show_bug.cgi?id=250100
rdar://103885395

Reviewed by Tim Horton.

We use a std::optional<Format> to store the surface format since we
sometimes use IOSurface with video surface types from WebRTC, which
aren't represented by IOSurface::Format. For such surfaces we never need
to care about the specific format.

* Source/WebCore/platform/graphics/PixelBuffer.cpp:
(WebCore::PixelBuffer::supportedPixelFormat):
* Source/WebCore/platform/graphics/PixelBufferConversion.cpp:
(WebCore::makeVImageCGImageFormat):
(WebCore::convertImagePixels):
* Source/WebCore/platform/graphics/PixelFormat.cpp:
(WebCore::operator<<):
* Source/WebCore/platform/graphics/PixelFormat.h:
* Source/WebCore/platform/graphics/cocoa/IOSurface.h:
* Source/WebCore/platform/graphics/cocoa/IOSurface.mm:
(WebCore::formatFromSurface):
(WebCore::IOSurface::IOSurface):
(WebCore::IOSurface::bitmapConfiguration const):
(WebCore::IOSurface::formatForPixelFormat):
(WebCore::operator<<):
(WebCore::IOSurface::format const): Deleted.
* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::pixelFormat const):
(WebKit::RemoteLayerBackingStore::bytesPerPixel const):
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:

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




More information about the webkit-changes mailing list