Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 4e1d8dcfdf78483ca78dd4bbf61b5ef493dfbc62
https://github.com/WebKit/WebKit/commit/4e1d8dcfdf78483ca78dd4bbf61b5ef493dfbc62
Author: Kimmo Kinnunen <[email protected]>
Date: 2025-10-10 (Fri, 10 Oct 2025)
Changed paths:
M Source/WebCore/html/canvas/WebGL2RenderingContext.cpp
M Source/WebCore/html/canvas/WebGL2RenderingContext.h
M Source/WebCore/html/canvas/WebGL2RenderingContext.idl
M Source/WebCore/html/canvas/WebGLDebugShaders.cpp
M Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp
M Source/WebCore/html/canvas/WebGLRenderingContextBase.h
M Source/WebCore/platform/graphics/GraphicsContextGL.h
M Source/WebCore/platform/graphics/GraphicsContextGLActiveInfo.h
M Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp
M Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h
M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp
M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h
M Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in
M
Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.cpp
M
Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h
M
Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLInitializationState.h
M
Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLInitializationState.serialization.in
M Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in
M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp
M Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h
M
Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in
M
Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp
M Tools/Scripts/generate-gpup-webgl
M Tools/TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLCocoa.mm
M Tools/TestWebKitAPI/Tests/WebCore/glib/GraphicsContextGLTextureMapper.cpp
Log Message:
-----------
WebGL spends time converting strings to UTF8 in GPUP
https://bugs.webkit.org/show_bug.cgi?id=300450
rdar://162301901
Reviewed by Dan Glastonbury.
GraphicsContextGL interface would accept and return Strings, even though
the underlying implementation works with C string encoding and mostly
ascii or UTF8 strings.
Fix by changing the API to use CStrings. Convert the strings to CStrings
as early as possible when they come from JS. This saves a bit of copying
during IPC transfer.
Test: Tools/TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLCocoa.mm
* Source/WebCore/html/canvas/WebGL2RenderingContext.cpp:
(WebCore::WebGL2RenderingContext::getFragDataLocation):
(WebCore::WebGL2RenderingContext::transformFeedbackVaryings):
(WebCore::WebGL2RenderingContext::getTransformFeedbackVarying):
(WebCore::WebGL2RenderingContext::getUniformIndices):
(WebCore::WebGL2RenderingContext::getUniformBlockIndex):
(WebCore::WebGL2RenderingContext::getActiveUniformBlockName):
* Source/WebCore/html/canvas/WebGLDebugShaders.cpp:
(WebCore::WebGLDebugShaders::getTranslatedShaderSource):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::ensureNotNull):
(WebCore::WebGLRenderingContextBase::bindAttribLocation):
(WebCore::WebGLRenderingContextBase::getActiveAttrib):
(WebCore::WebGLRenderingContextBase::getActiveUniform):
(WebCore::WebGLRenderingContextBase::getAttribLocation):
(WebCore::WebGLRenderingContextBase::getProgramInfoLog):
(WebCore::WebGLRenderingContextBase::getShaderInfoLog):
(WebCore::WebGLRenderingContextBase::getShaderSource):
(WebCore::WebGLRenderingContextBase::getUniformLocation):
(WebCore::WebGLRenderingContextBase::shaderSource):
(WebCore::WebGLRenderingContextBase::enableSupportedExtension):
(WebCore::WebGLRenderingContextBase::addDebugMessage):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.h:
* Source/WebCore/platform/graphics/GraphicsContextGL.h:
* Source/WebCore/platform/graphics/GraphicsContextGLActiveInfo.h:
* Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp:
(WebCore::GraphicsContextGLANGLE::initialize):
(WebCore::GraphicsContextGLANGLE::validateDepthStencil):
(WebCore::GraphicsContextGLANGLE::bindAttribLocation):
(WebCore::GraphicsContextGLANGLE::getActiveAttrib):
(WebCore::GraphicsContextGLANGLE::getActiveUniform):
(WebCore::GraphicsContextGLANGLE::getAttribLocation):
(WebCore::GraphicsContextGLANGLE::getString):
(WebCore::GraphicsContextGLANGLE::shaderSource):
(WebCore::GraphicsContextGLANGLE::getProgramInfoLog):
(WebCore::GraphicsContextGLANGLE::getShaderInfoLog):
(WebCore::GraphicsContextGLANGLE::getUniformLocation):
(WebCore::GraphicsContextGLANGLE::getUniformBlockIndex):
(WebCore::GraphicsContextGLANGLE::getActiveUniformBlockName):
(WebCore::GraphicsContextGLANGLE::transformFeedbackVaryings):
(WebCore::GraphicsContextGLANGLE::getTransformFeedbackVarying):
(WebCore::GraphicsContextGLANGLE::getFragDataLocation):
(WebCore::GraphicsContextGLANGLE::getUniformIndices):
(WebCore::GraphicsContextGLANGLE::supportsExtension):
(WebCore::GraphicsContextGLANGLE::ensureExtensionEnabled):
(WebCore::GraphicsContextGLANGLE::isExtensionEnabled):
(WebCore::GraphicsContextGLANGLE::getTranslatedShaderSourceANGLE):
(WebCore::GraphicsContextGLANGLE::enableExtension):
(WebCore::GraphicsContextGLANGLE::requestExtension):
(WebCore::GraphicsContextGLANGLE::getActiveAttribImpl): Deleted.
(WebCore::GraphicsContextGLANGLE::getActiveUniformImpl): Deleted.
(WebCore::GraphicsContextGLANGLE::getShaderSource): Deleted.
* Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.h:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp:
(WebKit::RemoteGraphicsContextGL::workQueueInitialize):
(WebKit::RemoteGraphicsContextGL::addDebugMessage):
(WebKit::RemoteGraphicsContextGL::ensureExtensionEnabled):
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h:
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
*
Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.cpp:
(WebKit::RemoteGraphicsContextGL::bindAttribLocation):
(WebKit::RemoteGraphicsContextGL::getActiveAttrib):
(WebKit::RemoteGraphicsContextGL::getActiveUniform):
(WebKit::RemoteGraphicsContextGL::getAttribLocation):
(WebKit::RemoteGraphicsContextGL::getString):
(WebKit::RemoteGraphicsContextGL::getProgramInfoLog):
(WebKit::RemoteGraphicsContextGL::getShaderInfoLog):
(WebKit::RemoteGraphicsContextGL::getUniformLocation):
(WebKit::RemoteGraphicsContextGL::shaderSource):
(WebKit::RemoteGraphicsContextGL::getFragDataLocation):
(WebKit::RemoteGraphicsContextGL::transformFeedbackVaryings):
(WebKit::RemoteGraphicsContextGL::getTransformFeedbackVarying):
(WebKit::RemoteGraphicsContextGL::getUniformIndices):
(WebKit::RemoteGraphicsContextGL::getUniformBlockIndex):
(WebKit::RemoteGraphicsContextGL::getActiveUniformBlockName):
(WebKit::RemoteGraphicsContextGL::getTranslatedShaderSourceANGLE):
(WebKit::RemoteGraphicsContextGL::getShaderSource): Deleted.
* Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:
*
Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLInitializationState.h:
*
Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLInitializationState.serialization.in:
* Source/WebKit/Shared/WebCoreArgumentCoders.serialization.in:
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp:
(WebKit::RemoteGraphicsContextGLProxy::supportsExtension):
(WebKit::RemoteGraphicsContextGLProxy::ensureExtensionEnabled):
(WebKit::RemoteGraphicsContextGLProxy::isExtensionEnabled):
(WebKit::RemoteGraphicsContextGLProxy::initialize):
(WebKit::RemoteGraphicsContextGLProxy::addDebugMessage):
* Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
*
Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in:
*
Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:
(WebKit::RemoteGraphicsContextGLProxy::bindAttribLocation):
(WebKit::RemoteGraphicsContextGLProxy::getActiveAttrib):
(WebKit::RemoteGraphicsContextGLProxy::getActiveUniform):
(WebKit::RemoteGraphicsContextGLProxy::getAttribLocation):
(WebKit::RemoteGraphicsContextGLProxy::getString):
(WebKit::RemoteGraphicsContextGLProxy::getProgramInfoLog):
(WebKit::RemoteGraphicsContextGLProxy::getShaderInfoLog):
(WebKit::RemoteGraphicsContextGLProxy::getUniformLocation):
(WebKit::RemoteGraphicsContextGLProxy::shaderSource):
(WebKit::RemoteGraphicsContextGLProxy::getFragDataLocation):
(WebKit::RemoteGraphicsContextGLProxy::transformFeedbackVaryings):
(WebKit::RemoteGraphicsContextGLProxy::getTransformFeedbackVarying):
(WebKit::RemoteGraphicsContextGLProxy::getUniformIndices):
(WebKit::RemoteGraphicsContextGLProxy::getUniformBlockIndex):
(WebKit::RemoteGraphicsContextGLProxy::getActiveUniformBlockName):
(WebKit::RemoteGraphicsContextGLProxy::getTranslatedShaderSourceANGLE):
(WebKit::RemoteGraphicsContextGLProxy::getShaderSource): Deleted.
* Tools/Scripts/generate-gpup-webgl:
(main):
* Tools/TestWebKitAPI/Tests/WebCore/cocoa/TestGraphicsContextGLCocoa.mm:
Canonical link: https://commits.webkit.org/301310@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes