Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: dc865d0b61c4d846263311601091fe1b475c5921
      
https://github.com/WebKit/WebKit/commit/dc865d0b61c4d846263311601091fe1b475c5921
  Author: Gerald Squelart <[email protected]>
  Date:   2026-08-09 (Sun, 09 Aug 2026)

  Changed paths:
    M Source/WebCore/html/ImageData.cpp
    M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
    M Source/WebCore/html/canvas/PredefinedColorSpace.cpp
    M Source/WebCore/html/canvas/PredefinedColorSpace.h
    M Source/WebCore/platform/graphics/PixelFormat.h

  Log Message:
  -----------
  Canvas with float16 should use an extended DestinationColorSpace
https://bugs.webkit.org/show_bug.cgi?id=321163
rdar://184199283

Reviewed by Mike Wyrzykowski.

When a canvas is using a ColorType like float16 that allows for extended
dynamic range, and the system supports the corresponding PixelFormat
natively, attempt to use an extended DestinationColorSpace if
available.

No new tests, as existing tests should fail if there is any visible
impact.

* Source/WebCore/html/ImageData.cpp:
(WebCore::ImageData::float16ArrayPixelBuffer const):
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::getImageData const):
(WebCore::allowExtendedColorSpace):
(WebCore::CanvasRenderingContext2DBase::colorSpace const):
* Source/WebCore/html/canvas/PredefinedColorSpace.cpp:
(WebCore::toExtendedDestinationColorSpace):
(WebCore::toDestinationColorSpace):
(WebCore::toPredefinedColorSpace):
* Source/WebCore/html/canvas/PredefinedColorSpace.h:
* Source/WebCore/platform/graphics/PixelFormat.h:
(WebCore::convertToContentsFormat):
(WebCore::allowExtendedColorSpace):

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



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

Reply via email to