Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 479c91177422567b22378a1781c15e944eeb1b09
https://github.com/WebKit/WebKit/commit/479c91177422567b22378a1781c15e944eeb1b09
Author: Said Abou-Hallawa <[email protected]>
Date: 2026-05-15 (Fri, 15 May 2026)
Changed paths:
M Source/WebCore/platform/graphics/BitmapImageSource.cpp
M Source/WebCore/platform/graphics/BitmapImageSource.h
M Source/WebCore/platform/graphics/DecodingOptions.h
M Source/WebCore/platform/graphics/GraphicsContext.h
M Source/WebCore/platform/graphics/ImageDecoder.cpp
M Source/WebCore/platform/graphics/ImageDecoder.h
M Source/WebCore/platform/graphics/ImageFrame.cpp
M Source/WebCore/platform/graphics/ImageFrame.h
M Source/WebCore/platform/graphics/ImageFrameWorkQueue.cpp
M Source/WebCore/platform/graphics/ImageFrameWorkQueue.h
M Source/WebCore/platform/graphics/NativeImage.cpp
M Source/WebCore/platform/graphics/NativeImage.h
M Source/WebCore/platform/graphics/ShareableBitmap.cpp
M Source/WebCore/platform/graphics/ShareableBitmap.h
M Source/WebCore/platform/graphics/cairo/NativeImageCairo.cpp
M Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp
M Source/WebCore/platform/graphics/cg/NativeImageCG.cpp
M Source/WebCore/platform/graphics/cg/ShareableBitmapCG.mm
M Source/WebCore/platform/graphics/skia/NativeImageSkia.cpp
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextProxy.h
M Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp
Log Message:
-----------
[HDR] Use accelerated backing stores to apply the gain-map image in GPUProcess
https://bugs.webkit.org/show_bug.cgi?id=314452
rdar://176605566
Reviewed by Cameron McCormack.
DecodingDestination::BaseAndGainMap will be chosen to decode an ImageFrame
destination only if the ImageSource has gain-map and the context is remote.
ImageDecoder::createNativeImageAtIndex() can now create a NativeImage with
BaseAndGainMap. This NativeImage will return a calculated Headroom rather
than returning the Headroom of the baseImage which should be Headroom::None.
Decoding a frame may return a destination different from what was preferred.
BitmapImageSource has to account for this and do not assume the returned
NativeImage has to be the requested DecodingDestination.
When comparing DecodingDestinations in DecodingOptions for compatibility,
they have to be equal except one exception: A fully decoded HDR image is
compatible with DecodingDestination::BaseAndGainMap request.
* Source/WebCore/platform/graphics/BitmapImageSource.cpp:
(WebCore::BitmapImageSource::preferredDecodingDestination const):
(WebCore::BitmapImageSource::compatibleDecodingDestinationWithOptionsAtIndex
const):
(WebCore::BitmapImageSource::decode):
(WebCore::BitmapImageSource::requestNativeImageAtIndexIfNeeded):
(WebCore::BitmapImageSource::nativeImageAtIndexCacheIfNeeded):
(WebCore::BitmapImageSource::nativeImageAtIndexRequestIfNeeded):
(WebCore::BitmapImageSource::isCompatibleWithOptionsAtIndex const): Deleted.
* Source/WebCore/platform/graphics/BitmapImageSource.h:
* Source/WebCore/platform/graphics/DecodingOptions.h:
(WebCore::DecodingOptions::isCompatibleWith const):
* Source/WebCore/platform/graphics/GraphicsContext.h:
(WebCore::GraphicsContext::renderingMethod const):
* Source/WebCore/platform/graphics/ImageDecoder.cpp:
(WebCore::ImageDecoder::createNativeImageAtIndex):
* Source/WebCore/platform/graphics/ImageDecoder.h:
* Source/WebCore/platform/graphics/ImageFrame.cpp:
(WebCore::ImageFrame::clearImage):
(WebCore::ImageFrame::compatibleDecodingDestinationWithOptions const):
(WebCore::ImageFrame::hasDecodedNativeImageCompatibleWithOptions const):
Deleted.
* Source/WebCore/platform/graphics/ImageFrame.h:
(WebCore::ImageFrame::decodingDestinationIfExists const):
* Source/WebCore/platform/graphics/ImageFrameWorkQueue.cpp:
(WebCore::ImageFrameWorkQueue::start):
* Source/WebCore/platform/graphics/ImageFrameWorkQueue.h:
(WebCore::ImageFrameWorkQueue::Request::isCompatibleWith const):
* Source/WebCore/platform/graphics/NativeImage.cpp:
(WebCore::NativeImage::NativeImage):
(WebCore::NativeImage::replacePlatformImage const):
* Source/WebCore/platform/graphics/NativeImage.h:
(WebCore::NativeImage::hasHDRGainMap const):
(WebCore::NativeImage::baseImageHeadroom const):
(WebCore::NativeImage::headroom const):
* Source/WebCore/platform/graphics/ShareableBitmap.cpp:
(WebCore::ShareableBitmapConfiguration::ShareableBitmapConfiguration):
(WebCore::ShareableBitmap::create):
(WebCore::ShareableBitmap::ShareableBitmap):
* Source/WebCore/platform/graphics/ShareableBitmap.h:
(WebCore::ShareableBitmapConfiguration::baseImageHeadroom const):
(WebCore::ShareableBitmapConfiguration::headroom const): Deleted.
* Source/WebCore/platform/graphics/cairo/NativeImageCairo.cpp:
(WebCore::NativeImage::headroom const): Deleted.
* Source/WebCore/platform/graphics/cg/ImageDecoderCG.cpp:
(WebCore::ImageDecoderCG::frameGainMapAtIndex):
* Source/WebCore/platform/graphics/cg/NativeImageCG.cpp:
(WebCore::NativeImage::computeHeadroom const):
(WebCore::NativeImage::headroom const): Deleted.
* Source/WebCore/platform/graphics/cg/ShareableBitmapCG.mm:
(WebCore::ShareableBitmapConfiguration::ShareableBitmapConfiguration):
(WebCore::ShareableBitmap::createBasePlatformImage):
(WebCore::ShareableBitmap::createPlatformImage):
* Source/WebCore/platform/graphics/skia/NativeImageSkia.cpp:
(WebCore::NativeImage::headroom const): Deleted.
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextProxy.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:
(WebKit::createShareableBitmapForNativeImage):
Canonical link: https://commits.webkit.org/313339@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications