[webkit-changes] [WebKit/WebKit] aaab20: Add NativeImageBackend to support GPUP NativeImage
Kimmo Kinnunen
noreply at github.com
Fri Dec 15 00:56:31 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: aaab202e6d11709b07b80ca0aa4e5421129f656d
https://github.com/WebKit/WebKit/commit/aaab202e6d11709b07b80ca0aa4e5421129f656d
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-12-15 (Fri, 15 Dec 2023)
Changed paths:
M Source/WebCore/platform/graphics/NativeImage.cpp
M Source/WebCore/platform/graphics/NativeImage.h
M Source/WebCore/platform/graphics/cairo/NativeImageCairo.cpp
M Source/WebCore/platform/graphics/cg/NativeImageCG.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp
Log Message:
-----------
Add NativeImageBackend to support GPUP NativeImage
https://bugs.webkit.org/show_bug.cgi?id=266216
rdar://119489321
Reviewed by Matt Woodrow.
Add NativeImageBackend interface that future work can use to implement
NativeImage that exists in GPUP.
NativeImage instances are held as members of objects. Thus the interface
cannot be based on NativeImage itself, because this would mean that
transitioning from local to remote would need the held objects replaced.
Instead, make the polymorphic extension point the "backend", similar to
current ImageBuffer.
* Source/WebCore/platform/graphics/NativeImage.cpp:
(WebCore::PlatformImageNativeImageBackend::platformImage const):
(WebCore::PlatformImageNativeImageBackend::PlatformImageNativeImageBackend):
(WebCore::NativeImage::create):
(WebCore::NativeImage::NativeImage):
(WebCore::NativeImage::platformImage const):
(WebCore::NativeImage::replaceContents):
(WebCore::NativeImage::setPlatformImage): Deleted.
* Source/WebCore/platform/graphics/NativeImage.h:
* Source/WebCore/platform/graphics/cg/NativeImageCG.cpp:
(WebCore::NativeImage::create):
(WebCore::NativeImage::size const):
(WebCore::NativeImage::hasAlpha const):
(WebCore::NativeImage::singlePixelSolidColor const):
(WebCore::NativeImage::colorSpace const):
(WebCore::NativeImage::clearSubimages):
* Source/WebKit/WebProcess/GPU/graphics/RemoteResourceCacheProxy.cpp:
(WebKit::createShareableBitmapFromNativeImage):
Canonical link: https://commits.webkit.org/272103@main
More information about the webkit-changes
mailing list