Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 715af9163fd6c2b779b66f2b9004c99263e2e068
https://github.com/WebKit/WebKit/commit/715af9163fd6c2b779b66f2b9004c99263e2e068
Author: Kimmo Kinnunen <[email protected]>
Date: 2026-09-02 (Wed, 02 Sep 2026)
Changed paths:
M Source/WebCore/html/CanvasBase.h
M Source/WebCore/html/CustomPaintCanvas.cpp
M Source/WebCore/html/CustomPaintCanvas.h
M Source/WebCore/html/HTMLCanvasElement.cpp
M Source/WebCore/html/HTMLCanvasElement.h
M Source/WebCore/html/ImageBitmap.cpp
M Source/WebCore/html/OffscreenCanvas.cpp
M Source/WebCore/html/OffscreenCanvas.h
M Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp
M Source/WebCore/html/canvas/GPUCanvasContextCocoa.mm
M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
M Source/WebCore/html/canvas/WebGLRenderingContextBase.h
M Source/WebCore/platform/graphics/GraphicsContextGL.cpp
M Source/WebCore/platform/graphics/GraphicsContextGL.h
M Source/WebCore/platform/graphics/GraphicsContextGLImageExtractor.cpp
M Source/WebCore/platform/graphics/GraphicsContextGLImageExtractor.h
M Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp
M Source/WebCore/platform/graphics/cg/GraphicsContextGLCG.cpp
M Source/WebCore/platform/graphics/skia/GraphicsContextGLSkia.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h
Log Message:
-----------
Remove CanvasBase::copiedImage()
https://bugs.webkit.org/show_bug.cgi?id=322712
rdar://185975901
Reviewed by Dan Glastonbury.
Remove CanvasBase::copiedImage(), most notably allowing removal of
OffscreenCanvas::copiedImage().
Only HTMLCanvasElement needs copiedImage() to provide an WebCore::Image
to CSSCanvasValue. OffscreenCanvas does not need this.
Replace WebGLRenderingContextBase texture upload paths to obtain the
image data from NativeImages instead. It is pointless to wrap the
NativeImages into Image instances only to extract the NativeImage
and the data out. Later on, the NativeImages can be directly used
to upload the data in some specific cases.
* Source/WebCore/html/CanvasBase.h:
* Source/WebCore/html/CustomPaintCanvas.cpp:
(WebCore::CustomPaintCanvas::copiedImage const): Deleted.
(WebCore::CustomPaintCanvas::clearCopiedImage const): Deleted.
* Source/WebCore/html/CustomPaintCanvas.h:
* Source/WebCore/html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::willUpdateContents):
(WebCore::HTMLCanvasElement::didUpdateSizeProperties):
(WebCore::HTMLCanvasElement::clearCopiedImage const): Deleted.
* Source/WebCore/html/HTMLCanvasElement.h:
* Source/WebCore/html/ImageBitmap.cpp:
(WebCore::ImageBitmap::createCompletionHandler):
* Source/WebCore/html/OffscreenCanvas.cpp:
(WebCore::OffscreenCanvas::didUpdateSizeProperties):
(WebCore::OffscreenCanvas::transferToImageBitmap):
(WebCore::OffscreenCanvas::willUpdateContents):
(WebCore::OffscreenCanvas::copiedImage const): Deleted.
(WebCore::OffscreenCanvas::clearCopiedImage const): Deleted.
* Source/WebCore/html/OffscreenCanvas.h:
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::createPattern):
* Source/WebCore/html/canvas/GPUCanvasContextCocoa.mm:
(WebCore::GPUCanvasContextCocoa::surfaceBufferToImageBuffer):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::texImageSourceSize):
(WebCore::nativeImageForTexImageSource):
(WebCore::WebGLRenderingContextBase::texImageSource):
(WebCore::WebGLRenderingContextBase::texImageImpl):
(WebCore::WebGLRenderingContextBase::drawImageIntoBuffer):
(WebCore::WebGLRenderingContextBase::videoFrameToNativeImage):
(WebCore::WebGLRenderingContextBase::videoFrameToImage): Deleted.
* Source/WebCore/html/canvas/WebGLRenderingContextBase.h:
* Source/WebCore/platform/graphics/GraphicsContextGL.cpp:
(WebCore::GraphicsContextGL::packImageData):
(WebCore::GraphicsContextGL::videoFrameToNativeImage):
(WebCore::GraphicsContextGL::videoFrameToImage): Deleted.
* Source/WebCore/platform/graphics/GraphicsContextGL.h:
* Source/WebCore/platform/graphics/GraphicsContextGLImageExtractor.cpp:
(WebCore::GraphicsContextGLImageExtractor::GraphicsContextGLImageExtractor):
* Source/WebCore/platform/graphics/GraphicsContextGLImageExtractor.h:
* Source/WebCore/platform/graphics/cairo/GraphicsContextGLCairo.cpp:
(WebCore::GraphicsContextGLImageExtractor::extractImage):
* Source/WebCore/platform/graphics/cg/GraphicsContextGLCG.cpp:
(WebCore::GraphicsContextGLImageExtractor::extractImage):
* Source/WebCore/platform/graphics/skia/GraphicsContextGLSkia.cpp:
(WebCore::GraphicsContextGLImageExtractor::extractImage):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
(WebKit::RemoteGraphicsContextGLProxy::videoFrameToNativeImage):
(WebKit::RemoteGraphicsContextGLProxy::videoFrameToImage): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
Canonical link: https://commits.webkit.org/320327@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications