Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImageBuffer filter operations should return NativeImage #18011

Conversation

kkinnunen-apple
Copy link
Contributor

@kkinnunen-apple kkinnunen-apple commented Sep 21, 2023

f057667

ImageBuffer filter operations should return NativeImage
https://bugs.webkit.org/show_bug.cgi?id=261866
rdar://115829020

Reviewed by Antti Koivisto.

ImageBuffer operates on NativeImages, WebCore::Image is a higher level
type. The filter operations anyway flatten the results into a
NativeImage, from which the WebCore::Image was always created.

Construct the WebCore::Image at the caller if needed.

Since this renames the function, move the GPUP implementation from
the RemoteRenderingBackendProxy to the real caller which is the
RemoteImageBufferProxy. The messages have already been moved previously.

This is work towards simplifying ImageBuffer API use NativeImage only.

* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::filteredNativeImage):
(WebCore::ImageBuffer::filteredImage): Deleted.
* Source/WebCore/platform/graphics/ImageBuffer.h:
* Source/WebCore/rendering/style/StyleFilterImage.cpp:
(WebCore::StyleFilterImage::image const):
* Source/WebKit/GPUProcess/graphics/RemoteImageBuffer.cpp:
(WebKit::RemoteImageBuffer::filteredNativeImage):
(WebKit::RemoteImageBuffer::getFilteredImage): Deleted.
* Source/WebKit/GPUProcess/graphics/RemoteImageBuffer.h:
* Source/WebKit/GPUProcess/graphics/RemoteImageBuffer.messages.in:
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.cpp:
(WebKit::RemoteImageBufferProxy::sendSync):
(WebKit::RemoteImageBufferProxy::filteredNativeImage):
(WebKit::RemoteImageBufferProxy::filteredImage): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::getFilteredImage): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:

Canonical link: https://commits.webkit.org/268301@main

5ab53dc

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🛠 gtk
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🧪 gtk-wk2
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🧪 api-gtk
✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2
✅ 🛠 tv-sim
✅ 🛠 🧪 merge ✅ 🛠 watch
✅ 🛠 watch-sim

@kkinnunen-apple kkinnunen-apple self-assigned this Sep 21, 2023
@kkinnunen-apple kkinnunen-apple added the Canvas Bugs related to the canvas element. label Sep 21, 2023
@kkinnunen-apple kkinnunen-apple changed the title ImageBuffer filter operations should return NativeImage RemoteImageDecoderAVFProxy leaks video frames through CG image cache Sep 21, 2023
@kkinnunen-apple kkinnunen-apple added Media Bugs related to the HTML 5 Media elements. and removed Canvas Bugs related to the canvas element. labels Sep 21, 2023
@kkinnunen-apple kkinnunen-apple changed the title RemoteImageDecoderAVFProxy leaks video frames through CG image cache ImageBuffer filter operations should return NativeImage Sep 21, 2023
@kkinnunen-apple kkinnunen-apple added Canvas Bugs related to the canvas element. and removed Media Bugs related to the HTML 5 Media elements. labels Sep 21, 2023
@kkinnunen-apple kkinnunen-apple requested review from shallawa and removed request for cdumez September 21, 2023 19:06
@kkinnunen-apple kkinnunen-apple added the merge-queue Applied to send a pull request to merge-queue label Sep 22, 2023
https://bugs.webkit.org/show_bug.cgi?id=261866
rdar://115829020

Reviewed by Antti Koivisto.

ImageBuffer operates on NativeImages, WebCore::Image is a higher level
type. The filter operations anyway flatten the results into a
NativeImage, from which the WebCore::Image was always created.

Construct the WebCore::Image at the caller if needed.

Since this renames the function, move the GPUP implementation from
the RemoteRenderingBackendProxy to the real caller which is the
RemoteImageBufferProxy. The messages have already been moved previously.

This is work towards simplifying ImageBuffer API use NativeImage only.

* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::filteredNativeImage):
(WebCore::ImageBuffer::filteredImage): Deleted.
* Source/WebCore/platform/graphics/ImageBuffer.h:
* Source/WebCore/rendering/style/StyleFilterImage.cpp:
(WebCore::StyleFilterImage::image const):
* Source/WebKit/GPUProcess/graphics/RemoteImageBuffer.cpp:
(WebKit::RemoteImageBuffer::filteredNativeImage):
(WebKit::RemoteImageBuffer::getFilteredImage): Deleted.
* Source/WebKit/GPUProcess/graphics/RemoteImageBuffer.h:
* Source/WebKit/GPUProcess/graphics/RemoteImageBuffer.messages.in:
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.cpp:
(WebKit::RemoteImageBufferProxy::sendSync):
(WebKit::RemoteImageBufferProxy::filteredNativeImage):
(WebKit::RemoteImageBufferProxy::filteredImage): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteImageBufferProxy.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::getFilteredImage): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.h:

Canonical link: https://commits.webkit.org/268301@main
@webkit-commit-queue webkit-commit-queue merged commit f057667 into WebKit:main Sep 22, 2023
@webkit-commit-queue
Copy link
Collaborator

Committed 268301@main (f057667): https://commits.webkit.org/268301@main

Reviewed commits have been landed. Closing PR #18011 and removing active labels.

@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Canvas Bugs related to the canvas element.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants