forked from WebKit/WebKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ImageBuffer::copyImage is redundant, should use copyNativeImage instead
https://bugs.webkit.org/show_bug.cgi?id=261944 rdar://115891269 Reviewed by Matt Woodrow. Remove ImageBuffer::copyImaage(). WebCore::Image is higher level type. Callers should call sinkIntoNativeImage and then convert the NativeImage into Image, if needed. Note: most callers should use NativeImage, as that is the lowest level source image. These are identical: copyImage(CopyBackingStore, PreserveResolution::Yes) -> copyNativeImage() copyImage(DontCopyBackingStore, PreserveResolution::No) + scale 1 -> createNativeImageReference() Other variants wouldn't have corresponding NativeImage call, but they do not exist. This is work towards simplifying ImageBuffer by making it operate with NativeImage as its primary primitive image source. * Source/WebCore/html/CustomPaintCanvas.cpp: (WebCore::CustomPaintCanvas::copiedImage const): Fix an issue where the code would nullptr deref if Context2D call would try to reset the transform to default. The idea of CanvasBase::baseTransform() is that it would return the transform to be set, but this cannot happen because ImageBuffer has not been created at the time of the call. The transform reset is recorded. * Source/WebCore/html/HTMLCanvasElement.cpp: (WebCore::HTMLCanvasElement::copiedImage const): * Source/WebCore/html/ImageBitmap.cpp: (WebCore::ImageBitmap::createCompletionHandler): * Source/WebCore/html/OffscreenCanvas.cpp: (WebCore::OffscreenCanvas::copiedImage const): * Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp: (WebCore::WebGLRenderingContextBase::texImageSource): (WebCore::WebGLRenderingContextBase::drawImageIntoBuffer): (WebCore::WebGLRenderingContextBase::videoFrameToImage): * Source/WebCore/html/canvas/WebGLRenderingContextBase.h: * Source/WebCore/platform/graphics/GraphicsContext.cpp: (WebCore::GraphicsContext::drawPattern): * Source/WebCore/platform/graphics/GraphicsContextGL.cpp: (WebCore::GraphicsContextGL::videoFrameToImage): * Source/WebCore/platform/graphics/ImageBuffer.cpp: (WebCore::ImageBuffer::copyImage const): Deleted. * Source/WebCore/platform/graphics/ImageBuffer.h: * Source/WebCore/platform/graphics/nicosia/cairo/NicosiaCairoOperationRecorder.cpp: (Nicosia::CairoOperationRecorder::drawImageBuffer): (Nicosia::CairoOperationRecorder::drawFilteredImageBuffer): (Nicosia::CairoOperationRecorder::clipToImageBuffer): * Source/WebCore/platform/graphics/texmap/BitmapTexture.cpp: (WebCore::BitmapTexture::updateContents): * Source/WebCore/platform/graphics/texmap/BitmapTexture.h: * Source/WebCore/platform/graphics/texmap/BitmapTextureGL.cpp: (WebCore::BitmapTextureGL::updateContents): * Source/WebCore/platform/graphics/texmap/BitmapTextureGL.h: * Source/WebCore/platform/mediastream/mac/MockRealtimeVideoSourceMac.mm: (WebCore::MockRealtimeVideoSourceMac::updateSampleBuffer): Canonical link: https://commits.webkit.org/268643@main
- Loading branch information
1 parent
18b61d6
commit b5117f4
Showing
18 changed files
with
47 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters