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

IPC::PixelBufferReference is a redundant class in wrong software layer #3302

Conversation

kkinnunen-apple
Copy link
Contributor

@kkinnunen-apple kkinnunen-apple commented Aug 15, 2022

7b1cf97

IPC::PixelBufferReference is a redundant class in wrong software layer
https://bugs.webkit.org/show_bug.cgi?id=241331

Reviewed by Simon Fraser.

Instead of a new class PixelBufferReference, the IPC messages should
just use Ref<PixelBuffer>.

Solves problems:
 - IPC::PixelBufferReference should not exist in IPC layer. PixelBuffer
is WebCore class.
 - IPC::PixelBufferReference is not a reference to a pixel buffer. It
is copying the pixel buffer data.
 - Allows more WebGL GPUP support code to be autogenerated.

* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
(WebKit::RemoteGraphicsContextGL::paintRenderingResultsToPixelBuffer): Deleted.
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:
(paintRenderingResultsToPixelBuffer):
* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::putPixelBufferForImageBuffer):
* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h:
* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.messages.in:
* Source/WebKit/Platform/IPC/PixelBufferReference.h: Removed.
* Source/WebKit/Scripts/webkit/messages.py:
(types_that_cannot_be_forward_declared):
* Source/WebKit/Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<PixelBuffer>::encode):
(IPC::ArgumentCoder<PixelBuffer>::decode):
* Source/WebKit/Shared/WebCoreArgumentCoders.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
(WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToPixelBuffer): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:
(WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToPixelBuffer):
* Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::putPixelBufferForImageBuffer):
* Tools/Scripts/generate-gpup-webgl:

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

@kkinnunen-apple kkinnunen-apple added the merge-queue Applied to send a pull request to merge-queue label Aug 17, 2022
https://bugs.webkit.org/show_bug.cgi?id=241331

Reviewed by Simon Fraser.

Instead of a new class PixelBufferReference, the IPC messages should
just use Ref<PixelBuffer>.

Solves problems:
 - IPC::PixelBufferReference should not exist in IPC layer. PixelBuffer
is WebCore class.
 - IPC::PixelBufferReference is not a reference to a pixel buffer. It
is copying the pixel buffer data.
 - Allows more WebGL GPUP support code to be autogenerated.

* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
(WebKit::RemoteGraphicsContextGL::paintRenderingResultsToPixelBuffer): Deleted.
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:
(paintRenderingResultsToPixelBuffer):
* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.cpp:
(WebKit::RemoteRenderingBackend::putPixelBufferForImageBuffer):
* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.h:
* Source/WebKit/GPUProcess/graphics/RemoteRenderingBackend.messages.in:
* Source/WebKit/Platform/IPC/PixelBufferReference.h: Removed.
* Source/WebKit/Scripts/webkit/messages.py:
(types_that_cannot_be_forward_declared):
* Source/WebKit/Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<PixelBuffer>::encode):
(IPC::ArgumentCoder<PixelBuffer>::decode):
* Source/WebKit/Shared/WebCoreArgumentCoders.h:
* Source/WebKit/WebKit.xcodeproj/project.pbxproj:
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
(WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToPixelBuffer): Deleted.
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:
(WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToPixelBuffer):
* Source/WebKit/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.cpp:
(WebKit::RemoteRenderingBackendProxy::putPixelBufferForImageBuffer):
* Tools/Scripts/generate-gpup-webgl:

Canonical link: https://commits.webkit.org/253512@main
@webkit-commit-queue
Copy link
Collaborator

Committed 253512@main (7b1cf97): https://commits.webkit.org/253512@main

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

@webkit-early-warning-system webkit-early-warning-system merged commit 7b1cf97 into WebKit:main Aug 17, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Aug 17, 2022
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
4 participants