Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: fd22b8420d86a73fc777a825132d29f1ebb3b85d
      
https://github.com/WebKit/WebKit/commit/fd22b8420d86a73fc777a825132d29f1ebb3b85d
  Author: Matt Woodrow <mattwood...@apple.com>
  Date:   2025-07-11 (Fri, 11 Jul 2025)

  Changed paths:
    M Source/WebCore/platform/graphics/Color.h
    M Source/WebCore/platform/graphics/cg/ColorCG.cpp
    M Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp
    M Tools/TestWebKitAPI/Tests/WebCore/cg/GraphicsContextCGTests.mm

  Log Message:
  -----------
  Extended colors should be clamped so they look the same in SDR and HDR layers.
https://bugs.webkit.org/show_bug.cgi?id=292226
<rdar://150231788>

Reviewed by Mike Wyrzykowski.

When drawing to an extended color space destination, manually convert colors
into the standard range to get the same output as would have happened with a
standard range destination.

* Source/WebCore/platform/graphics/Color.h:
* Source/WebCore/platform/graphics/cg/ColorCG.cpp:
(WTF::RetainPtr<CGColorRef>>::createValueForKey):
(WebCore::createSDRCGColorForColorspace):
(WebCore::cachedSDRCGColorForColorspace):
* Source/WebCore/platform/graphics/cg/GraphicsContextCG.cpp:
(WebCore::setCGFillColor):
(WebCore::GraphicsContextCG::drawRect):
(WebCore::GraphicsContextCG::drawLine):
(WebCore::GraphicsContextCG::fillRect):
(WebCore::GraphicsContextCG::fillRoundedRectImpl):
(WebCore::GraphicsContextCG::setCGShadow):
(WebCore::GraphicsContextCG::didUpdateState):
(WebCore::GraphicsContextCG::drawLinesForText):
* Tools/TestWebKitAPI/Tests/WebCore/cg/GraphicsContextCGTests.mm:
(TestWebKitAPI::TEST(GraphicsContextTests, OutOfGamutSRGBNotDrawn)):

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to