[webkit-changes] [WebKit/WebKit] 7412c3: Add NativeImageBackend to support GPUP NativeImage
Kimmo Kinnunen
noreply at github.com
Tue Dec 19 06:54:47 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 7412c32e31ca3a1627bc7a13ab915b919ff1af00
https://github.com/WebKit/WebKit/commit/7412c32e31ca3a1627bc7a13ab915b919ff1af00
Author: Kimmo Kinnunen <kkinnunen at apple.com>
Date: 2023-12-19 (Tue, 19 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.
Reland after revert. Revert targeted 271976 at main and this was built on
that. Land without the dependency to 271976 at main.
* 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/272266@main
More information about the webkit-changes
mailing list