Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 8ad60ae162b242aaf9039b6e289552cddc37c292
      
https://github.com/WebKit/WebKit/commit/8ad60ae162b242aaf9039b6e289552cddc37c292
  Author: Said Abou-Hallawa <[email protected]>
  Date:   2025-10-30 (Thu, 30 Oct 2025)

  Changed paths:
    M LayoutTests/fast/images/hdr-unaccelerated-image-blur-filter-expected.html
    M LayoutTests/fast/images/hdr-unaccelerated-image-blur-filter.html
    M Source/WebCore/Configurations/AllowedSPI-legacy.toml
    M Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h
    M Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp
    M Source/WebCore/page/Page.cpp
    M Source/WebCore/page/Page.h
    M Source/WebCore/platform/graphics/GraphicsContext.h
    M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
    M Source/WebCore/platform/graphics/cg/GraphicsContextCG.h
    M Source/WebCore/rendering/RenderLayer.cpp
    M Source/WebCore/rendering/RenderLayerFilters.cpp
    M Source/WebCore/rendering/RenderLayerFilters.h
    M Source/WebCore/rendering/style/StyleFilterImage.cpp
    M Source/WebCore/rendering/svg/legacy/LegacyRenderSVGResourceFilter.cpp
    M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextProxy.cpp
    M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextProxy.h

  Log Message:
  -----------
  REGRESSION: Some Feral games are crashing on launch
https://bugs.webkit.org/show_bug.cgi?id=301708
rdar://163220052

Reviewed by Simon Fraser.

The crash happens when applying CG filters on float16 unaccelerated backing 
store.
Recently CG filters were in enabled for all CSS filters; see 300183@main and
300173@main. The problem with this scenario is not supported by the system 
frames
right now.

302306@main tried fixed this issue by falling back to software filters in this 
case.
This change addresses the case where an HDR image is styled with a CSS filters 
and
is displayed on an unaccelerated backing store. This scenario can be hit with
snapshotting like tab preview, print-preview, save to PDF and printing.

But it turned out that AppKit can create float16 unaccelerated backing stories.
So the fix should be more generic than fixing the HDR images scenario.

Till rdar://104392017 is fixed, CSS filters will fall back to software filters 
if
they are applied to float16 unaccelerated backing stores.

* LayoutTests/fast/images/hdr-unaccelerated-image-blur-filter-expected.html:
* LayoutTests/fast/images/hdr-unaccelerated-image-blur-filter.html:
Having `will-change: transform;` on the element forces compositing. In this case
CSS filters will be applied by CA. Remove it so the WebKit filters can be 
tested.

* Source/WebCore/Configurations/AllowedSPI-legacy.toml:
* Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h:
* Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::CanvasRenderingContext2D::createFilter const):
* Source/WebCore/page/Page.cpp:
(WebCore::Page::preferredFilterRenderingModes const):
* Source/WebCore/page/Page.h:
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::knownToHaveFloatBasedBacking const):
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::GraphicsContextCG::knownToHaveFloatBasedBacking const):
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.h:
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::setupFilters):
* Source/WebCore/rendering/RenderLayerFilters.cpp:
(WebCore::RenderLayerFilters::beginFilterEffect):
* Source/WebCore/rendering/RenderLayerFilters.h:
* Source/WebCore/rendering/style/StyleFilterImage.cpp:
(WebCore::StyleFilterImage::image const):
* Source/WebCore/rendering/svg/legacy/LegacyRenderSVGResourceFilter.cpp:
(WebCore::LegacyRenderSVGResourceFilter::applyResource):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextProxy.cpp:
(WebKit::RemoteGraphicsContextProxy::knownToHaveFloatBasedBacking const):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextProxy.h:

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to