[webkit-changes] [WebKit/WebKit] c32ad2: Use the display colorspace for IOSurfaces with mac...

Simon Fraser noreply at github.com
Tue Nov 15 15:38:25 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c32ad2723bd94f699194b280ebb253a8ee302c06
      https://github.com/WebKit/WebKit/commit/c32ad2723bd94f699194b280ebb253a8ee302c06
  Author: Simon Fraser <simon.fraser at apple.com>
  Date:   2022-11-15 (Tue, 15 Nov 2022)

  Changed paths:
    M Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm
    M Source/WebKit/UIProcess/DrawingAreaProxy.h
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.h
    M Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.mm
    M Source/WebKit/UIProcess/WebPageProxy.h
    M Source/WebKit/UIProcess/mac/WebPageProxyMac.mm
    M Source/WebKit/WebProcess/WebPage/DrawingArea.h
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h
    M Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm
    M Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.h
    M Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.mm
    M Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
    M Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm

  Log Message:
  -----------
  Use the display colorspace for IOSurfaces with macOS UI-side compositing
https://bugs.webkit.org/show_bug.cgi?id=247929
<rdar://problem/102346748>

Reviewed by Tim Horton.

Hook up `RemoteLayerTreeDrawingAreaMac::setColorSpace()`, and add a `displayColorSpace()`
getter on DrawingArea, implementing on TiledCoreAnimationDrawingArea and RemoteLayerTreeDrawingAreaMac.
TiledCoreAnimationDrawingArea stores the colorspace on the LayerHostingContext, and
RemoteLayerTreeDrawingAreaMac stores it directly.

Then add some code for macOS in `RemoteLayerBackingStore::colorSpace()` to fetch the
colorspace via the RemoteLayerTreeContext, which consults the DrawingArea.

Also hook up `RemoteLayerTreeDrawingAreaProxyMac::colorSpaceDidChange()`, which
is used to push in the colorspace on initial window creation.

Updating the colorspace on all IOSurfaces when moving a window between displays is not yet supported.

* Source/WebKit/Shared/RemoteLayerTree/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::colorSpace const):
* Source/WebKit/UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::colorSpaceDidChange):
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.h:
* Source/WebKit/UIProcess/RemoteLayerTree/mac/RemoteLayerTreeDrawingAreaProxyMac.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxyMac::colorSpaceDidChange):
* Source/WebKit/UIProcess/WebPageProxy.h:
* Source/WebKit/UIProcess/mac/WebPageProxyMac.mm:
* Source/WebKit/WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::displayColorSpace const):
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.h:
* Source/WebKit/WebProcess/WebPage/RemoteLayerTree/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::displayColorSpace const):
* Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.h:
* Source/WebKit/WebProcess/WebPage/mac/RemoteLayerTreeDrawingAreaMac.mm:
(WebKit::RemoteLayerTreeDrawingAreaMac::RemoteLayerTreeDrawingAreaMac):
(WebKit::RemoteLayerTreeDrawingAreaMac::setColorSpace):
(WebKit::RemoteLayerTreeDrawingAreaMac::displayColorSpace const):
* Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* Source/WebKit/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::displayColorSpace const):

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




More information about the webkit-changes mailing list