WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-217216-20201201122508.patch (text/plain), 549.54 KB, created by
Kimmo Kinnunen
on 2020-12-01 02:25:11 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Kimmo Kinnunen
Created:
2020-12-01 02:25:11 PST
Size:
549.54 KB
patch
obsolete
>Subversion Revision: 270234 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 28fee5d5771b61536ca064dd0ccd278c5dde5f88..d98c4763811fe1a43d99964c1088ffbca44fd1b1 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,190 @@ >+2020-12-01 Kimmo Kinnunen <kkinnunen@apple.com> >+ >+ Implement RemoteGraphicsContextGL >+ https://bugs.webkit.org/show_bug.cgi?id=217216 >+ <rdar://problem/69876258> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Implements a beginning of a remote version of GraphicsContextGL for GPU >+ process. Current implementation is using WebKit IPC. >+ >+ Implemented with a generator script implementing the IPC to pass the >+ GraphicsContextGL member function calls from web process to the GPU >+ process. The script is run during development time and the results are >+ committed to the repo for ease of review. >+ >+ Changes GraphicsContextGL and ExtensionsGL to not have duplicate names >+ and have the correct function signatures. >+ >+ Changes few remaining GraphicsContextGL getters to use robust GCGLSpan >+ form. >+ >+ Changes few robust getters to GCGLSpan form and moves them from >+ ExtensionsGL to GraphicsContextGL. >+ >+ Changes GraphicsContextGLOpenGL::getActiveUniforms to return the result >+ vector instead of taking it as non-const reference. This way the out >+ vector does not need to be transferred to the remote side. The call site >+ is also more natural. >+ >+ Requests GL_EXT_occlusion_query_boolean so that WebGL 2.0 occlusion >+ queries work when called with gl::GetQueryObjectuivRobustANGLE. >+ >+ Extracts an interface GraphicsContextGLIOSurfaceSwapChain which is >+ used to submit IOSurfaces from GraphicsContextGLOpenGL. For >+ web process WebGL, these go to WebGLLayer. For GPU process WebGL, >+ the IOSurfaces go to the prepareForDisplay caller, e.g. the >+ RemoteGraphicsContextGL, which then return the IOSurfaces back >+ to Web process side. RemoteGraphicsContextGLProxy will send >+ them to WebGLLayer. >+ >+ No new tests, tested by existing webgl tests once the implementation works. >+ >+ * PlatformMac.cmake: >+ * Sources.txt: >+ * SourcesCocoa.txt: >+ * WebCore.xcodeproj/project.pbxproj: >+ * html/canvas/WebGL2RenderingContext.cpp: >+ (WebCore::WebGL2RenderingContext::getBufferSubData): >+ (WebCore::WebGL2RenderingContext::vertexAttribI4uiv): >+ (WebCore::WebGL2RenderingContext::getQueryParameter): >+ (WebCore::WebGL2RenderingContext::bindSampler): >+ (WebCore::WebGL2RenderingContext::getSamplerParameter): >+ (WebCore::WebGL2RenderingContext::clientWaitSync): >+ (WebCore::WebGL2RenderingContext::deleteTransformFeedback): >+ (WebCore::WebGL2RenderingContext::beginTransformFeedback): >+ (WebCore::WebGL2RenderingContext::endTransformFeedback): >+ (WebCore::WebGL2RenderingContext::transformFeedbackVaryings): >+ (WebCore::WebGL2RenderingContext::getActiveUniforms): >+ (WebCore::WebGL2RenderingContext::readPixels): >+ * html/canvas/WebGLRenderingContextBase.cpp: >+ (WebCore::WebGLRenderingContextBase::create): >+ (WebCore::WebGLRenderingContextBase::readPixels): >+ * html/canvas/WebGLSync.cpp: >+ (WebCore::WebGLSync::updateCache): >+ * page/Chrome.cpp: >+ (WebCore::Chrome::createGraphicsContextGL const): >+ (WebCore::Chrome::windowScreenDidChange): >+ * page/Chrome.h: >+ * page/ChromeClient.h: >+ (WebCore::ChromeClient::createGraphicsContextGL const): >+ * platform/HostWindow.h: >+ * platform/RuntimeApplicationChecks.h: >+ (WebCore::isInGPUProcess): >+ * platform/cocoa/RuntimeApplicationChecksCocoa.mm: >+ (WebCore::isInGPUProcess): >+ * platform/graphics/ExtensionsGL.h: >+ * platform/graphics/GraphicsContextGL.cpp: >+ (WebCore::GraphicsContextGL::create): >+ * platform/graphics/GraphicsContextGL.h: >+ * platform/graphics/GraphicsTypesGL.h: >+ (GCGLSpan::GCGLSpan): >+ (GCGLSpan<GCGLvoid>::GCGLSpan): >+ * platform/graphics/RemoteGraphicsContextGLProxyBase.cpp: Added. >+ (WebCore::RemoteGraphicsContextGLProxyBase::RemoteGraphicsContextGLProxyBase): >+ (WebCore::RemoteGraphicsContextGLProxyBase::platformGraphicsContextGL const): >+ (WebCore::RemoteGraphicsContextGLProxyBase::platformTexture const): >+ (WebCore::RemoteGraphicsContextGLProxyBase::getExtensions): >+ (WebCore::RemoteGraphicsContextGLProxyBase::setContextVisibility): >+ (WebCore::RemoteGraphicsContextGLProxyBase::powerPreferenceUsedForCreation const): >+ (WebCore::RemoteGraphicsContextGLProxyBase::isGLES2Compliant const): >+ (WebCore::RemoteGraphicsContextGLProxyBase::markContextChanged): >+ (WebCore::RemoteGraphicsContextGLProxyBase::markLayerComposited): >+ (WebCore::RemoteGraphicsContextGLProxyBase::layerComposited const): >+ (WebCore::RemoteGraphicsContextGLProxyBase::setBuffersToAutoClear): >+ (WebCore::RemoteGraphicsContextGLProxyBase::getBuffersToAutoClear const): >+ (WebCore::RemoteGraphicsContextGLProxyBase::paintCompositedResultsToCanvas): >+ (WebCore::RemoteGraphicsContextGLProxyBase::enablePreserveDrawingBuffer): >+ (WebCore::RemoteGraphicsContextGLProxyBase::supports): >+ (WebCore::RemoteGraphicsContextGLProxyBase::ensureEnabled): >+ (WebCore::RemoteGraphicsContextGLProxyBase::isEnabled): >+ (WebCore::RemoteGraphicsContextGLProxyBase::initialize): >+ (WebCore::RemoteGraphicsContextGLProxyBase::platformInitialize): >+ (WebCore::RemoteGraphicsContextGLProxyBase::platformLayer const): >+ * platform/graphics/RemoteGraphicsContextGLProxyBase.h: Added. >+ * platform/graphics/angle/ExtensionsGLANGLE.cpp: >+ (WebCore::ExtensionsGLANGLE::ExtensionsGLANGLE): >+ (WebCore::ExtensionsGLANGLE::getGraphicsResetStatusARB): >+ (WebCore::ExtensionsGLANGLE::getTranslatedShaderSourceANGLE): >+ (WebCore::ExtensionsGLANGLE::blitFramebufferANGLE): >+ (WebCore::ExtensionsGLANGLE::renderbufferStorageMultisampleANGLE): >+ (WebCore::ExtensionsGLANGLE::drawArraysInstancedANGLE): >+ (WebCore::ExtensionsGLANGLE::drawElementsInstancedANGLE): >+ (WebCore::ExtensionsGLANGLE::vertexAttribDivisorANGLE): >+ (WebCore::ExtensionsGLANGLE::getUniformuivRobustANGLE): >+ (WebCore::ExtensionsGLANGLE::getTexLevelParameterivRobustANGLE): >+ (WebCore::ExtensionsGLANGLE::getTexLevelParameterfvRobustANGLE): >+ (WebCore::ExtensionsGLANGLE::getnUniformfvRobustANGLE): >+ (WebCore::ExtensionsGLANGLE::getnUniformivRobustANGLE): >+ (WebCore::ExtensionsGLANGLE::getnUniformuivRobustANGLE): >+ * platform/graphics/angle/ExtensionsGLANGLE.h: >+ * platform/graphics/angle/GraphicsContextGLANGLE.cpp: >+ (WebCore::GraphicsContextGLOpenGL::readnPixels): >+ (WebCore::GraphicsContextGLOpenGL::readnPixelsImpl): >+ (WebCore::GraphicsContextGLOpenGL::getBufferSubData): >+ (WebCore::GraphicsContextGLOpenGL::getActiveUniforms): >+ (WebCore::GraphicsContextGLOpenGL::getQueryObjectui): >+ (WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): >+ (WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): >+ (WebCore::GraphicsContextGLOpenGL::getSynci): >+ * platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp: Added. >+ * platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h: Copied from Source/WebCore/platform/graphics/cocoa/WebGLLayer.h. >+ * platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm: >+ (WebCore::InitializeEGLDisplay): >+ (WebCore::GraphicsContextGLOpenGL::create): >+ (WebCore::GraphicsContextGLOpenGL::createShared): >+ (WebCore::GraphicsContextGLOpenGL::createForGPUProcess): >+ (WebCore::GraphicsContextGLOpenGL::GraphicsContextGLOpenGL): >+ (WebCore::GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL): >+ (WebCore::GraphicsContextGLOpenGL::reshapeDisplayBufferBacking): >+ (WebCore::GraphicsContextGLOpenGL::allocateAndBindDisplayBufferBacking): >+ (WebCore::GraphicsContextGLOpenGL::allowOfflineRenderers const): >+ (WebCore::GraphicsContextGLOpenGL::prepareForDisplay): >+ * platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm: Added. >+ (WebCore::RemoteGraphicsContextGLProxyBase::platformInitialize): >+ (WebCore::RemoteGraphicsContextGLProxyBase::platformLayer const): >+ (WebCore::RemoteGraphicsContextGLProxyBase::asCV): >+ (WebCore::RemoteGraphicsContextGLProxyBase::platformSwapChain): >+ * platform/graphics/cocoa/WebGLLayer.h: >+ * platform/graphics/cocoa/WebGLLayer.mm: >+ (-[WebGLLayer initWithDevicePixelRatio:contentsOpaque:]): >+ (-[WebGLLayer swapChain]): >+ (-[WebGLLayer prepareForDisplay]): >+ (-[WebGLLayer display]): >+ (WebGLLayerSwapChain::present): >+ * platform/graphics/coreimage/FilterEffectRendererCoreImage.mm: >+ * platform/graphics/opengl/ExtensionsGLOpenGL.cpp: >+ (WebCore::ExtensionsGLOpenGL::blitFramebufferANGLE): >+ (WebCore::ExtensionsGLOpenGL::renderbufferStorageMultisampleANGLE): >+ (WebCore::ExtensionsGLOpenGL::drawArraysInstancedANGLE): >+ (WebCore::ExtensionsGLOpenGL::drawElementsInstancedANGLE): >+ (WebCore::ExtensionsGLOpenGL::vertexAttribDivisorANGLE): >+ * platform/graphics/opengl/ExtensionsGLOpenGL.h: >+ * platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp: >+ (WebCore::ExtensionsGLOpenGLCommon::readnPixelsRobustANGLE): >+ * platform/graphics/opengl/ExtensionsGLOpenGLCommon.h: >+ * platform/graphics/opengl/ExtensionsGLOpenGLES.cpp: >+ (WebCore::ExtensionsGLOpenGLES::blitFramebufferANGLE): >+ (WebCore::ExtensionsGLOpenGLES::renderbufferStorageMultisampleANGLE): >+ (WebCore::ExtensionsGLOpenGLES::drawArraysInstancedANGLE): >+ (WebCore::ExtensionsGLOpenGLES::drawElementsInstancedANGLE): >+ (WebCore::ExtensionsGLOpenGLES::vertexAttribDivisorANGLE): >+ * platform/graphics/opengl/ExtensionsGLOpenGLES.h: >+ * platform/graphics/opengl/GraphicsContextGLOpenGL.h: >+ * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp: >+ (WebCore::GraphicsContextGLOpenGL::drawArraysInstanced): >+ (WebCore::GraphicsContextGLOpenGL::drawElementsInstanced): >+ (WebCore::GraphicsContextGLOpenGL::vertexAttribDivisor): >+ (WebCore::GraphicsContextGLOpenGL::getBufferSubData): >+ (WebCore::GraphicsContextGLOpenGL::getQueryObjectui): >+ (WebCore::GraphicsContextGLOpenGL::getSamplerParameterf): >+ (WebCore::GraphicsContextGLOpenGL::getSamplerParameteri): >+ (WebCore::GraphicsContextGLOpenGL::getSynci): >+ (WebCore::GraphicsContextGLOpenGL::getActiveUniforms): >+ * platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp: >+ (WebCore::GraphicsContextGLOpenGL::reshapeFBOs): >+ > 2020-11-30 Kimmo Kinnunen <kkinnunen@apple.com> > > REGRESSION(r270185) [GTK] Some webgl failures after multivalue setter refactor >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index b160a2517c93481a87c62284f688d23343ac8a2f..ca815db4d25674cff8fab96a4ad54981ea2d82aa 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,752 @@ >+2020-12-01 Kimmo Kinnunen <kkinnunen@apple.com> >+ >+ Implement RemoteWebGLBackend >+ https://bugs.webkit.org/show_bug.cgi?id=217216 >+ <rdar://problem/69876258> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Implements a beginning of a remote version of GraphicsContextGL for GPU >+ process. Current implementation is using WebKit IPC. >+ >+ Implemented with a generator script implementing the IPC to pass the >+ GraphicsContextGL member function calls from web process to the GPU >+ process. The script is run during development time and the results are >+ committed to the repo for ease of review. >+ >+ Implement the RemoteGraphicsContextGL in WebKit side. This class will >+ forward calls received via IPC to the GraphicsContextGLOpenGL. At the >+ moment RemoteGraphicsContextGL instance is a direct child of >+ GPUConnectionToWebProcess. >+ >+ Changes WebKit IPC to support receiving typed arrays as references. This >+ is needed to submit GL data arrays, such as GLfloat arrays directly from >+ the IPC data store without an extra copy. >+ >+ Changes WebKit IPC to support passing data references, i.e. >+ DataReference or ArrayReference, as a synchronized call return value. >+ The caller must hold the Connection::syncSend() result (Decoder object) >+ for the duriation of using the data values. >+ >+ Compositing is implemented only for PLATFORM(COCOA). >+ >+ Missing: >+ - Simulated context loss >+ - Simulated context change >+ - Paint WebGL contents to 2D canvas >+ - Upload video to WebGL >+ - Upload canvas to WebGL >+ >+ * CMakeLists.txt: >+ * DerivedSources-input.xcfilelist: >+ * DerivedSources-output.xcfilelist: >+ * DerivedSources.make: >+ * GPUProcess/GPUConnectionToWebProcess.cpp: >+ (WebKit::GPUConnectionToWebProcess::createGraphicsContextGL): >+ (WebKit::GPUConnectionToWebProcess::releaseGraphicsContextGL): >+ * GPUProcess/GPUConnectionToWebProcess.h: >+ * GPUProcess/GPUConnectionToWebProcess.messages.in: >+ * GPUProcess/graphics/RemoteGraphicsContextGL.cpp: Added. >+ (WebKit::RemoteGraphicsContextGL::create): >+ (WebKit::RemoteGraphicsContextGL::RemoteGraphicsContextGL): >+ (WebKit::RemoteGraphicsContextGL::~RemoteGraphicsContextGL): >+ (WebKit::RemoteGraphicsContextGL::gpuConnectionToWebProcess const): >+ (WebKit::RemoteGraphicsContextGL::messageSenderConnection const): >+ (WebKit::RemoteGraphicsContextGL::messageSenderDestinationID const): >+ (WebKit::RemoteGraphicsContextGL::didComposite): >+ (WebKit::RemoteGraphicsContextGL::forceContextLost): >+ (WebKit::RemoteGraphicsContextGL::recycleContext): >+ (WebKit::RemoteGraphicsContextGL::dispatchContextChangedNotification): >+ (WebKit::RemoteGraphicsContextGL::recycleBuffer): >+ (WebKit::RemoteGraphicsContextGL::present): >+ (WebKit::RemoteGraphicsContextGL::detachClient): >+ (WebKit::RemoteGraphicsContextGL::reshape): >+ (WebKit::RemoteGraphicsContextGL::prepareForDisplay): >+ (WebKit::RemoteGraphicsContextGL::ensureExtensionEnabled): >+ (WebKit::RemoteGraphicsContextGL::notifyMarkContextChanged): >+ * GPUProcess/graphics/RemoteGraphicsContextGL.h: Added. >+ * GPUProcess/graphics/RemoteGraphicsContextGL.messages.in: Added. >+ * GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h: Added. >+ (setFailNextGPUStatusCheck): >+ (synthesizeGLError): >+ (moveErrorsToSyntheticErrorList): >+ (activeTexture): >+ (attachShader): >+ (bindAttribLocation): >+ (bindBuffer): >+ (bindFramebuffer): >+ (bindRenderbuffer): >+ (bindTexture): >+ (blendColor): >+ (blendEquation): >+ (blendEquationSeparate): >+ (blendFunc): >+ (blendFuncSeparate): >+ (checkFramebufferStatus): >+ (clear): >+ (clearColor): >+ (clearDepth): >+ (clearStencil): >+ (colorMask): >+ (compileShader): >+ (copyTexImage2D): >+ (copyTexSubImage2D): >+ (createBuffer): >+ (createFramebuffer): >+ (createProgram): >+ (createRenderbuffer): >+ (createShader): >+ (createTexture): >+ (cullFace): >+ (deleteBuffer): >+ (deleteFramebuffer): >+ (deleteProgram): >+ (deleteRenderbuffer): >+ (deleteShader): >+ (deleteTexture): >+ (depthFunc): >+ (depthMask): >+ (depthRange): >+ (detachShader): >+ (disable): >+ (disableVertexAttribArray): >+ (drawArrays): >+ (drawElements): >+ (enable): >+ (enableVertexAttribArray): >+ (finish): >+ (flush): >+ (framebufferRenderbuffer): >+ (framebufferTexture2D): >+ (frontFace): >+ (generateMipmap): >+ (getActiveAttrib): >+ (getActiveUniform): >+ (getAttribLocation): >+ (getBufferParameteri): >+ (getString): >+ (getFloatv): >+ (getIntegerv): >+ (getInteger64): >+ (getInteger64i): >+ (getProgrami): >+ (getBooleanv): >+ (getError): >+ (getFramebufferAttachmentParameteri): >+ (getProgramInfoLog): >+ (getRenderbufferParameteri): >+ (getShaderi): >+ (getShaderInfoLog): >+ (getShaderPrecisionFormat): >+ (getShaderSource): >+ (getTexParameterf): >+ (getTexParameteri): >+ (getUniformfv): >+ (getUniformiv): >+ (getUniformuiv): >+ (getUniformLocation): >+ (getVertexAttribOffset): >+ (hint): >+ (isBuffer): >+ (isEnabled): >+ (isFramebuffer): >+ (isProgram): >+ (isRenderbuffer): >+ (isShader): >+ (isTexture): >+ (lineWidth): >+ (linkProgram): >+ (pixelStorei): >+ (polygonOffset): >+ (renderbufferStorage): >+ (sampleCoverage): >+ (scissor): >+ (shaderSource): >+ (stencilFunc): >+ (stencilFuncSeparate): >+ (stencilMask): >+ (stencilMaskSeparate): >+ (stencilOp): >+ (stencilOpSeparate): >+ (texParameterf): >+ (texParameteri): >+ (uniform1f): >+ (uniform1fv): >+ (uniform1i): >+ (uniform1iv): >+ (uniform2f): >+ (uniform2fv): >+ (uniform2i): >+ (uniform2iv): >+ (uniform3f): >+ (uniform3fv): >+ (uniform3i): >+ (uniform3iv): >+ (uniform4f): >+ (uniform4fv): >+ (uniform4i): >+ (uniform4iv): >+ (uniformMatrix2fv): >+ (uniformMatrix3fv): >+ (uniformMatrix4fv): >+ (useProgram): >+ (validateProgram): >+ (vertexAttrib1f): >+ (vertexAttrib1fv): >+ (vertexAttrib2f): >+ (vertexAttrib2fv): >+ (vertexAttrib3f): >+ (vertexAttrib3fv): >+ (vertexAttrib4f): >+ (vertexAttrib4fv): >+ (vertexAttribPointer): >+ (viewport): >+ (bufferData0): >+ (bufferData1): >+ (bufferSubData): >+ (readnPixels0): >+ (readnPixels1): >+ (texImage2D0): >+ (texImage2D1): >+ (texSubImage2D0): >+ (texSubImage2D1): >+ (compressedTexImage2D0): >+ (compressedTexImage2D1): >+ (compressedTexSubImage2D0): >+ (compressedTexSubImage2D1): >+ (drawArraysInstanced): >+ (drawElementsInstanced): >+ (vertexAttribDivisor): >+ (createVertexArray): >+ (deleteVertexArray): >+ (isVertexArray): >+ (bindVertexArray): >+ (copyBufferSubData): >+ (getBufferSubData): >+ (blitFramebuffer): >+ (framebufferTextureLayer): >+ (invalidateFramebuffer): >+ (invalidateSubFramebuffer): >+ (readBuffer): >+ (renderbufferStorageMultisample): >+ (texStorage2D): >+ (texStorage3D): >+ (texImage3D0): >+ (texImage3D1): >+ (texSubImage3D0): >+ (texSubImage3D1): >+ (copyTexSubImage3D): >+ (compressedTexImage3D0): >+ (compressedTexImage3D1): >+ (compressedTexSubImage3D0): >+ (compressedTexSubImage3D1): >+ (getFragDataLocation): >+ (uniform1ui): >+ (uniform2ui): >+ (uniform3ui): >+ (uniform4ui): >+ (uniform1uiv): >+ (uniform2uiv): >+ (uniform3uiv): >+ (uniform4uiv): >+ (uniformMatrix2x3fv): >+ (uniformMatrix3x2fv): >+ (uniformMatrix2x4fv): >+ (uniformMatrix4x2fv): >+ (uniformMatrix3x4fv): >+ (uniformMatrix4x3fv): >+ (vertexAttribI4i): >+ (vertexAttribI4iv): >+ (vertexAttribI4ui): >+ (vertexAttribI4uiv): >+ (vertexAttribIPointer): >+ (drawRangeElements): >+ (drawBuffers): >+ (clearBufferiv): >+ (clearBufferuiv): >+ (clearBufferfv): >+ (clearBufferfi): >+ (createQuery): >+ (deleteQuery): >+ (isQuery): >+ (beginQuery): >+ (endQuery): >+ (getQuery): >+ (getQueryObjectui): >+ (createSampler): >+ (deleteSampler): >+ (isSampler): >+ (bindSampler): >+ (samplerParameteri): >+ (samplerParameterf): >+ (getSamplerParameterf): >+ (getSamplerParameteri): >+ (fenceSync): >+ (isSync): >+ (deleteSync): >+ (clientWaitSync): >+ (waitSync): >+ (getSynci): >+ (createTransformFeedback): >+ (deleteTransformFeedback): >+ (isTransformFeedback): >+ (bindTransformFeedback): >+ (beginTransformFeedback): >+ (endTransformFeedback): >+ (transformFeedbackVaryings): >+ (getTransformFeedbackVarying): >+ (pauseTransformFeedback): >+ (resumeTransformFeedback): >+ (bindBufferBase): >+ (bindBufferRange): >+ (getUniformIndices): >+ (getActiveUniforms): >+ (getUniformBlockIndex): >+ (getActiveUniformBlockName): >+ (uniformBlockBinding): >+ (getActiveUniformBlockiv): >+ (getGraphicsResetStatusARB): >+ (blitFramebufferANGLE): >+ (renderbufferStorageMultisampleANGLE): >+ (createVertexArrayOES): >+ (deleteVertexArrayOES): >+ (isVertexArrayOES): >+ (bindVertexArrayOES): >+ (getTranslatedShaderSourceANGLE): >+ (insertEventMarkerEXT): >+ (pushGroupMarkerEXT): >+ (popGroupMarkerEXT): >+ (drawBuffersEXT): >+ (drawArraysInstancedANGLE): >+ (drawElementsInstancedANGLE): >+ (vertexAttribDivisorANGLE): >+ * GPUProcess/mac/GPUProcessMac.mm: >+ (WebKit::GPUProcess::initializeProcess): >+ * GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in: >+ * GPUProcess/media/RemoteLegacyCDMProxy.h: >+ * GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp: >+ * GPUProcess/media/RemoteMediaResourceManager.cpp: >+ * GPUProcess/media/RemoteMediaResourceManager.h: >+ * GPUProcess/media/RemoteMediaSourceProxy.h: >+ * GPUProcess/media/RemoteSourceBufferProxy.cpp: >+ * GPUProcess/media/RemoteSourceBufferProxy.h: >+ * GPUProcess/webrtc/LibWebRTCCodecsProxy.h: >+ * GPUProcess/webrtc/LibWebRTCCodecsProxy.mm: >+ * GPUProcess/webrtc/RemoteMediaRecorder.h: >+ * NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm: >+ * NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h: >+ * NetworkProcess/Downloads/Download.cpp: >+ * NetworkProcess/Downloads/Download.h: >+ * NetworkProcess/Downloads/DownloadManager.cpp: >+ * NetworkProcess/Downloads/DownloadManager.h: >+ * NetworkProcess/NetworkSocketChannel.cpp: >+ * NetworkProcess/NetworkSocketChannel.h: >+ * NetworkProcess/NetworkSocketStream.cpp: >+ * NetworkProcess/NetworkSocketStream.h: >+ * NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h: >+ * NetworkProcess/WebSocketTask.h: >+ * NetworkProcess/cocoa/WebSocketTaskCocoa.h: >+ * NetworkProcess/cocoa/WebSocketTaskCocoa.mm: >+ * NetworkProcess/soup/WebSocketTaskSoup.cpp: >+ * NetworkProcess/soup/WebSocketTaskSoup.h: >+ * Platform/IPC/ArgumentCoders.h: >+ * Platform/IPC/ArrayReference.h: Copied from Source/WebKit/Platform/IPC/DataReference.h. >+ (IPC::ArrayReference::ArrayReference): >+ (IPC::ArrayReference::isEmpty const): >+ (IPC::ArrayReference::size const): >+ (IPC::ArrayReference::data const): >+ (IPC::ArrayReference::vector const): >+ * Platform/IPC/Connection.h: >+ (IPC::Connection::sendSync): >+ * Platform/IPC/DataReference.h: >+ * Platform/IPC/Decoder.cpp: >+ (IPC::Decoder::decodeFixedLengthReference): >+ * Platform/IPC/Decoder.h: >+ * Platform/IPC/Encoder.cpp: >+ (IPC::Encoder::wrapForTesting): >+ * Platform/IPC/Encoder.h: >+ * Platform/IPC/HandleMessage.h: >+ * Platform/IPC/MessageSender.h: >+ (IPC::MessageSender::sendSync): >+ * Platform/IPC/SharedBufferCopy.cpp: >+ (IPC::SharedBufferCopy::decode): >+ * Platform/IPC/SharedBufferDataReference.cpp: >+ * Platform/IPC/StringReference.cpp: >+ * PluginProcess/PluginControllerProxy.cpp: >+ * PluginProcess/PluginControllerProxy.h: >+ * Scripts/webkit/messages.py: >+ * Shared/API/APIData.cpp: >+ * Shared/AuxiliaryProcess.h: >+ * Shared/WebCoreArgumentCoders.cpp: >+ (IPC::ArgumentCoder<WebCore::GraphicsContextGLAttributes>::encode): >+ (IPC::ArgumentCoder<WebCore::GraphicsContextGLAttributes>::decode): >+ (IPC::ArgumentCoder<WebCore::GraphicsContextGL::ActiveInfo>::encode): >+ (IPC::ArgumentCoder<WebCore::GraphicsContextGL::ActiveInfo>::decode): >+ * Shared/WebCoreArgumentCoders.h: >+ * Shared/WebPageCreationParameters.cpp: >+ (WebKit::WebPageCreationParameters::encode const): >+ (WebKit::WebPageCreationParameters::decode): >+ * Shared/WebPageCreationParameters.h: >+ * Shared/cf/ArgumentCodersCF.cpp: >+ * Shared/soup/WebCoreArgumentCodersSoup.cpp: >+ (IPC::ArgumentCoder<CertificateInfo>::encode): >+ (IPC::ArgumentCoder<CertificateInfo>::decode): >+ * Sources.txt: >+ * SourcesCocoa.txt: >+ * UIProcess/API/APIIconLoadingClient.h: >+ * UIProcess/AuxiliaryProcessProxy.h: >+ (WebKit::AuxiliaryProcessProxy::sendSync): >+ * UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h: >+ * UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h: >+ * UIProcess/PageClient.h: >+ * UIProcess/UserContent/WebUserContentControllerProxy.cpp: >+ * UIProcess/UserContent/WebUserContentControllerProxy.h: >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::creationParameters): >+ * UIProcess/WebPageProxy.h: >+ * UIProcess/WebURLSchemeHandler.h: >+ * UIProcess/WebURLSchemeTask.h: >+ * WebKit.xcodeproj/project.pbxproj: >+ * WebProcess/ApplePay/WebPaymentCoordinator.h: >+ * WebProcess/GPU/GPUProcessConnection.h: >+ * WebProcess/GPU/graphics/GraphicsContextGLIdentifier.h: Renamed from Source/WebKit/Platform/IPC/DataReference.cpp. >+ * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp: Added. >+ (WebKit::RemoteGraphicsContextGLProxy::create): >+ (WebKit::RemoteGraphicsContextGLProxy::RemoteGraphicsContextGLProxy): >+ (WebKit::RemoteGraphicsContextGLProxy::~RemoteGraphicsContextGLProxy): >+ (WebKit::RemoteGraphicsContextGLProxy::messageSenderConnection const): >+ (WebKit::RemoteGraphicsContextGLProxy::messageSenderDestinationID const): >+ (WebKit::RemoteGraphicsContextGLProxy::reshape): >+ (WebKit::RemoteGraphicsContextGLProxy::prepareForDisplay): >+ (WebKit::RemoteGraphicsContextGLProxy::ensureExtensionEnabled): >+ (WebKit::RemoteGraphicsContextGLProxy::notifyMarkContextChanged): >+ (WebKit::RemoteGraphicsContextGLProxy::simulateContextChanged): >+ (WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToCanvas): >+ (WebKit::RemoteGraphicsContextGLProxy::paintRenderingResultsToImageData): >+ (WebKit::RemoteGraphicsContextGLProxy::wasCreated): >+ (WebKit::RemoteGraphicsContextGLProxy::wasLost): >+ (WebKit::RemoteGraphicsContextGLProxy::wasChanged): >+ (WebKit::RemoteGraphicsContextGLProxy::waitUntilInitialized): >+ * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h: Added. >+ * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in: Copied from Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in. >+ * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp: Added. >+ (WebKit::RemoteGraphicsContextGLProxy::setFailNextGPUStatusCheck): >+ (WebKit::RemoteGraphicsContextGLProxy::synthesizeGLError): >+ (WebKit::RemoteGraphicsContextGLProxy::moveErrorsToSyntheticErrorList): >+ (WebKit::RemoteGraphicsContextGLProxy::activeTexture): >+ (WebKit::RemoteGraphicsContextGLProxy::attachShader): >+ (WebKit::RemoteGraphicsContextGLProxy::bindAttribLocation): >+ (WebKit::RemoteGraphicsContextGLProxy::bindBuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::bindFramebuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::bindRenderbuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::bindTexture): >+ (WebKit::RemoteGraphicsContextGLProxy::blendColor): >+ (WebKit::RemoteGraphicsContextGLProxy::blendEquation): >+ (WebKit::RemoteGraphicsContextGLProxy::blendEquationSeparate): >+ (WebKit::RemoteGraphicsContextGLProxy::blendFunc): >+ (WebKit::RemoteGraphicsContextGLProxy::blendFuncSeparate): >+ (WebKit::RemoteGraphicsContextGLProxy::checkFramebufferStatus): >+ (WebKit::RemoteGraphicsContextGLProxy::clear): >+ (WebKit::RemoteGraphicsContextGLProxy::clearColor): >+ (WebKit::RemoteGraphicsContextGLProxy::clearDepth): >+ (WebKit::RemoteGraphicsContextGLProxy::clearStencil): >+ (WebKit::RemoteGraphicsContextGLProxy::colorMask): >+ (WebKit::RemoteGraphicsContextGLProxy::compileShader): >+ (WebKit::RemoteGraphicsContextGLProxy::copyTexImage2D): >+ (WebKit::RemoteGraphicsContextGLProxy::copyTexSubImage2D): >+ (WebKit::RemoteGraphicsContextGLProxy::createBuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::createFramebuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::createProgram): >+ (WebKit::RemoteGraphicsContextGLProxy::createRenderbuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::createShader): >+ (WebKit::RemoteGraphicsContextGLProxy::createTexture): >+ (WebKit::RemoteGraphicsContextGLProxy::cullFace): >+ (WebKit::RemoteGraphicsContextGLProxy::deleteBuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::deleteFramebuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::deleteProgram): >+ (WebKit::RemoteGraphicsContextGLProxy::deleteRenderbuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::deleteShader): >+ (WebKit::RemoteGraphicsContextGLProxy::deleteTexture): >+ (WebKit::RemoteGraphicsContextGLProxy::depthFunc): >+ (WebKit::RemoteGraphicsContextGLProxy::depthMask): >+ (WebKit::RemoteGraphicsContextGLProxy::depthRange): >+ (WebKit::RemoteGraphicsContextGLProxy::detachShader): >+ (WebKit::RemoteGraphicsContextGLProxy::disable): >+ (WebKit::RemoteGraphicsContextGLProxy::disableVertexAttribArray): >+ (WebKit::RemoteGraphicsContextGLProxy::drawArrays): >+ (WebKit::RemoteGraphicsContextGLProxy::drawElements): >+ (WebKit::RemoteGraphicsContextGLProxy::enable): >+ (WebKit::RemoteGraphicsContextGLProxy::enableVertexAttribArray): >+ (WebKit::RemoteGraphicsContextGLProxy::finish): >+ (WebKit::RemoteGraphicsContextGLProxy::flush): >+ (WebKit::RemoteGraphicsContextGLProxy::framebufferRenderbuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::framebufferTexture2D): >+ (WebKit::RemoteGraphicsContextGLProxy::frontFace): >+ (WebKit::RemoteGraphicsContextGLProxy::generateMipmap): >+ (WebKit::RemoteGraphicsContextGLProxy::getActiveAttrib): >+ (WebKit::RemoteGraphicsContextGLProxy::getActiveUniform): >+ (WebKit::RemoteGraphicsContextGLProxy::getAttribLocation): >+ (WebKit::RemoteGraphicsContextGLProxy::getBufferParameteri): >+ (WebKit::RemoteGraphicsContextGLProxy::getString): >+ (WebKit::RemoteGraphicsContextGLProxy::getFloatv): >+ (WebKit::RemoteGraphicsContextGLProxy::getIntegerv): >+ (WebKit::RemoteGraphicsContextGLProxy::getInteger64): >+ (WebKit::RemoteGraphicsContextGLProxy::getInteger64i): >+ (WebKit::RemoteGraphicsContextGLProxy::getProgrami): >+ (WebKit::RemoteGraphicsContextGLProxy::getBooleanv): >+ (WebKit::RemoteGraphicsContextGLProxy::getError): >+ (WebKit::RemoteGraphicsContextGLProxy::getFramebufferAttachmentParameteri): >+ (WebKit::RemoteGraphicsContextGLProxy::getProgramInfoLog): >+ (WebKit::RemoteGraphicsContextGLProxy::getRenderbufferParameteri): >+ (WebKit::RemoteGraphicsContextGLProxy::getShaderi): >+ (WebKit::RemoteGraphicsContextGLProxy::getShaderInfoLog): >+ (WebKit::RemoteGraphicsContextGLProxy::getShaderPrecisionFormat): >+ (WebKit::RemoteGraphicsContextGLProxy::getShaderSource): >+ (WebKit::RemoteGraphicsContextGLProxy::getTexParameterf): >+ (WebKit::RemoteGraphicsContextGLProxy::getTexParameteri): >+ (WebKit::RemoteGraphicsContextGLProxy::getUniformfv): >+ (WebKit::RemoteGraphicsContextGLProxy::getUniformiv): >+ (WebKit::RemoteGraphicsContextGLProxy::getUniformuiv): >+ (WebKit::RemoteGraphicsContextGLProxy::getUniformLocation): >+ (WebKit::RemoteGraphicsContextGLProxy::getVertexAttribOffset): >+ (WebKit::RemoteGraphicsContextGLProxy::hint): >+ (WebKit::RemoteGraphicsContextGLProxy::isBuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::isEnabled): >+ (WebKit::RemoteGraphicsContextGLProxy::isFramebuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::isProgram): >+ (WebKit::RemoteGraphicsContextGLProxy::isRenderbuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::isShader): >+ (WebKit::RemoteGraphicsContextGLProxy::isTexture): >+ (WebKit::RemoteGraphicsContextGLProxy::lineWidth): >+ (WebKit::RemoteGraphicsContextGLProxy::linkProgram): >+ (WebKit::RemoteGraphicsContextGLProxy::pixelStorei): >+ (WebKit::RemoteGraphicsContextGLProxy::polygonOffset): >+ (WebKit::RemoteGraphicsContextGLProxy::renderbufferStorage): >+ (WebKit::RemoteGraphicsContextGLProxy::sampleCoverage): >+ (WebKit::RemoteGraphicsContextGLProxy::scissor): >+ (WebKit::RemoteGraphicsContextGLProxy::shaderSource): >+ (WebKit::RemoteGraphicsContextGLProxy::stencilFunc): >+ (WebKit::RemoteGraphicsContextGLProxy::stencilFuncSeparate): >+ (WebKit::RemoteGraphicsContextGLProxy::stencilMask): >+ (WebKit::RemoteGraphicsContextGLProxy::stencilMaskSeparate): >+ (WebKit::RemoteGraphicsContextGLProxy::stencilOp): >+ (WebKit::RemoteGraphicsContextGLProxy::stencilOpSeparate): >+ (WebKit::RemoteGraphicsContextGLProxy::texParameterf): >+ (WebKit::RemoteGraphicsContextGLProxy::texParameteri): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform1f): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform1fv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform1i): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform1iv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform2f): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform2fv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform2i): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform2iv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform3f): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform3fv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform3i): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform3iv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform4f): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform4fv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform4i): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform4iv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix2fv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix3fv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix4fv): >+ (WebKit::RemoteGraphicsContextGLProxy::useProgram): >+ (WebKit::RemoteGraphicsContextGLProxy::validateProgram): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib1f): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib1fv): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib2f): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib2fv): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib3f): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib3fv): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib4f): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttrib4fv): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttribPointer): >+ (WebKit::RemoteGraphicsContextGLProxy::viewport): >+ (WebKit::RemoteGraphicsContextGLProxy::bufferData): >+ (WebKit::RemoteGraphicsContextGLProxy::bufferSubData): >+ (WebKit::RemoteGraphicsContextGLProxy::readnPixels): >+ (WebKit::RemoteGraphicsContextGLProxy::texImage2D): >+ (WebKit::RemoteGraphicsContextGLProxy::texSubImage2D): >+ (WebKit::RemoteGraphicsContextGLProxy::compressedTexImage2D): >+ (WebKit::RemoteGraphicsContextGLProxy::compressedTexSubImage2D): >+ (WebKit::RemoteGraphicsContextGLProxy::drawArraysInstanced): >+ (WebKit::RemoteGraphicsContextGLProxy::drawElementsInstanced): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttribDivisor): >+ (WebKit::RemoteGraphicsContextGLProxy::createVertexArray): >+ (WebKit::RemoteGraphicsContextGLProxy::deleteVertexArray): >+ (WebKit::RemoteGraphicsContextGLProxy::isVertexArray): >+ (WebKit::RemoteGraphicsContextGLProxy::bindVertexArray): >+ (WebKit::RemoteGraphicsContextGLProxy::copyBufferSubData): >+ (WebKit::RemoteGraphicsContextGLProxy::getBufferSubData): >+ (WebKit::RemoteGraphicsContextGLProxy::blitFramebuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::framebufferTextureLayer): >+ (WebKit::RemoteGraphicsContextGLProxy::invalidateFramebuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::invalidateSubFramebuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::readBuffer): >+ (WebKit::RemoteGraphicsContextGLProxy::renderbufferStorageMultisample): >+ (WebKit::RemoteGraphicsContextGLProxy::texStorage2D): >+ (WebKit::RemoteGraphicsContextGLProxy::texStorage3D): >+ (WebKit::RemoteGraphicsContextGLProxy::texImage3D): >+ (WebKit::RemoteGraphicsContextGLProxy::texSubImage3D): >+ (WebKit::RemoteGraphicsContextGLProxy::copyTexSubImage3D): >+ (WebKit::RemoteGraphicsContextGLProxy::compressedTexImage3D): >+ (WebKit::RemoteGraphicsContextGLProxy::compressedTexSubImage3D): >+ (WebKit::RemoteGraphicsContextGLProxy::getFragDataLocation): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform1ui): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform2ui): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform3ui): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform4ui): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform1uiv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform2uiv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform3uiv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniform4uiv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix2x3fv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix3x2fv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix2x4fv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix4x2fv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix3x4fv): >+ (WebKit::RemoteGraphicsContextGLProxy::uniformMatrix4x3fv): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4i): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4iv): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4ui): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttribI4uiv): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttribIPointer): >+ (WebKit::RemoteGraphicsContextGLProxy::drawRangeElements): >+ (WebKit::RemoteGraphicsContextGLProxy::drawBuffers): >+ (WebKit::RemoteGraphicsContextGLProxy::clearBufferiv): >+ (WebKit::RemoteGraphicsContextGLProxy::clearBufferuiv): >+ (WebKit::RemoteGraphicsContextGLProxy::clearBufferfv): >+ (WebKit::RemoteGraphicsContextGLProxy::clearBufferfi): >+ (WebKit::RemoteGraphicsContextGLProxy::createQuery): >+ (WebKit::RemoteGraphicsContextGLProxy::deleteQuery): >+ (WebKit::RemoteGraphicsContextGLProxy::isQuery): >+ (WebKit::RemoteGraphicsContextGLProxy::beginQuery): >+ (WebKit::RemoteGraphicsContextGLProxy::endQuery): >+ (WebKit::RemoteGraphicsContextGLProxy::getQuery): >+ (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectui): >+ (WebKit::RemoteGraphicsContextGLProxy::createSampler): >+ (WebKit::RemoteGraphicsContextGLProxy::deleteSampler): >+ (WebKit::RemoteGraphicsContextGLProxy::isSampler): >+ (WebKit::RemoteGraphicsContextGLProxy::bindSampler): >+ (WebKit::RemoteGraphicsContextGLProxy::samplerParameteri): >+ (WebKit::RemoteGraphicsContextGLProxy::samplerParameterf): >+ (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterf): >+ (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameteri): >+ (WebKit::RemoteGraphicsContextGLProxy::fenceSync): >+ (WebKit::RemoteGraphicsContextGLProxy::isSync): >+ (WebKit::RemoteGraphicsContextGLProxy::deleteSync): >+ (WebKit::RemoteGraphicsContextGLProxy::clientWaitSync): >+ (WebKit::RemoteGraphicsContextGLProxy::waitSync): >+ (WebKit::RemoteGraphicsContextGLProxy::getSynci): >+ (WebKit::RemoteGraphicsContextGLProxy::createTransformFeedback): >+ (WebKit::RemoteGraphicsContextGLProxy::deleteTransformFeedback): >+ (WebKit::RemoteGraphicsContextGLProxy::isTransformFeedback): >+ (WebKit::RemoteGraphicsContextGLProxy::bindTransformFeedback): >+ (WebKit::RemoteGraphicsContextGLProxy::beginTransformFeedback): >+ (WebKit::RemoteGraphicsContextGLProxy::endTransformFeedback): >+ (WebKit::RemoteGraphicsContextGLProxy::transformFeedbackVaryings): >+ (WebKit::RemoteGraphicsContextGLProxy::getTransformFeedbackVarying): >+ (WebKit::RemoteGraphicsContextGLProxy::pauseTransformFeedback): >+ (WebKit::RemoteGraphicsContextGLProxy::resumeTransformFeedback): >+ (WebKit::RemoteGraphicsContextGLProxy::bindBufferBase): >+ (WebKit::RemoteGraphicsContextGLProxy::bindBufferRange): >+ (WebKit::RemoteGraphicsContextGLProxy::getUniformIndices): >+ (WebKit::RemoteGraphicsContextGLProxy::getActiveUniforms): >+ (WebKit::RemoteGraphicsContextGLProxy::getUniformBlockIndex): >+ (WebKit::RemoteGraphicsContextGLProxy::getActiveUniformBlockName): >+ (WebKit::RemoteGraphicsContextGLProxy::uniformBlockBinding): >+ (WebKit::RemoteGraphicsContextGLProxy::getActiveUniformBlockiv): >+ (WebKit::RemoteGraphicsContextGLProxy::getGraphicsResetStatusARB): >+ (WebKit::RemoteGraphicsContextGLProxy::blitFramebufferANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::renderbufferStorageMultisampleANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::createVertexArrayOES): >+ (WebKit::RemoteGraphicsContextGLProxy::deleteVertexArrayOES): >+ (WebKit::RemoteGraphicsContextGLProxy::isVertexArrayOES): >+ (WebKit::RemoteGraphicsContextGLProxy::bindVertexArrayOES): >+ (WebKit::RemoteGraphicsContextGLProxy::getTranslatedShaderSourceANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::insertEventMarkerEXT): >+ (WebKit::RemoteGraphicsContextGLProxy::pushGroupMarkerEXT): >+ (WebKit::RemoteGraphicsContextGLProxy::popGroupMarkerEXT): >+ (WebKit::RemoteGraphicsContextGLProxy::drawBuffersEXT): >+ (WebKit::RemoteGraphicsContextGLProxy::drawArraysInstancedANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::drawElementsInstancedANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::vertexAttribDivisorANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getInternalformativ): >+ (WebKit::RemoteGraphicsContextGLProxy::readPixelsRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::texParameterfvRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::texParameterivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getQueryivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectuivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getBufferPointervRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getInternalformativRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getVertexAttribIivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getVertexAttribIuivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getUniformuivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getBufferParameteri64vRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::samplerParameterivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::samplerParameterfvRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterfvRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getFramebufferParameterivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getProgramInterfaceivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getBooleani_vRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getMultisamplefvRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getTexLevelParameterivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getTexLevelParameterfvRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getPointervRobustANGLERobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getnUniformfvRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getnUniformivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getnUniformuivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::texParameterIivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::texParameterIuivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getTexParameterIivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getTexParameterIuivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::samplerParameterIivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::samplerParameterIuivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterIivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getSamplerParameterIuivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectivRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getQueryObjecti64vRobustANGLE): >+ (WebKit::RemoteGraphicsContextGLProxy::getQueryObjectui64vRobustANGLE): >+ * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp: >+ (WebKit::MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture): >+ * WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp: >+ (WebKit::RemoteAudioDestinationProxy::connectToGPUProcess): >+ * WebProcess/GPU/media/RemoteAudioSession.cpp: >+ * WebProcess/GPU/media/RemoteAudioSourceProviderManager.cpp: >+ * WebProcess/GPU/media/RemoteAudioSourceProviderManager.h: >+ * WebProcess/GPU/media/RemoteLegacyCDMSession.cpp: >+ * WebProcess/GPU/media/SourceBufferPrivateRemote.h: >+ * WebProcess/GPU/media/TextTrackPrivateRemote.h: >+ * WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp: >+ * WebProcess/GPU/webrtc/LibWebRTCCodecs.h: >+ * WebProcess/InjectedBundle/InjectedBundle.h: >+ * WebProcess/Network/NetworkProcessConnection.h: >+ * WebProcess/Network/WebResourceLoader.cpp: >+ * WebProcess/Network/WebResourceLoader.h: >+ * WebProcess/Network/WebSocketChannel.cpp: >+ * WebProcess/Network/WebSocketChannel.h: >+ * WebProcess/Network/WebSocketStream.cpp: >+ * WebProcess/Network/WebSocketStream.h: >+ * WebProcess/Network/webrtc/LibWebRTCSocket.h: >+ * WebProcess/Plugins/PDF/PDFPlugin.h: >+ * WebProcess/WebCoreSupport/WebChromeClient.cpp: >+ (WebKit::WebChromeClient::createGraphicsContextGL const): >+ * WebProcess/WebCoreSupport/WebChromeClient.h: >+ * WebProcess/WebPage/WebPage.cpp: >+ (WebKit::m_limitsNavigationsToAppBoundDomains): >+ (WebKit::WebPage::updatePreferences): >+ * WebProcess/WebPage/WebPage.h: >+ (WebKit::WebPage::sendSyncWithDelayedReply): >+ * WebProcess/WebPage/ios/WebPageIOS.mm: >+ (WebKit::WebPage::handleEditingKeyboardEvent): >+ * WebProcess/WebProcess.cpp: >+ (WebKit::WebProcess::setUseGPUProcessForWebGL): >+ (WebKit::WebProcess::shouldUseRemoteRenderingForWebGL const): >+ * WebProcess/WebProcess.h: >+ > 2020-11-29 Adam Mazander <mazander@apple.com> > > Deny logs for benign fontservicesd daemon >diff --git a/Source/WebCore/PlatformMac.cmake b/Source/WebCore/PlatformMac.cmake >index cfeb038aed8eae51713b8670517b56adc0c3b82e..ce6f13b88bd4077a0c54b3158972513266ddc93e 100644 >--- a/Source/WebCore/PlatformMac.cmake >+++ b/Source/WebCore/PlatformMac.cmake >@@ -311,10 +311,11 @@ list(APPEND WebCore_SOURCES > platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp > platform/graphics/cocoa/FontPlatformDataCocoa.mm > platform/graphics/cocoa/GraphicsContextCocoa.mm >+ platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp > platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm >+ platform/graphics/cocoa/IntRectCocoa.mm > platform/graphics/cocoa/IOSurface.mm > platform/graphics/cocoa/IOSurfacePoolCocoa.mm >- platform/graphics/cocoa/IntRectCocoa.mm > platform/graphics/cocoa/WebActionDisablingCALayerDelegate.mm > platform/graphics/cocoa/WebCoreCALayerExtras.mm > platform/graphics/cocoa/WebCoreDecompressionSession.mm >diff --git a/Source/WebCore/Sources.txt b/Source/WebCore/Sources.txt >index 4202620eb1f0e1417ccce99e582001a89a73a76e..6e97f6dbfb66522679469dccf4144bdf9210a444 100644 >--- a/Source/WebCore/Sources.txt >+++ b/Source/WebCore/Sources.txt >@@ -1970,6 +1970,7 @@ platform/graphics/PathUtilities.cpp > platform/graphics/Pattern.cpp > platform/graphics/PlatformTimeRanges.cpp > platform/graphics/Region.cpp >+platform/graphics/RemoteGraphicsContextGLProxyBase.cpp > platform/graphics/RemoteVideoSample.cpp > platform/graphics/RoundedRect.cpp > platform/graphics/ShadowBlur.cpp >diff --git a/Source/WebCore/SourcesCocoa.txt b/Source/WebCore/SourcesCocoa.txt >index 668752c79526bc6cd143c2ef6596f14c7b0733ed..bb4bad87dfcae40b7fe4d00b0fce241effb9d58d 100644 >--- a/Source/WebCore/SourcesCocoa.txt >+++ b/Source/WebCore/SourcesCocoa.txt >@@ -357,12 +357,14 @@ platform/graphics/cocoa/FontDescriptionCocoa.cpp > platform/graphics/cocoa/FontFamilySpecificationCoreText.cpp > platform/graphics/cocoa/FontPlatformDataCocoa.mm > platform/graphics/cocoa/GraphicsContextCocoa.mm >+platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp > platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm > platform/graphics/cocoa/HEVCUtilitiesCocoa.mm > platform/graphics/cocoa/IOSurface.mm > platform/graphics/cocoa/IOSurfacePoolCocoa.mm > platform/graphics/cocoa/IntRectCocoa.mm > platform/graphics/cocoa/MediaEngineConfigurationFactoryCocoa.cpp >+platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm > platform/graphics/cocoa/SourceBufferParser.cpp > platform/graphics/cocoa/SourceBufferParserWebM.cpp > platform/graphics/cocoa/SystemFontDatabaseCoreText.cpp >diff --git a/Source/WebCore/WebCore.xcodeproj/project.pbxproj b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >index 384539c4d4813e5e6887241811bb54970041b815..578ff3bd8a961198589fb583a47bd3a5bd7b32e5 100644 >--- a/Source/WebCore/WebCore.xcodeproj/project.pbxproj >+++ b/Source/WebCore/WebCore.xcodeproj/project.pbxproj >@@ -2052,7 +2052,7 @@ > 6E47E66110B7944B00B186C8 /* WebGLAny.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E47E65F10B7944B00B186C8 /* WebGLAny.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 6E4ABCD5138EA0B70071D291 /* JSHTMLUnknownElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E4ABCD3138EA0B70071D291 /* JSHTMLUnknownElement.h */; }; > 6E4E91AF10F7FB3100A2779C /* WebGLContextAttributes.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E4E91AA10F7FB3100A2779C /* WebGLContextAttributes.h */; settings = {ATTRIBUTES = (Private, ); }; }; >- 6E67D2A91280E8BD008758F7 /* ExtensionsGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E67D2A81280E8BD008758F7 /* ExtensionsGL.h */; }; >+ 6E67D2A91280E8BD008758F7 /* ExtensionsGL.h in Headers */ = {isa = PBXBuildFile; fileRef = 6E67D2A81280E8BD008758F7 /* ExtensionsGL.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 6E72F54C229DCD0C00B3E151 /* ExtensionsGLANGLE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E27F243229C9F8400F1F632 /* ExtensionsGLANGLE.cpp */; }; > 6E72F54E229DCD1000B3E151 /* GraphicsContextGLANGLE.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E27F2422298CE4B00F1F632 /* GraphicsContextGLANGLE.cpp */; }; > 6E72F54F229DCD1300B3E151 /* TemporaryANGLESetting.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6E290861229DB950000986E2 /* TemporaryANGLESetting.cpp */; }; >@@ -2246,6 +2246,8 @@ > 7AF9B20F18CFB5F400C64BEF /* JSVTTRegionList.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AF9B20B18CFB5F300C64BEF /* JSVTTRegionList.h */; }; > 7B10339E2549721700C8C1AC /* GraphicsContextGLCV.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B10339D2549720100C8C1AC /* GraphicsContextGLCV.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 7B10339F2549721E00C8C1AC /* GraphicsContextGLCVANGLE.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B10339C2549720100C8C1AC /* GraphicsContextGLCVANGLE.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 7B6DC81925712E9200380C70 /* GraphicsContextGLIOSurfaceSwapChain.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B6DC81725712E9200380C70 /* GraphicsContextGLIOSurfaceSwapChain.h */; settings = {ATTRIBUTES = (Private, ); }; }; >+ 7B90417025501142006EEB8C /* RemoteGraphicsContextGLProxyBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B90416E25501109006EEB8C /* RemoteGraphicsContextGLProxyBase.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 7BB34A1725345CB200029D08 /* GraphicsContextGLANGLEUtilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB34A1625345CB200029D08 /* GraphicsContextGLANGLEUtilities.h */; }; > 7BB34A48253776CA00029D08 /* GraphicsContextGLImageExtractor.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BB34A45253776C600029D08 /* GraphicsContextGLImageExtractor.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 7BE7427381FA906FBB4F0F2C /* JSSVGGraphicsElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 950C4C02BED8936F818E2F99 /* JSSVGGraphicsElement.h */; }; >@@ -10222,9 +10224,14 @@ > 7B10339A2549720000C8C1AC /* GraphicsContextGLCVANGLE.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGLCVANGLE.cpp; sourceTree = "<group>"; }; > 7B10339C2549720100C8C1AC /* GraphicsContextGLCVANGLE.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLCVANGLE.h; sourceTree = "<group>"; }; > 7B10339D2549720100C8C1AC /* GraphicsContextGLCV.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLCV.h; sourceTree = "<group>"; }; >+ 7B64C0B4254C3B160006B4AF /* RemoteGraphicsContextGLProxyBaseCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = RemoteGraphicsContextGLProxyBaseCocoa.mm; sourceTree = "<group>"; }; >+ 7B6DC81525712E9100380C70 /* GraphicsContextGLIOSurfaceSwapChain.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGLIOSurfaceSwapChain.cpp; sourceTree = "<group>"; }; >+ 7B6DC81725712E9200380C70 /* GraphicsContextGLIOSurfaceSwapChain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLIOSurfaceSwapChain.h; sourceTree = "<group>"; }; >+ 7B90416E25501109006EEB8C /* RemoteGraphicsContextGLProxyBase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteGraphicsContextGLProxyBase.h; sourceTree = "<group>"; }; > 7BB34A1625345CB200029D08 /* GraphicsContextGLANGLEUtilities.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLANGLEUtilities.h; sourceTree = "<group>"; }; > 7BB34A45253776C600029D08 /* GraphicsContextGLImageExtractor.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLImageExtractor.h; sourceTree = "<group>"; }; > 7BB34A47253776C700029D08 /* GraphicsContextGLImageExtractor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GraphicsContextGLImageExtractor.cpp; sourceTree = "<group>"; }; >+ 7BE7265B25763B8D00E85D98 /* RemoteGraphicsContextGLProxyBase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteGraphicsContextGLProxyBase.cpp; sourceTree = "<group>"; }; > 7C011F3D24FAD360005BEF10 /* Settings.cpp.erb */ = {isa = PBXFileReference; lastKnownFileType = text; path = Settings.cpp.erb; sourceTree = "<group>"; }; > 7C011F3E24FAD360005BEF10 /* InternalSettingsGenerated.cpp.erb */ = {isa = PBXFileReference; lastKnownFileType = text; path = InternalSettingsGenerated.cpp.erb; sourceTree = "<group>"; }; > 7C011F3F24FAD360005BEF10 /* InternalSettingsGenerated.idl.erb */ = {isa = PBXFileReference; lastKnownFileType = text; path = InternalSettingsGenerated.idl.erb; sourceTree = "<group>"; }; >@@ -26605,6 +26612,8 @@ > 074E82B918A69F0E007EF54C /* PlatformTimeRanges.h */, > BCAB417F13E356E800D8AAF3 /* Region.cpp */, > BCAB418013E356E800D8AAF3 /* Region.h */, >+ 7BE7265B25763B8D00E85D98 /* RemoteGraphicsContextGLProxyBase.cpp */, >+ 7B90416E25501109006EEB8C /* RemoteGraphicsContextGLProxyBase.h */, > 073A15512177A39800EA08F2 /* RemoteVideoSample.cpp */, > 073A15532177A39A00EA08F2 /* RemoteVideoSample.h */, > 7299BC6623D686C600CC6883 /* RenderingMode.h */, >@@ -26771,6 +26780,8 @@ > 1C12AC291EE778AE0079E0A0 /* FontFamilySpecificationCoreText.h */, > B5320D6A122A24E9002D1440 /* FontPlatformDataCocoa.mm */, > B277B4030B22F37C0004BEC6 /* GraphicsContextCocoa.mm */, >+ 7B6DC81525712E9100380C70 /* GraphicsContextGLIOSurfaceSwapChain.cpp */, >+ 7B6DC81725712E9200380C70 /* GraphicsContextGLIOSurfaceSwapChain.h */, > 49FFBF1C11C8550E006A7118 /* GraphicsContextGLOpenGLCocoa.mm */, > CDA595962146DF7800A84185 /* HEVCUtilitiesCocoa.h */, > CDA595972146DF7800A84185 /* HEVCUtilitiesCocoa.mm */, >@@ -26782,6 +26793,7 @@ > CDC48AC72149CF2A0024FD59 /* MediaEngineConfigurationFactoryCocoa.h */, > 31647FA8251616BD0010F8FB /* OpenGLSoftLinkCocoa.h */, > 31647FA9251616BD0010F8FB /* OpenGLSoftLinkCocoa.mm */, >+ 7B64C0B4254C3B160006B4AF /* RemoteGraphicsContextGLProxyBaseCocoa.mm */, > CDEB3D7224C41A6E001FBEEF /* SourceBufferParser.cpp */, > CDEB3D7324C41A6E001FBEEF /* SourceBufferParser.h */, > CD8F667024C0F208000C421C /* SourceBufferParserWebM.cpp */, >@@ -31224,6 +31236,7 @@ > 079D086B162F21F900DB8658 /* CaptionUserPreferencesMediaAF.h in Headers */, > 07B7116D1D899E63009F0FFB /* CaptureDevice.h in Headers */, > 07B7116F1D899E63009F0FFB /* CaptureDeviceManager.h in Headers */, >+ E4F0BE3125712F6E009E7431 /* CaretRectComputation.h in Headers */, > CDC734151977896D0046BFC5 /* CARingBuffer.h in Headers */, > E4ABABF52368C6EF00FA4345 /* CascadeLevel.h in Headers */, > 57303BBB2006C6EE00355965 /* CBORBinary.h in Headers */, >@@ -32080,6 +32093,7 @@ > 7B10339E2549721700C8C1AC /* GraphicsContextGLCV.h in Headers */, > 7B10339F2549721E00C8C1AC /* GraphicsContextGLCVANGLE.h in Headers */, > 7BB34A48253776CA00029D08 /* GraphicsContextGLImageExtractor.h in Headers */, >+ 7B6DC81925712E9200380C70 /* GraphicsContextGLIOSurfaceSwapChain.h in Headers */, > 49C7B9FC1042D3650009D447 /* GraphicsContextGLOpenGL.h in Headers */, > 319A728823C267FE0085353C /* GraphicsContextGLOpenGLManager.h in Headers */, > 2DACB9E923755D0000B4C185 /* GraphicsContextImpl.h in Headers */, >@@ -34016,6 +34030,7 @@ > CD8ACA891D237AA200ECC59E /* RemoteCommandListenerMac.h in Headers */, > 46B95199207D634D00A7D2DD /* RemoteDOMWindow.h in Headers */, > 46B9519A207D635400A7D2DD /* RemoteFrame.h in Headers */, >+ 7B90417025501142006EEB8C /* RemoteGraphicsContextGLProxyBase.h in Headers */, > CDC312E922FCD7C0001204EC /* RemotePlayback.h in Headers */, > CDC312EB22FCD7C9001204EC /* RemotePlaybackAvailabilityCallback.h in Headers */, > 073A15542177A42600EA08F2 /* RemoteVideoSample.h in Headers */, >@@ -35121,7 +35136,6 @@ > A0EE0DF8144F825500F80B0D /* WebGLDebugShaders.h in Headers */, > 6E3FAE8F14733FDB00E42307 /* WebGLDepthTexture.h in Headers */, > 5B30695E18B3D3450099D5E8 /* WebGLDrawBuffers.h in Headers */, >- E4F0BE3125712F6E009E7431 /* CaretRectComputation.h in Headers */, > 6EBF0E5512A8929800DB1709 /* WebGLExtension.h in Headers */, > 49C7B9CF1042D32F0009D447 /* WebGLFramebuffer.h in Headers */, > 49FFBF3F11C93EE3006A7118 /* WebGLLayer.h in Headers */, >diff --git a/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp b/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp >index 2fc93aeafc9390374a6eb3c209eea76a19632dc8..714873c0a4c6b065b6b7aa564e81ae33d032705b 100644 >--- a/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp >+++ b/Source/WebCore/html/canvas/WebGL2RenderingContext.cpp >@@ -676,21 +676,12 @@ void WebGL2RenderingContext::getBufferSubData(GCGLenum target, long long srcByte > synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "getBufferSubData", "Parameters would read outside the bounds of the source buffer"); > return; > } >- >+ > if (!copyLength) > return; > >- m_context->moveErrorsToSyntheticErrorList(); >-#if PLATFORM(COCOA) > // FIXME: Coalesce multiple getBufferSubData() calls to use a single map() call >- void* ptr = m_context->mapBufferRange(target, checkedSrcByteOffset.unsafeGet(), static_cast<GCGLsizeiptr>(checkedCopyLengthPtr.unsafeGet() * checkedElementSize.unsafeGet()), GraphicsContextGL::MAP_READ_BIT); >- if (ptr) >- memcpy(static_cast<char*>(dstData->baseAddress()) + dstData->byteOffset() + dstOffset * elementSize, ptr, copyLength * elementSize); >- >- if (!m_context->unmapBuffer(target)) >- synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "getBufferSubData", "Failed while unmapping buffer"); >-#endif >- m_context->moveErrorsToSyntheticErrorList(); >+ m_context->getBufferSubData(target, srcByteOffset, makeGCGLSpan(static_cast<char*>(dstData->baseAddress()) + dstData->byteOffset() + dstOffset * elementSize, copyLength * elementSize)); > } > > void WebGL2RenderingContext::bindFramebuffer(GCGLenum target, WebGLFramebuffer* buffer) >@@ -1701,7 +1692,7 @@ void WebGL2RenderingContext::vertexAttribI4uiv(GCGLuint index, Uint32List&& list > synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "vertexAttribI4uiv", "no array"); > return; > } >- >+ > int size = list.length(); > if (size < 4) { > synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "vertexAttribI4uiv", "array too small"); >@@ -1966,9 +1957,7 @@ WebGLAny WebGL2RenderingContext::getQueryParameter(WebGLQuery& query, GCGLenum p > return nullptr; > } > >- unsigned result = 0; >- m_context->getQueryObjectuiv(query.object(), pname, &result); >- return result; >+ return static_cast<unsigned>(m_context->getQueryObjectui(query.object(), pname)); > } > > RefPtr<WebGLSampler> WebGL2RenderingContext::createSampler() >@@ -2013,7 +2002,7 @@ void WebGL2RenderingContext::bindSampler(GCGLuint unit, WebGLSampler* sampler) > > if (isContextLostOrPending()) > return; >- >+ > if (unit >= m_boundSamplers.size()) { > synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "bindSampler", "invalid texture unit"); > return; >@@ -2058,17 +2047,11 @@ WebGLAny WebGL2RenderingContext::getSamplerParameter(WebGLSampler& sampler, GCGL > case GraphicsContextGL::TEXTURE_MIN_FILTER: > case GraphicsContextGL::TEXTURE_WRAP_R: > case GraphicsContextGL::TEXTURE_WRAP_S: >- case GraphicsContextGL::TEXTURE_WRAP_T: { >- int value = 0; >- m_context->getSamplerParameteriv(sampler.object(), pname, &value); >- return value; >- } >+ case GraphicsContextGL::TEXTURE_WRAP_T: >+ return m_context->getSamplerParameteri(sampler.object(), pname); > case GraphicsContextGL::TEXTURE_MAX_LOD: >- case GraphicsContextGL::TEXTURE_MIN_LOD: { >- float value = 0; >- m_context->getSamplerParameterfv(sampler.object(), pname, &value); >- return value; >- } >+ case GraphicsContextGL::TEXTURE_MIN_LOD: >+ return m_context->getSamplerParameterf(sampler.object(), pname); > default: > synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getSamplerParameter", "Invalid pname"); > return nullptr; >@@ -2117,7 +2100,7 @@ GCGLenum WebGL2RenderingContext::clientWaitSync(WebGLSync& sync, GCGLbitfield fl > synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "clientWaitSync", "timeout > MAX_CLIENT_WAIT_TIMEOUT_WEBGL"); > return GraphicsContextGL::WAIT_FAILED_WEBGL; > } >- >+ > if (flags && flags != GraphicsContextGL::SYNC_FLUSH_COMMANDS_BIT) { > synthesizeGLError(GraphicsContextGL::INVALID_VALUE, "clientWaitSync", "invalid flags"); > return GraphicsContextGL::WAIT_FAILED_WEBGL; >@@ -2178,9 +2161,9 @@ void WebGL2RenderingContext::deleteTransformFeedback(WebGLTransformFeedback* fee > > if (isContextLostOrPending() || !feedbackObject || feedbackObject->isDeleted() || !validateWebGLObject("deleteTransformFeedback", feedbackObject)) > return; >- >+ > ASSERT(feedbackObject != m_defaultTransformFeedback); >- >+ > if (feedbackObject->isActive()) { > synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "deleteTransformFeedback", "attempt to delete an active transform feedback object"); > return; >@@ -2247,7 +2230,7 @@ void WebGL2RenderingContext::beginTransformFeedback(GCGLenum primitiveMode) > { > if (isContextLostOrPending()) > return; >- >+ > if (!ValidateTransformFeedbackPrimitiveMode(primitiveMode)) { > synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "beginTransformFeedback", "invalid transform feedback primitive mode"); > return; >@@ -2287,7 +2270,7 @@ void WebGL2RenderingContext::endTransformFeedback() > synthesizeGLError(GraphicsContextGL::INVALID_OPERATION, "endTransformFeedback", "transform feedback is not active"); > return; > } >- >+ > m_context->endTransformFeedback(); > > m_boundTransformFeedback->setPaused(false); >@@ -2298,7 +2281,7 @@ void WebGL2RenderingContext::transformFeedbackVaryings(WebGLProgram& program, co > { > if (isContextLostOrPending() || !validateWebGLProgramOrShader("transformFeedbackVaryings", &program)) > return; >- >+ > switch (bufferMode) { > case GraphicsContextGL::SEPARATE_ATTRIBS: > if (varyings.size() > m_maxTransformFeedbackSeparateAttribs) { >@@ -2484,24 +2467,24 @@ WebGLAny WebGL2RenderingContext::getActiveUniforms(WebGLProgram& program, const > if (isContextLostOrPending() || !validateWebGLProgramOrShader("getActiveUniforms", &program)) > return nullptr; > >- Vector<GCGLint> result(uniformIndices.size(), 0); >- > switch (pname) { >- case GraphicsContextGL::UNIFORM_TYPE: >- m_context->getActiveUniforms(program.object(), uniformIndices, pname, result); >+ case GraphicsContextGL::UNIFORM_TYPE: { >+ auto result = m_context->getActiveUniforms(program.object(), uniformIndices, pname); > return result.map([](auto x) { return static_cast<GCGLenum>(x); }); >- case GraphicsContextGL::UNIFORM_SIZE: >- m_context->getActiveUniforms(program.object(), uniformIndices, pname, result); >+ } >+ case GraphicsContextGL::UNIFORM_SIZE: { >+ auto result = m_context->getActiveUniforms(program.object(), uniformIndices, pname); > return result.map([](auto x) { return static_cast<GCGLuint>(x); }); >+ } > case GraphicsContextGL::UNIFORM_BLOCK_INDEX: > case GraphicsContextGL::UNIFORM_OFFSET: > case GraphicsContextGL::UNIFORM_ARRAY_STRIDE: > case GraphicsContextGL::UNIFORM_MATRIX_STRIDE: >- m_context->getActiveUniforms(program.object(), uniformIndices, pname, result); >- return WTFMove(result); >- case GraphicsContextGL::UNIFORM_IS_ROW_MAJOR: >- m_context->getActiveUniforms(program.object(), uniformIndices, pname, result); >+ return m_context->getActiveUniforms(program.object(), uniformIndices, pname); >+ case GraphicsContextGL::UNIFORM_IS_ROW_MAJOR: { >+ auto result = m_context->getActiveUniforms(program.object(), uniformIndices, pname); > return result.map([](auto x) { return static_cast<bool>(x); }); >+ } > default: > synthesizeGLError(GraphicsContextGL::INVALID_ENUM, "getActiveUniforms", "invalid parameter name"); > return nullptr; >@@ -3568,8 +3551,7 @@ void WebGL2RenderingContext::readPixels(GCGLint x, GCGLint y, GCGLsizei width, G > > clearIfComposited(); > >- GCGLsizei length, columns, rows; >- m_context->getExtensions().readnPixelsRobustANGLE(x, y, width, height, format, type, 0, &length, &columns, &rows, reinterpret_cast<uint8_t*>(offset), true); >+ m_context->readnPixels(x, y, width, height, format, type, offset); > } > > void WebGL2RenderingContext::readPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, ArrayBufferView& dstData, GCGLuint dstOffset) >diff --git a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp b/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >index 32a71503081640fe0817d89850c772da2086e38a..1b41df9b0c8536cd626083e3ae77600ed1ce9f02 100644 >--- a/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >+++ b/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp >@@ -710,8 +710,7 @@ std::unique_ptr<WebGLRenderingContextBase> WebGLRenderingContextBase::create(Can > renderingContext->suspendIfNeeded(); > return renderingContext; > } >- >- auto context = GraphicsContextGLOpenGL::create(attributes, hostWindow); >+ auto context = GraphicsContextGL::create(attributes, hostWindow); > if (!context) { > if (canvasElement) { > canvasElement->dispatchEvent(WebGLContextEvent::create(eventNames().webglcontextcreationerrorEvent, >@@ -4338,10 +4337,7 @@ void WebGLRenderingContextBase::readPixels(GCGLint x, GCGLint y, GCGLsizei width > void* data = pixels.baseAddress(); > > #if USE(ANGLE) >- GCGLsizei length = 0; >- GCGLsizei columns = 0; >- GCGLsizei rows = 0; >- m_context->getExtensions().readnPixelsRobustANGLE(x, y, width, height, format, type, pixels.byteLength(), &length, &columns, &rows, data, false); >+ m_context->readnPixels(x, y, width, height, format, type, makeGCGLSpan(data, pixels.byteLength())); > #else > if (m_isRobustnessEXTSupported) > m_context->getExtensions().readnPixelsEXT(x, y, width, height, format, type, pixels.byteLength(), data); >diff --git a/Source/WebCore/html/canvas/WebGLSync.cpp b/Source/WebCore/html/canvas/WebGLSync.cpp >index 4a420bf0a116cccab5db87a26d8ba242828f2d55..89a63e362171224b413a49542312e3836b6ebc07 100644 >--- a/Source/WebCore/html/canvas/WebGLSync.cpp >+++ b/Source/WebCore/html/canvas/WebGLSync.cpp >@@ -71,7 +71,7 @@ void WebGLSync::updateCache(WebGLRenderingContextBase& context) > return; > > m_allowCacheUpdate = false; >- context.graphicsContextGL()->getSynciv(m_sync, GraphicsContextGL::SYNC_STATUS, sizeof(m_syncStatus), &m_syncStatus); >+ m_syncStatus = context.graphicsContextGL()->getSynci(m_sync, GraphicsContextGL::SYNC_STATUS); > if (m_syncStatus == GraphicsContextGL::UNSIGNALED) > scheduleAllowCacheUpdate(context); > } >diff --git a/Source/WebCore/page/Chrome.cpp b/Source/WebCore/page/Chrome.cpp >index 0a098d2db4920d73c2f108145b230bd9084a695b..742de4c868748d05492d31ba4a9787ed3f1ac3ea 100644 >--- a/Source/WebCore/page/Chrome.cpp >+++ b/Source/WebCore/page/Chrome.cpp >@@ -528,6 +528,13 @@ RefPtr<ImageBuffer> Chrome::createImageBuffer(const FloatSize& size, RenderingMo > return m_client.createImageBuffer(size, renderingMode, purpose, resolutionScale, colorSpace, pixelFormat); > } > >+#if ENABLE(WEBGL) >+RefPtr<GraphicsContextGL> Chrome::createGraphicsContextGL(const GraphicsContextGLAttributes& attributes) const >+{ >+ return m_client.createGraphicsContextGL(attributes, displayID()); >+} >+#endif >+ > PlatformDisplayID Chrome::displayID() const > { > return m_page.displayID(); >@@ -541,6 +548,7 @@ void Chrome::windowScreenDidChange(PlatformDisplayID displayID, Optional<unsigne > m_page.windowScreenDidChange(displayID, nominalFrameInterval); > > #if PLATFORM(MAC) && ENABLE(GRAPHICS_CONTEXT_GL) >+ // TODO: GPU process. Change to GCGLManager, make it work, return null for others. > GraphicsContextGLOpenGLManager::sharedManager().screenDidChange(displayID, this); > #endif > } >diff --git a/Source/WebCore/page/Chrome.h b/Source/WebCore/page/Chrome.h >index 23328f56a1912049d4797641d014005515903502..a89dd1a1d865e5328eb050576540d3f232a3cfc0 100644 >--- a/Source/WebCore/page/Chrome.h >+++ b/Source/WebCore/page/Chrome.h >@@ -86,6 +86,10 @@ public: > > RefPtr<ImageBuffer> createImageBuffer(const FloatSize&, RenderingMode, RenderingPurpose, float resolutionScale, ColorSpace, PixelFormat) const override; > >+#if ENABLE(WEBGL) >+ RefPtr<GraphicsContextGL> createGraphicsContextGL(const GraphicsContextGLAttributes&) const override; >+#endif >+ > PlatformDisplayID displayID() const override; > void windowScreenDidChange(PlatformDisplayID, Optional<unsigned>) override; > >diff --git a/Source/WebCore/page/ChromeClient.h b/Source/WebCore/page/ChromeClient.h >index 3a9e1d669097e595d9b57fc4cff7e61a5d18d0a9..8f18fdff04990375898b17b928cc0e0600e91c78 100644 >--- a/Source/WebCore/page/ChromeClient.h >+++ b/Source/WebCore/page/ChromeClient.h >@@ -325,6 +325,10 @@ public: > > virtual RefPtr<ImageBuffer> createImageBuffer(const FloatSize&, RenderingMode, RenderingPurpose, float, ColorSpace, PixelFormat) const { return nullptr; } > >+#if ENABLE(WEBGL) >+ virtual RefPtr<GraphicsContextGL> createGraphicsContextGL(const GraphicsContextGLAttributes&, WebCore::PlatformDisplayID) const { return nullptr; } >+#endif >+ > // Pass nullptr as the GraphicsLayer to detatch the root layer. > virtual void attachRootGraphicsLayer(Frame&, GraphicsLayer*) = 0; > virtual void attachViewOverlayGraphicsLayer(GraphicsLayer*) = 0; >diff --git a/Source/WebCore/platform/HostWindow.h b/Source/WebCore/platform/HostWindow.h >index 43db1ffae012bb21894f2ca96307214766aadd9e..738118b21e3c337b2e531c996d099bd3e9a569b0 100644 >--- a/Source/WebCore/platform/HostWindow.h >+++ b/Source/WebCore/platform/HostWindow.h >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "GraphicsContextGL.h" > #include "Widget.h" > > namespace WebCore { >@@ -63,6 +64,10 @@ public: > > virtual RefPtr<ImageBuffer> createImageBuffer(const FloatSize&, RenderingMode, RenderingPurpose, float resolutionScale, ColorSpace, PixelFormat) const = 0; > >+#if ENABLE(WEBGL) >+ virtual RefPtr<GraphicsContextGL> createGraphicsContextGL(const GraphicsContextGLAttributes&) const = 0; >+#endif >+ > // Method for retrieving the native client of the page. > virtual PlatformPageClient platformPageClient() const = 0; > >diff --git a/Source/WebCore/platform/RuntimeApplicationChecks.h b/Source/WebCore/platform/RuntimeApplicationChecks.h >index a2253c81bfe0a0bb0910bde6c0db26aa78452fb3..7afba6ec508819cc1eabadccde0bb79a83842d90 100644 >--- a/Source/WebCore/platform/RuntimeApplicationChecks.h >+++ b/Source/WebCore/platform/RuntimeApplicationChecks.h >@@ -34,13 +34,16 @@ WEBCORE_EXPORT int presentingApplicationPID(); > > #if PLATFORM(WIN) > inline bool isInWebProcess() { return false; } >+inline bool isInGPUProcess() { return false; } > #elif !PLATFORM(COCOA) > inline bool isInWebProcess() { return true; } >+inline bool isInGPUProcess() { return false; } > #endif > > #if PLATFORM(COCOA) > > bool isInWebProcess(); >+bool isInGPUProcess(); > bool isInNetworkProcess(); > > WEBCORE_EXPORT void setApplicationBundleIdentifier(const String&); >diff --git a/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm b/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm >index fbd1d43c08f86dc3c18ed21560f08cf87fa1af39..b06ff47dfc541721f64aa0de38b3b92f8838246b 100644 >--- a/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm >+++ b/Source/WebCore/platform/cocoa/RuntimeApplicationChecksCocoa.mm >@@ -96,6 +96,12 @@ bool isInWebProcess() > return mainBundleIsWebProcess; > } > >+bool isInGPUProcess() >+{ >+ static bool mainBundleIsGPUProcess = [[[NSBundle mainBundle] bundleIdentifier] hasPrefix:@"com.apple.WebKit.GPU"]; >+ return mainBundleIsGPUProcess; >+} >+ > bool isInNetworkProcess() > { > static bool mainBundleIsNetworkProcess = [[[NSBundle mainBundle] bundleIdentifier] hasPrefix:@"com.apple.WebKit.Networking"]; >diff --git a/Source/WebCore/platform/graphics/ExtensionsGL.h b/Source/WebCore/platform/graphics/ExtensionsGL.h >index 06c121127e22d13e6be386b8ebba76c67116a13d..bece654af90c498e67baa228d2a3c3c0b89e7a9d 100644 >--- a/Source/WebCore/platform/graphics/ExtensionsGL.h >+++ b/Source/WebCore/platform/graphics/ExtensionsGL.h >@@ -264,7 +264,7 @@ public: > static constexpr GCGLenum COLOR_ATTACHMENT14_EXT = 0x8CEE; > static constexpr GCGLenum COLOR_ATTACHMENT15_EXT = 0x8CEF; > >- // WebGL functions in format generate-gpup-webgl understands. >+ // WebGL functions. > > // GL_ARB_robustness > // Note: This method's behavior differs from the GL_ARB_robustness >@@ -276,10 +276,10 @@ public: > virtual GCGLint getGraphicsResetStatusARB() = 0; > > // GL_ANGLE_framebuffer_blit >- virtual void blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter) = 0; >+ virtual void blitFramebufferANGLE(GCGLint srcX0, GCGLint srcY0, GCGLint srcX1, GCGLint srcY1, GCGLint dstX0, GCGLint dstY0, GCGLint dstX1, GCGLint dstY1, GCGLbitfield mask, GCGLenum filter) = 0; > > // GL_ANGLE_framebuffer_multisample >- virtual void renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height) = 0; >+ virtual void renderbufferStorageMultisampleANGLE(GCGLenum target, GCGLsizei samples, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) = 0; > > // GL_OES_vertex_array_object > virtual PlatformGLObject createVertexArrayOES() = 0; >@@ -293,15 +293,15 @@ public: > // GL_EXT_debug_marker > virtual void insertEventMarkerEXT(const String&) = 0; > virtual void pushGroupMarkerEXT(const String&) = 0; >- virtual void popGroupMarkerEXT(void) = 0; >+ virtual void popGroupMarkerEXT() = 0; > > // GL_ARB_draw_buffers / GL_EXT_draw_buffers > virtual void drawBuffersEXT(GCGLSpan<const GCGLenum> bufs) = 0; > > // GL_ANGLE_instanced_arrays >- virtual void drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) = 0; >- virtual void drawElementsInstanced(GCGLenum mode, GCGLsizei count, GCGLenum type, long long offset, GCGLsizei primcount) = 0; >- virtual void vertexAttribDivisor(GCGLuint index, GCGLuint divisor) = 0; >+ virtual void drawArraysInstancedANGLE(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) = 0; >+ virtual void drawElementsInstancedANGLE(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLvoidptr offset, GCGLsizei primcount) = 0; >+ virtual void vertexAttribDivisorANGLE(GCGLuint index, GCGLuint divisor) = 0; > > // GL_ANGLE_robust_client_memory > virtual void readPixelsRobustANGLE(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLsizei* length, GCGLsizei* columns, GCGLsizei* rows, GCGLvoid* pixels) = 0; >@@ -329,7 +329,6 @@ public: > virtual void getTexLevelParameterfvRobustANGLE(GCGLenum target, GCGLint level, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLfloat* params) = 0; > > virtual void getPointervRobustANGLERobustANGLE(GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLvoid** params) = 0; >- virtual void readnPixelsRobustANGLE(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLsizei* length, GCGLsizei* columns, GCGLsizei* rows, GCGLvoid* data, bool readingToPixelBufferObject) = 0; > virtual void getnUniformfvRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei* length, GCGLfloat* params) = 0; > virtual void getnUniformivRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) = 0; > virtual void getnUniformuivRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei* length, GCGLuint* params) = 0; >@@ -352,7 +351,6 @@ public: > virtual void readnPixelsEXT(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLvoid* data) = 0; > virtual void getnUniformfvEXT(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLfloat* params) = 0; > virtual void getnUniformivEXT(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLint* params) = 0; >-#endif > > virtual bool isNVIDIA() = 0; > virtual bool isAMD() = 0; >@@ -364,6 +362,7 @@ public: > // that must be avoided. Ports should implement these flags on such configurations. > virtual bool requiresBuiltInFunctionEmulation() = 0; > virtual bool requiresRestrictedMaximumTextureSize() = 0; >+#endif > > }; > >diff --git a/Source/WebCore/platform/graphics/GraphicsContextGL.cpp b/Source/WebCore/platform/graphics/GraphicsContextGL.cpp >index df4a119a320dac6aeb6306d4c509551588a1973e..34d556b0cc4a9bb1aea7a5a968bc695b3a2e278a 100644 >--- a/Source/WebCore/platform/graphics/GraphicsContextGL.cpp >+++ b/Source/WebCore/platform/graphics/GraphicsContextGL.cpp >@@ -27,11 +27,13 @@ > > #include "config.h" > #include "GraphicsContextGL.h" >+#include "GraphicsContextGLOpenGL.h" > > #if ENABLE(GRAPHICS_CONTEXT_GL) > > #include "ExtensionsGL.h" > #include "FormatConverter.h" >+#include "HostWindow.h" > #include "Image.h" > #include "ImageData.h" > #include "ImageObserver.h" >@@ -403,6 +405,15 @@ static bool packPixels(const uint8_t* sourceData, GraphicsContextGL::DataFormat > return true; > } > >+RefPtr<GraphicsContextGL> GraphicsContextGL::create(const GraphicsContextGLAttributes& attributes, HostWindow* hostWindow) >+{ >+ RefPtr<GraphicsContextGL> result; >+ if (hostWindow) >+ result = hostWindow->createGraphicsContextGL(attributes); >+ if (!result) >+ result = GraphicsContextGLOpenGL::create(attributes, hostWindow); >+ return result; >+} > > GraphicsContextGL::GraphicsContextGL(GraphicsContextGLAttributes attrs, Destination destination, GraphicsContextGL*) > : m_attrs(attrs) >diff --git a/Source/WebCore/platform/graphics/GraphicsContextGL.h b/Source/WebCore/platform/graphics/GraphicsContextGL.h >index c8e279f393b6ca8123fceef7c89b125c52dc6ef3..0bab6c0621aea91cd3e81363e9b276859f2580a5 100644 >--- a/Source/WebCore/platform/graphics/GraphicsContextGL.h >+++ b/Source/WebCore/platform/graphics/GraphicsContextGL.h >@@ -59,6 +59,8 @@ class ImageData; > class GraphicsContextGLCV; > #endif > >+ >+// Base class for graphics context for implementing WebGL rendering model. > class GraphicsContextGL : public RefCounted<GraphicsContextGL> { > public: > // WebGL 1 constants. >@@ -669,6 +671,9 @@ public: > static constexpr GCGLenum TEXTURE_RECTANGLE_ARB = 0x84F5; > static constexpr GCGLenum TEXTURE_BINDING_RECTANGLE_ARB = 0x84F6; > >+ static constexpr GCGLenum REQUESTABLE_EXTENSIONS_ANGLE = 0x93A8; >+ >+ > // Attempt to enumerate all possible native image formats to > // reduce the amount of temporary allocations during texture > // uploading. This enum must be public because it is accessed >@@ -911,14 +916,17 @@ public: > GCGLint size; > }; > >+ // Creates a GraphicsContextGL instance to render into offscreen destination in context of HostWindow. >+ // HostWindow might affect the decision which backend is to be used. >+ static RefPtr<GraphicsContextGL> create(const GraphicsContextGLAttributes&, HostWindow*); >+ > GraphicsContextGL(GraphicsContextGLAttributes, Destination = Destination::Offscreen, GraphicsContextGL* sharedContext = nullptr); > virtual ~GraphicsContextGL() = default; > > void addClient(Client& client) { m_clients.add(&client); } > void removeClient(Client& client) { m_clients.remove(&client); } > >- // WebGL functions in format generate-gpup-webgl understands. >- >+ // WebGL functions. > virtual void activeTexture(GCGLenum texture) = 0; > virtual void attachShader(PlatformGLObject program, PlatformGLObject shader) = 0; > virtual void bindAttribLocation(PlatformGLObject, GCGLuint index, const String& name) = 0; >@@ -980,7 +988,6 @@ public: > > virtual bool getActiveAttrib(PlatformGLObject program, GCGLuint index, ActiveInfo&) = 0; > virtual bool getActiveUniform(PlatformGLObject program, GCGLuint index, ActiveInfo&) = 0; >- virtual void getAttachedShaders(PlatformGLObject program, GCGLsizei maxCount, GCGLsizei* count, PlatformGLObject* shaders) = 0; > > virtual GCGLint getAttribLocation(PlatformGLObject, const String& name) = 0; > >@@ -1025,10 +1032,6 @@ public: > > virtual GCGLint getUniformLocation(PlatformGLObject, const String& name) = 0; > >- // getVertexAttrib >- virtual void getVertexAttribfv(GCGLuint index, GCGLenum pname, GCGLSpan<GCGLfloat> value) = 0; >- virtual void getVertexAttribiv(GCGLuint index, GCGLenum pname, GCGLSpan<GCGLint> value) = 0; >- > virtual GCGLsizeiptr getVertexAttribOffset(GCGLuint index, GCGLenum pname) = 0; > > virtual void hint(GCGLenum target, GCGLenum mode) = 0; >@@ -1100,7 +1103,8 @@ public: > virtual void bufferData(GCGLenum target, GCGLSpan<const GCGLvoid> data, GCGLenum usage) = 0; > virtual void bufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<const GCGLvoid> data) = 0; > >- virtual void readPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLvoid* data) = 0; >+ virtual void readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<GCGLvoid> data) = 0; >+ virtual void readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset) = 0; > > virtual void texImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels) = 0; > virtual void texImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr offset) = 0; >@@ -1124,8 +1128,7 @@ public: > // ========== WebGL 2 entry points. > > virtual void copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLintptr readOffset, GCGLintptr writeOffset, GCGLsizeiptr size) = 0; >- virtual GCGLvoid* mapBufferRange(GCGLenum target, GCGLintptr offset, GCGLsizeiptr length, GCGLbitfield access) = 0; >- virtual GCGLboolean unmapBuffer(GCGLenum target) = 0; >+ virtual void getBufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<GCGLvoid> data) = 0; > > virtual void blitFramebuffer(GCGLint srcX0, GCGLint srcY0, GCGLint srcX1, GCGLint srcY1, GCGLint dstX0, GCGLint dstY0, GCGLint dstX1, GCGLint dstY1, GCGLbitfield mask, GCGLenum filter) = 0; > virtual void framebufferTextureLayer(GCGLenum target, GCGLenum attachment, PlatformGLObject texture, GCGLint level, GCGLint layer) = 0; >@@ -1187,7 +1190,7 @@ public: > virtual void endQuery(GCGLenum target) = 0; > virtual PlatformGLObject getQuery(GCGLenum target, GCGLenum pname) = 0; > // getQueryParameter >- virtual void getQueryObjectuiv(PlatformGLObject query, GCGLenum pname, GCGLuint* value) = 0; >+ virtual GCGLuint getQueryObjectui(PlatformGLObject query, GCGLenum pname) = 0; > > virtual PlatformGLObject createSampler() = 0; > virtual void deleteSampler(PlatformGLObject sampler) = 0; >@@ -1196,8 +1199,8 @@ public: > virtual void samplerParameteri(PlatformGLObject sampler, GCGLenum pname, GCGLint param) = 0; > virtual void samplerParameterf(PlatformGLObject sampler, GCGLenum pname, GCGLfloat param) = 0; > // getSamplerParameter >- virtual void getSamplerParameterfv(PlatformGLObject sampler, GCGLenum pname, GCGLfloat* value) = 0; >- virtual void getSamplerParameteriv(PlatformGLObject sampler, GCGLenum pname, GCGLint* value) = 0; >+ virtual GCGLfloat getSamplerParameterf(PlatformGLObject sampler, GCGLenum pname) = 0; >+ virtual GCGLint getSamplerParameteri(PlatformGLObject sampler, GCGLenum pname) = 0; > > virtual GCGLsync fenceSync(GCGLenum condition, GCGLbitfield flags) = 0; > virtual GCGLboolean isSync(GCGLsync) = 0; >@@ -1205,7 +1208,7 @@ public: > virtual GCGLenum clientWaitSync(GCGLsync, GCGLbitfield flags, GCGLuint64 timeout) = 0; > virtual void waitSync(GCGLsync, GCGLbitfield flags, GCGLint64 timeout) = 0; > // getSyncParameter >- virtual void getSynciv(GCGLsync, GCGLenum pname, GCGLsizei bufSize, GCGLint* value) = 0; >+ virtual GCGLint getSynci(GCGLsync, GCGLenum pname) = 0; > > virtual PlatformGLObject createTransformFeedback() = 0; > virtual void deleteTransformFeedback(PlatformGLObject id) = 0; >@@ -1222,7 +1225,7 @@ public: > virtual void bindBufferRange(GCGLenum target, GCGLuint index, PlatformGLObject buffer, GCGLintptr offset, GCGLsizeiptr size) = 0; > // getIndexedParameter -> use getParameter calls above. > virtual Vector<GCGLuint> getUniformIndices(PlatformGLObject program, const Vector<String>& uniformNames) = 0; >- virtual void getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname, Vector<GCGLint>& params) = 0; >+ virtual Vector<GCGLint> getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname) = 0; > > virtual GCGLuint getUniformBlockIndex(PlatformGLObject program, const String& uniformBlockName) = 0; > // getActiveUniformBlockParameter >@@ -1230,7 +1233,7 @@ public: > virtual void uniformBlockBinding(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLuint uniformBlockBinding) = 0; > > virtual void getActiveUniformBlockiv(GCGLuint program, GCGLuint uniformBlockIndex, GCGLenum pname, GCGLSpan<GCGLint> params) = 0; >- >+ > // Other functions. > GCGLfloat getFloat(GCGLenum pname); > GCGLboolean getBoolean(GCGLenum pname); >@@ -1394,7 +1397,6 @@ inline GCGLint GraphicsContextGL::getActiveUniformBlocki(GCGLuint program, GCGLu > return value[0]; > } > >- > } // namespace WebCore > > #endif >diff --git a/Source/WebCore/platform/graphics/GraphicsTypesGL.h b/Source/WebCore/platform/graphics/GraphicsTypesGL.h >index 85c29a4b6e56110dc7bd747ae33987c340375df1..3b064c3e768ecc4bf02b7625a6f1edbcc80874dd 100644 >--- a/Source/WebCore/platform/graphics/GraphicsTypesGL.h >+++ b/Source/WebCore/platform/graphics/GraphicsTypesGL.h >@@ -25,7 +25,9 @@ > > #pragma once > >+#include <cstdint> > #include <limits> >+#include <type_traits> > #include <wtf/Forward.h> > #include <wtf/Vector.h> > >@@ -44,13 +46,17 @@ typedef unsigned GCGLuint; > typedef float GCGLfloat; > typedef unsigned short GCGLhalffloat; > typedef float GCGLclampf; >+typedef char GCGLchar; >+typedef struct __GLsync* GCGLsync; >+typedef void GCGLvoid; >+ >+// These GCGL types do not strictly match the GL types as defined in OpenGL ES 2.0 >+// header file for all platforms. > typedef intptr_t GCGLintptr; > typedef intptr_t GCGLsizeiptr; >-typedef char GCGLchar; >+typedef intptr_t GCGLvoidptr; > typedef long long GCGLint64; > typedef unsigned long long GCGLuint64; >-typedef struct __GLsync* GCGLsync; >-typedef void GCGLvoid; > > typedef GCGLuint PlatformGLObject; > >@@ -58,13 +64,17 @@ typedef GCGLuint PlatformGLObject; > typedef unsigned GLuint; > #endif > >-template<typename T, size_t Extent = std::numeric_limits<size_t>::max()> >+inline constexpr size_t gcGLSpanDynamicExtent = std::numeric_limits<size_t>::max(); >+ >+template<typename T, size_t Extent = gcGLSpanDynamicExtent> > struct GCGLSpan; > template<typename T, size_t Extent> > struct GCGLSpan { >- explicit GCGLSpan(T* array) >+ explicit GCGLSpan(T* array, size_t size = Extent) > : data(array) >- { } >+ { >+ ASSERT_UNUSED(size, size == Extent); >+ } > GCGLSpan(T (&array)[Extent]) > : data(array) > { } >@@ -72,6 +82,12 @@ struct GCGLSpan { > GCGLSpan(const GCGLSpan<U, Extent>& other, std::enable_if_t<std::is_convertible_v<U(*)[], T(*)[]>, std::nullptr_t> = nullptr) > : data(other.data) > { } >+ GCGLSpan(std::array<T, Extent>& array) >+ : data(array.data()) >+ { } >+ GCGLSpan(const std::array<T, Extent>& array) >+ : data(array.data()) >+ { } > T& operator[](size_t i) { RELEASE_ASSERT(data && i < bufSize); return data[i]; } > T& operator*() { RELEASE_ASSERT(data && bufSize); return *data; } > T* data; >@@ -79,7 +95,7 @@ struct GCGLSpan { > }; > > template<typename T> >-struct GCGLSpan<T, std::numeric_limits<size_t>::max()> { >+struct GCGLSpan<T, gcGLSpanDynamicExtent> { > GCGLSpan(T* array, size_t bufSize_) > : data(array) > , bufSize(bufSize_) >@@ -121,6 +137,11 @@ struct GCGLSpan<GCGLvoid> { > : data(other.data) > , bufSize(other.bufSize * sizeof(U)) > { } >+ template<typename U, size_t inlineCapacity> >+ GCGLSpan(WTF::Vector<U, inlineCapacity>& array) >+ : data(array.data()) >+ , bufSize(array.size() * sizeof(U)) >+ { } > GCGLvoid* data; > const size_t bufSize; > }; >@@ -152,8 +173,11 @@ struct GCGLSpan<const GCGLvoid> { > template<typename T, size_t N> > GCGLSpan(T (&)[N]) -> GCGLSpan<T, N>; > >-template<typename T> >-GCGLSpan(WTF::Vector<T>&) -> GCGLSpan<T>; >+template<typename T, size_t N> >+GCGLSpan(std::array<T, N>&) -> GCGLSpan<T, N>; >+ >+template<typename T, size_t inlineCapacity> >+GCGLSpan(WTF::Vector<T, inlineCapacity>&) -> GCGLSpan<T>; > > template<typename T> > GCGLSpan<T> makeGCGLSpan(T* data, size_t count) >diff --git a/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.cpp b/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..730f2f3068ff0291af5be60a5c5f6e1eeb7a4af4 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.cpp >@@ -0,0 +1,162 @@ >+/* >+ * Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#import "config.h" >+#import "RemoteGraphicsContextGLProxyBase.h" >+ >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+ >+namespace WebCore { >+ >+RemoteGraphicsContextGLProxyBase::RemoteGraphicsContextGLProxyBase(const GraphicsContextGLAttributes& attrs) >+ : GraphicsContextGL(attrs) >+{ >+ platformInitialize(); >+} >+ >+RemoteGraphicsContextGLProxyBase::~RemoteGraphicsContextGLProxyBase() = default; >+ >+PlatformGraphicsContextGL RemoteGraphicsContextGLProxyBase::platformGraphicsContextGL() const >+{ >+ return 0; >+} >+ >+PlatformGLObject RemoteGraphicsContextGLProxyBase::platformTexture() const >+{ >+ return 0; >+} >+ >+ExtensionsGL& RemoteGraphicsContextGLProxyBase::getExtensions() >+{ >+ return *this; >+} >+ >+void RemoteGraphicsContextGLProxyBase::setContextVisibility(bool) >+{ >+} >+ >+GraphicsContextGLPowerPreference RemoteGraphicsContextGLProxyBase::powerPreferenceUsedForCreation() const >+{ >+ return { }; >+} >+ >+bool RemoteGraphicsContextGLProxyBase::isGLES2Compliant() const >+{ >+ return contextAttributes().isWebGL2; >+} >+ >+void RemoteGraphicsContextGLProxyBase::markContextChanged() >+{ >+ // FIXME: The caller should track this state. >+ if (m_layerComposited) >+ notifyMarkContextChanged(); >+ m_layerComposited = false; >+} >+ >+void RemoteGraphicsContextGLProxyBase::markLayerComposited() >+{ >+ m_layerComposited = true; >+ auto attrs = contextAttributes(); >+ if (!attrs.preserveDrawingBuffer) { >+ m_buffersToAutoClear = GraphicsContextGL::COLOR_BUFFER_BIT; >+ if (attrs.depth) >+ m_buffersToAutoClear |= GraphicsContextGL::DEPTH_BUFFER_BIT; >+ if (attrs.stencil) >+ m_buffersToAutoClear |= GraphicsContextGL::STENCIL_BUFFER_BIT; >+ } >+ for (auto* client : copyToVector(m_clients)) >+ client->didComposite(); >+} >+ >+bool RemoteGraphicsContextGLProxyBase::layerComposited() const >+{ >+ return m_layerComposited; >+} >+ >+void RemoteGraphicsContextGLProxyBase::setBuffersToAutoClear(GCGLbitfield buffers) >+{ >+ if (!contextAttributes().preserveDrawingBuffer) >+ m_buffersToAutoClear = buffers; >+} >+ >+GCGLbitfield RemoteGraphicsContextGLProxyBase::getBuffersToAutoClear() const >+{ >+ return m_buffersToAutoClear; >+} >+ >+bool RemoteGraphicsContextGLProxyBase::paintCompositedResultsToCanvas(ImageBuffer*) >+{ >+ return false; >+} >+ >+void RemoteGraphicsContextGLProxyBase::enablePreserveDrawingBuffer() >+{ >+ // Redeclared for export reasons. >+ // FIXME: The whole function should be removed. >+ GraphicsContextGL::enablePreserveDrawingBuffer(); >+} >+ >+bool RemoteGraphicsContextGLProxyBase::supports(const String& name) >+{ >+ waitUntilInitialized(); >+ return m_availableExtensions.contains(name) || m_requestableExtensions.contains(name); >+} >+ >+void RemoteGraphicsContextGLProxyBase::ensureEnabled(const String& name) >+{ >+ waitUntilInitialized(); >+ if (m_requestableExtensions.contains(name) && !m_enabledExtensions.contains(name)) { >+ ensureExtensionEnabled(name); >+ m_enabledExtensions.add(name); >+ } >+} >+ >+bool RemoteGraphicsContextGLProxyBase::isEnabled(const String& name) >+{ >+ waitUntilInitialized(); >+ return m_availableExtensions.contains(name) || m_enabledExtensions.contains(name); >+} >+ >+void RemoteGraphicsContextGLProxyBase::initialize(const String& availableExtensions, const String& requestableExtensions) >+{ >+ for (auto& extension : availableExtensions.split(' ')) >+ m_availableExtensions.add(extension); >+ for (auto& extension : requestableExtensions.split(' ')) >+ m_requestableExtensions.add(extension); >+} >+ >+#if !PLATFORM(COCOA) >+void RemoteGraphicsContextGLProxyBase::platformInitialize() >+{ >+} >+ >+PlatformLayer* RemoteGraphicsContextGLProxyBase::platformLayer() const >+{ >+ return nullptr; >+} >+#endif >+ >+} >+#endif >diff --git a/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.h b/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.h >new file mode 100644 >index 0000000000000000000000000000000000000000..4ce8a0914d8e8e29e2d28312504c4eb320b119c1 >--- /dev/null >+++ b/Source/WebCore/platform/graphics/RemoteGraphicsContextGLProxyBase.h >@@ -0,0 +1,112 @@ >+/* >+ * Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+ >+#include "ExtensionsGL.h" >+#include "GraphicsContextGL.h" >+ >+#include <wtf/HashSet.h> >+#include <wtf/text/StringHash.h> >+ >+#if PLATFORM(COCOA) >+#include <wtf/RetainPtr.h> >+#endif >+ >+#if PLATFORM(COCOA) >+OBJC_CLASS WebGLLayer; >+#endif >+ >+namespace WebCore { >+ >+#if PLATFORM(COCOA) >+class GraphicsContextGLIOSurfaceSwapChain; >+#endif >+ >+// A base class for RemoteGraphicsContextGL proxy side implementation >+// This implements the parts that are using WebCore internal functionality: >+// - Drawing buffer tracking management. >+// - Compositing support. >+class WEBCORE_EXPORT RemoteGraphicsContextGLProxyBase : public GraphicsContextGL, public ExtensionsGL { >+public: >+ RemoteGraphicsContextGLProxyBase(const GraphicsContextGLAttributes&); >+ ~RemoteGraphicsContextGLProxyBase() override; >+ >+ // Other WebCore::GraphicsContextGL overrides. >+ using GraphicsContextGL::isEnabled; >+ PlatformGraphicsContextGL platformGraphicsContextGL() const final; >+ PlatformGLObject platformTexture() const final; >+ PlatformLayer* platformLayer() const final; >+ ExtensionsGL& getExtensions() final; >+ void setContextVisibility(bool) final; >+ GraphicsContextGLPowerPreference powerPreferenceUsedForCreation() const final; >+ bool isGLES2Compliant() const final; >+ void markContextChanged() final; >+ bool layerComposited() const final; >+ void setBuffersToAutoClear(GCGLbitfield) final; >+ GCGLbitfield getBuffersToAutoClear() const final; >+ bool paintCompositedResultsToCanvas(ImageBuffer*) final; >+ void markLayerComposited() final; >+ void enablePreserveDrawingBuffer() final; >+ >+#if ENABLE(VIDEO) && USE(AVFOUNDATION) >+ GraphicsContextGLCV* asCV() final; >+#endif >+ // Other ExtensionGL overrides. >+ using ExtensionsGL::isEnabled; >+ bool supports(const String&) final; >+ void ensureEnabled(const String&) final; >+ bool isEnabled(const String&) final; >+ >+protected: >+ void initialize(const String& availableExtensions, const String& requestableExtensions); >+ virtual void waitUntilInitialized() = 0; >+ virtual void ensureExtensionEnabled(const String&) = 0; >+ virtual void notifyMarkContextChanged() = 0; >+#if PLATFORM(COCOA) >+ GraphicsContextGLIOSurfaceSwapChain& platformSwapChain(); >+#endif >+ >+private: >+ void platformInitialize(); >+#if PLATFORM(COCOA) >+ RetainPtr<WebGLLayer> m_webGLLayer; >+#endif >+ >+ // Guarded by waitUntilInitialized(). >+ HashSet<String> m_availableExtensions; >+ HashSet<String> m_requestableExtensions; >+ >+ HashSet<String> m_enabledExtensions; >+ >+ // FIXME: Drawing buffer clear tracking should be moved to the client. >+ bool m_layerComposited = false; >+ GCGLbitfield m_buffersToAutoClear = { 0 }; >+}; >+ >+} >+#endif >diff --git a/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp b/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp >index 283da82c6a602ea4b557c686cfd823d081c55e4a..7c151fa2850f33c149a9dc822381b8fcbde9cb75 100644 >--- a/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp >+++ b/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp >@@ -46,28 +46,8 @@ namespace WebCore { > ExtensionsGLANGLE::ExtensionsGLANGLE(GraphicsContextGLOpenGL* context, bool useIndexedGetString) > : m_initializedAvailableExtensions(false) > , m_context(context) >- , m_isNVIDIA(false) >- , m_isAMD(false) >- , m_isIntel(false) >- , m_isImagination(false) >- , m_requiresBuiltInFunctionEmulation(false) >- , m_requiresRestrictedMaximumTextureSize(false) > , m_useIndexedGetString(useIndexedGetString) > { >- // FIXME: ideally, remove this initialization altogether. ANGLE >- // subsumes the responsibility for graphics driver workarounds. >- m_vendor = String(reinterpret_cast<const char*>(gl::GetString(GL_VENDOR))); >- m_renderer = String(reinterpret_cast<const char*>(gl::GetString(GL_RENDERER))); >- >- Vector<String> vendorComponents = m_vendor.convertToASCIILowercase().split(' '); >- if (vendorComponents.contains("nvidia")) >- m_isNVIDIA = true; >- if (vendorComponents.contains("ati") || vendorComponents.contains("amd")) >- m_isAMD = true; >- if (vendorComponents.contains("intel")) >- m_isIntel = true; >- if (vendorComponents.contains("imagination")) >- m_isImagination = true; > } > > ExtensionsGLANGLE::~ExtensionsGLANGLE() = default; >@@ -103,7 +83,7 @@ bool ExtensionsGLANGLE::isEnabled(const String& name) > return m_availableExtensions.contains(name) || m_enabledExtensions.contains(name); > } > >-int ExtensionsGLANGLE::getGraphicsResetStatusARB() >+GLint ExtensionsGLANGLE::getGraphicsResetStatusARB() > { > return GraphicsContextGL::NO_ERROR; > } >@@ -114,10 +94,11 @@ String ExtensionsGLANGLE::getTranslatedShaderSourceANGLE(PlatformGLObject shader > return String(); > > int sourceLength = m_context->getShaderi(shader, GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE); >+ > if (!sourceLength) > return emptyString(); > Vector<GLchar> name(sourceLength); // GL_TRANSLATED_SHADER_SOURCE_LENGTH_ANGLE includes null termination. >- int returnedLength = 0; >+ GCGLint returnedLength = 0; > gl::GetTranslatedShaderSourceANGLE(shader, sourceLength, &returnedLength, name.data()); > if (!returnedLength) > return emptyString(); >@@ -147,7 +128,7 @@ void ExtensionsGLANGLE::initializeAvailableExtensions() > m_initializedAvailableExtensions = true; > } > >-void ExtensionsGLANGLE::blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter) >+void ExtensionsGLANGLE::blitFramebufferANGLE(GCGLint srcX0, GCGLint srcY0, GCGLint srcX1, GCGLint srcY1, GCGLint dstX0, GCGLint dstY0, GCGLint dstX1, GCGLint dstY1, GCGLbitfield mask, GCGLenum filter) > { > // FIXME: consider adding support for APPLE_framebuffer_multisample. > if (!m_context->makeContextCurrent()) >@@ -156,7 +137,7 @@ void ExtensionsGLANGLE::blitFramebuffer(long srcX0, long srcY0, long srcX1, long > gl::BlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); > } > >-void ExtensionsGLANGLE::renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height) >+void ExtensionsGLANGLE::renderbufferStorageMultisampleANGLE(GCGLenum target, GCGLsizei samples, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) > { > if (!m_context->makeContextCurrent()) > return; >@@ -235,7 +216,7 @@ void ExtensionsGLANGLE::drawBuffersEXT(GCGLSpan<const GCGLenum> bufs) > gl::DrawBuffersEXT(bufs.bufSize, bufs.data); > } > >-void ExtensionsGLANGLE::drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) >+void ExtensionsGLANGLE::drawArraysInstancedANGLE(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) > { > if (!m_context->makeContextCurrent()) > return; >@@ -243,15 +224,15 @@ void ExtensionsGLANGLE::drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLsi > gl::DrawArraysInstancedANGLE(mode, first, count, primcount); > } > >-void ExtensionsGLANGLE::drawElementsInstanced(GCGLenum mode, GCGLsizei count, GCGLenum type, long long offset, GCGLsizei primcount) >+void ExtensionsGLANGLE::drawElementsInstancedANGLE(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLvoidptr offset, GCGLsizei primcount) > { > if (!m_context->makeContextCurrent()) > return; > >- gl::DrawElementsInstancedANGLE(mode, count, type, reinterpret_cast<GLvoid*>(static_cast<intptr_t>(offset)), primcount); >+ gl::DrawElementsInstancedANGLE(mode, count, type, reinterpret_cast<GLvoid*>(offset), primcount); > } > >-void ExtensionsGLANGLE::vertexAttribDivisor(GCGLuint index, GCGLuint divisor) >+void ExtensionsGLANGLE::vertexAttribDivisorANGLE(GCGLuint index, GCGLuint divisor) > { > if (!m_context->makeContextCurrent()) > return; >@@ -350,7 +331,7 @@ void ExtensionsGLANGLE::getVertexAttribIuivRobustANGLE(GCGLuint index, GCGLenum > gl::GetVertexAttribIuivRobustANGLE(index, pname, bufSize, length, params); > } > >-void ExtensionsGLANGLE::getUniformuivRobustANGLE(GCGLuint program, int location, GCGLsizei bufSize, GCGLsizei *length, GCGLuint *params) >+void ExtensionsGLANGLE::getUniformuivRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei *length, GCGLuint *params) > { > if (!m_context->makeContextCurrent()) > return; >@@ -431,7 +412,7 @@ void ExtensionsGLANGLE::getMultisamplefvRobustANGLE(GCGLenum pname, GCGLuint ind > gl::GetMultisamplefvRobustANGLE(pname, index, bufSize, length, val); > } > >-void ExtensionsGLANGLE::getTexLevelParameterivRobustANGLE(GCGLenum target, int level, GCGLenum pname, GCGLsizei bufSize, GCGLsizei *length, GCGLint *params) >+void ExtensionsGLANGLE::getTexLevelParameterivRobustANGLE(GCGLenum target, GCGLint level, GCGLenum pname, GCGLsizei bufSize, GCGLsizei *length, GCGLint *params) > { > if (!m_context->makeContextCurrent()) > return; >@@ -439,7 +420,7 @@ void ExtensionsGLANGLE::getTexLevelParameterivRobustANGLE(GCGLenum target, int l > gl::GetTexLevelParameterivRobustANGLE(target, level, pname, bufSize, length, params); > } > >-void ExtensionsGLANGLE::getTexLevelParameterfvRobustANGLE(GCGLenum target, int level, GCGLenum pname, GCGLsizei bufSize, GCGLsizei *length, GCGLfloat *params) >+void ExtensionsGLANGLE::getTexLevelParameterfvRobustANGLE(GCGLenum target, GCGLint level, GCGLenum pname, GCGLsizei bufSize, GCGLsizei *length, GCGLfloat *params) > { > if (!m_context->makeContextCurrent()) > return; >@@ -456,55 +437,7 @@ void ExtensionsGLANGLE::getPointervRobustANGLERobustANGLE(GCGLenum pname, GCGLsi > gl::GetPointervRobustANGLERobustANGLE(pname, bufSize, length, params); > } > >-#if PLATFORM(MAC) || PLATFORM(IOS_FAMILY) >-static void wipeAlphaChannelFromPixels(int width, int height, unsigned char* pixels) >-{ >- // We can assume this doesn't overflow because the calling functions >- // use checked arithmetic. >- int totalBytes = width * height * 4; >- for (int i = 0; i < totalBytes; i += 4) >- pixels[i + 3] = 255; >-} >-#endif >- >-void ExtensionsGLANGLE::readnPixelsRobustANGLE(int x, int y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLsizei *length, GCGLsizei *columns, GCGLsizei *rows, void *data, bool readingToPixelBufferObject) >-{ >- if (!m_context->makeContextCurrent()) >- return; >- >- // FIXME: remove the two glFlush calls when the driver bug is fixed, i.e., >- // all previous rendering calls should be done before reading pixels. >- gl::Flush(); >- auto attrs = m_context->contextAttributes(); >- GCGLenum framebufferTarget = m_context->m_isForWebGL2 ? GraphicsContextGL::READ_FRAMEBUFFER : GraphicsContextGL::FRAMEBUFFER; >- const GraphicsContextGLOpenGL::GraphicsContextGLState& state = m_context->m_state; >- if (attrs.antialias && state.boundReadFBO == m_context->m_multisampleFBO) { >- m_context->resolveMultisamplingIfNecessary(IntRect(x, y, width, height)); >- gl::BindFramebuffer(framebufferTarget, m_context->m_fbo); >- gl::Flush(); >- } >- (void) m_context->moveErrorsToSyntheticErrorList(); >- gl::ReadnPixelsRobustANGLE(x, y, width, height, format, type, bufSize, length, columns, rows, data); >- GLenum error = gl::GetError(); >- if (attrs.antialias && state.boundReadFBO == m_context->m_multisampleFBO) >- gl::BindFramebuffer(framebufferTarget, m_context->m_multisampleFBO); >- >- if (error) { >- // ANGLE detected a failure during the ReadnPixelsRobustANGLE operation. Surface this in the >- // synthetic error list, and skip the alpha channel fixup below. >- m_context->synthesizeGLError(error); >- return; >- } >- >-#if PLATFORM(MAC) || PLATFORM(IOS_FAMILY) >- if (!readingToPixelBufferObject && !attrs.alpha && (format == GraphicsContextGL::RGBA || format == GraphicsContextGL::BGRA) && (type == GraphicsContextGL::UNSIGNED_BYTE) && (state.boundReadFBO == m_context->m_fbo || (attrs.antialias && state.boundReadFBO == m_context->m_multisampleFBO))) >- wipeAlphaChannelFromPixels(width, height, static_cast<unsigned char*>(data)); >-#else >- UNUSED_PARAM(readingToPixelBufferObject); >-#endif >-} >- >-void ExtensionsGLANGLE::getnUniformfvRobustANGLE(GCGLuint program, int location, GCGLsizei bufSize, GCGLsizei *length, GCGLfloat *params) >+void ExtensionsGLANGLE::getnUniformfvRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei *length, GCGLfloat *params) > { > if (!m_context->makeContextCurrent()) > return; >@@ -512,7 +445,7 @@ void ExtensionsGLANGLE::getnUniformfvRobustANGLE(GCGLuint program, int location, > gl::GetnUniformfvRobustANGLE(program, location, bufSize, length, params); > } > >-void ExtensionsGLANGLE::getnUniformivRobustANGLE(GCGLuint program, int location, GCGLsizei bufSize, GCGLsizei *length, GCGLint *params) >+void ExtensionsGLANGLE::getnUniformivRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei *length, GCGLint *params) > { > if (!m_context->makeContextCurrent()) > return; >@@ -520,7 +453,7 @@ void ExtensionsGLANGLE::getnUniformivRobustANGLE(GCGLuint program, int location, > gl::GetnUniformivRobustANGLE(program, location, bufSize, length, params); > } > >-void ExtensionsGLANGLE::getnUniformuivRobustANGLE(GCGLuint program, int location, GCGLsizei bufSize, GCGLsizei *length, GCGLuint *params) >+void ExtensionsGLANGLE::getnUniformuivRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei *length, GCGLuint *params) > { > if (!m_context->makeContextCurrent()) > return; >diff --git a/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h b/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h >index a7731dfd20c5f03a335903faa6e38ff72f4b2323..cbf498bd7c1a1ab9aa6b70fb5d38ac4b92fb0358 100644 >--- a/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h >+++ b/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h >@@ -56,21 +56,12 @@ public: > > String getTranslatedShaderSourceANGLE(PlatformGLObject) override; > >- void blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter) override; >- void renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height) override; >+ void blitFramebufferANGLE(GCGLint srcX0, GCGLint srcY0, GCGLint srcX1, GCGLint srcY1, GCGLint dstX0, GCGLint dstY0, GCGLint dstX1, GCGLint dstY1, GCGLbitfield mask, GCGLenum filter) override; >+ void renderbufferStorageMultisampleANGLE(GCGLenum target, GCGLsizei samples, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) override; > >- void drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) override; >- void drawElementsInstanced(GCGLenum mode, GCGLsizei count, GCGLenum type, long long offset, GCGLsizei primcount) override; >- void vertexAttribDivisor(GCGLuint index, GCGLuint divisor) override; >- >- bool isNVIDIA() override { return m_isNVIDIA; } >- bool isAMD() override { return m_isAMD; } >- bool isIntel() override { return m_isIntel; } >- bool isImagination() override { return m_isImagination; } >- String vendor() override { return m_vendor; } >- >- bool requiresBuiltInFunctionEmulation() override { return m_requiresBuiltInFunctionEmulation; } >- bool requiresRestrictedMaximumTextureSize() override { return m_requiresRestrictedMaximumTextureSize; } >+ void drawArraysInstancedANGLE(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) override; >+ void drawElementsInstancedANGLE(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLvoidptr offset, GCGLsizei primcount) override; >+ void vertexAttribDivisorANGLE(GCGLuint index, GCGLuint divisor) override; > > // GL_ANGLE_robust_client_memory > void readPixelsRobustANGLE(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLsizei *length, GCGLsizei *columns, GCGLsizei *rows, void *pixels) override; >@@ -97,7 +88,6 @@ public: > void getTexLevelParameterfvRobustANGLE(GCGLenum target, GCGLint level, GCGLenum pname, GCGLsizei bufSize, GCGLsizei *length, GCGLfloat *params) override; > > void getPointervRobustANGLERobustANGLE(GCGLenum pname, GCGLsizei bufSize, GCGLsizei *length, void **params) override; >- void readnPixelsRobustANGLE(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLsizei *length, GCGLsizei *columns, GCGLsizei *rows, void *data, bool readingToPixelBufferObject) override; > void getnUniformfvRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei *length, GCGLfloat *params) override; > void getnUniformivRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei *length, GCGLint *params) override; > void getnUniformuivRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei *length, GCGLuint *params) override; >@@ -130,18 +120,8 @@ private: > // Weak pointer back to GraphicsContextGLOpenGL. > GraphicsContextGLOpenGL* m_context; > >- bool m_isNVIDIA; >- bool m_isAMD; >- bool m_isIntel; >- bool m_isImagination; >- bool m_requiresBuiltInFunctionEmulation; >- bool m_requiresRestrictedMaximumTextureSize; >- > bool m_useIndexedGetString { false }; > >- String m_vendor; >- String m_renderer; >- > // Whether the WebGL 1.0-related floating-point renderability extensions have been enabled. > bool m_webglColorBufferFloatRGB { false }; > bool m_webglColorBufferFloatRGBA { false }; >diff --git a/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp b/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp >index 127a3b8dba3c3f44cd765dd8fc711cdd878de9a4..1d604b71d4814f597c2c2fc89edc9648dc13c766 100644 >--- a/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp >+++ b/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp >@@ -443,32 +443,53 @@ ExtensionsGL& GraphicsContextGLOpenGL::getExtensions() > return *m_extensions; > } > >-void GraphicsContextGLOpenGL::readPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, void* data) >+void GraphicsContextGLOpenGL::readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<GCGLvoid> data) >+{ >+ readnPixelsImpl(x, y, width, height, format, type, data.bufSize, nullptr, nullptr, nullptr, data.data, false); >+} >+ >+void GraphicsContextGLOpenGL::readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset) >+{ >+ readnPixelsImpl(x, y, width, height, format, type, 0, nullptr, nullptr, nullptr, reinterpret_cast<GCGLvoid*>(offset), true); >+} >+ >+void GraphicsContextGLOpenGL::readnPixelsImpl(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLsizei* length, GCGLsizei* columns, GCGLsizei* rows, GCGLvoid* data, bool readingToPixelBufferObject) > { >- // FIXME: remove the two glFlush calls when the driver bug is fixed, i.e., >- // all previous rendering calls should be done before reading pixels. > if (!makeContextCurrent()) > return; > >+ // FIXME: remove the two glFlush calls when the driver bug is fixed, i.e., >+ // all previous rendering calls should be done before reading pixels. > gl::Flush(); > auto attrs = contextAttributes(); > GCGLenum framebufferTarget = m_isForWebGL2 ? GraphicsContextGL::READ_FRAMEBUFFER : GraphicsContextGL::FRAMEBUFFER; >- if (attrs.antialias && m_state.boundReadFBO == m_multisampleFBO) { >+ const GraphicsContextGLOpenGL::GraphicsContextGLState& state = m_state; >+ if (attrs.antialias && state.boundReadFBO == m_multisampleFBO) { > resolveMultisamplingIfNecessary(IntRect(x, y, width, height)); > gl::BindFramebuffer(framebufferTarget, m_fbo); > gl::Flush(); > } >- gl::ReadPixels(x, y, width, height, format, type, data); >- if (attrs.antialias && m_state.boundReadFBO == m_multisampleFBO) >+ moveErrorsToSyntheticErrorList(); >+ gl::ReadnPixelsRobustANGLE(x, y, width, height, format, type, bufSize, length, columns, rows, data); >+ GLenum error = gl::GetError(); >+ if (attrs.antialias && state.boundReadFBO == m_multisampleFBO) > gl::BindFramebuffer(framebufferTarget, m_multisampleFBO); > >+ if (error) { >+ // ANGLE detected a failure during the ReadnPixelsRobustANGLE operation. Surface this in the >+ // synthetic error list, and skip the alpha channel fixup below. >+ synthesizeGLError(error); >+ return; >+ } >+ > #if PLATFORM(MAC) || PLATFORM(IOS_FAMILY) >- if (!attrs.alpha && (format == GraphicsContextGL::RGBA || format == GraphicsContextGL::BGRA) && (type == GraphicsContextGL::UNSIGNED_BYTE) && (m_state.boundReadFBO == m_fbo || (attrs.antialias && m_state.boundReadFBO == m_multisampleFBO))) >+ if (!readingToPixelBufferObject && !attrs.alpha && (format == GraphicsContextGL::RGBA || format == GraphicsContextGL::BGRA) && (type == GraphicsContextGL::UNSIGNED_BYTE) && (state.boundReadFBO == m_fbo || (attrs.antialias && state.boundReadFBO == m_multisampleFBO))) > wipeAlphaChannelFromPixels(width, height, static_cast<unsigned char*>(data)); >+#else >+ UNUSED_PARAM(readingToPixelBufferObject); > #endif > } > >- > // The contents of GraphicsContextGLOpenGLCommon follow, ported to use ANGLE. > > void GraphicsContextGLOpenGL::validateDepthStencil(const char* packedDepthStencilExtension) >@@ -898,20 +919,16 @@ void GraphicsContextGLOpenGL::bufferSubData(GCGLenum target, GCGLintptr offset, > gl::BufferSubData(target, offset, data.bufSize, data.data); > } > >-void* GraphicsContextGLOpenGL::mapBufferRange(GCGLenum target, GCGLintptr offset, GCGLsizeiptr length, GCGLbitfield access) >+void GraphicsContextGLOpenGL::getBufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<GCGLvoid> data) > { > if (!makeContextCurrent()) >- return nullptr; >- >- return gl::MapBufferRange(target, offset, length, access); >-} >- >-GCGLboolean GraphicsContextGLOpenGL::unmapBuffer(GCGLenum target) >-{ >- if (!makeContextCurrent()) >- return GL_FALSE; >- >- return gl::UnmapBuffer(target); >+ return; >+ GCGLvoid* ptr = gl::MapBufferRange(target, offset, data.bufSize, GraphicsContextGL::MAP_READ_BIT); >+ if (!ptr) >+ return; >+ memcpy(data.data, ptr, data.bufSize); >+ if (!gl::UnmapBuffer(target)) >+ synthesizeGLError(GraphicsContextGL::INVALID_OPERATION); > } > > void GraphicsContextGLOpenGL::copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLintptr readOffset, GCGLintptr writeOffset, GCGLsizeiptr size) >@@ -1008,14 +1025,15 @@ void GraphicsContextGLOpenGL::compressedTexSubImage3D(GCGLenum target, int level > compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(offset), 0)); > } > >-void GraphicsContextGLOpenGL::getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname, Vector<GCGLint>& params) >+Vector<GCGLint> GraphicsContextGLOpenGL::getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname) > { >+ Vector<GCGLint> result(uniformIndices.size(), 0); > ASSERT(program); > if (!makeContextCurrent()) >- return; >- >+ return result; > >- gl::GetActiveUniformsiv(program, uniformIndices.size(), uniformIndices.data(), pname, params.data()); >+ gl::GetActiveUniformsiv(program, uniformIndices.size(), uniformIndices.data(), pname, result.data()); >+ return result; > } > > GCGLenum GraphicsContextGLOpenGL::checkFramebufferStatus(GCGLenum target) >@@ -2101,22 +2119,6 @@ GCGLint GraphicsContextGLOpenGL::getUniformLocation(PlatformGLObject program, co > return gl::GetUniformLocation(program, name.utf8().data()); > } > >-void GraphicsContextGLOpenGL::getVertexAttribfv(GCGLuint index, GCGLenum pname, GCGLSpan<GCGLfloat> value) >-{ >- if (!makeContextCurrent()) >- return; >- >- gl::GetVertexAttribfvRobustANGLE(index, pname, value.bufSize, nullptr, value.data); >-} >- >-void GraphicsContextGLOpenGL::getVertexAttribiv(GCGLuint index, GCGLenum pname, GCGLSpan<GCGLint> value) >-{ >- if (!makeContextCurrent()) >- return; >- >- gl::GetVertexAttribivRobustANGLE(index, pname, value.bufSize, nullptr, value.data); >-} >- > GCGLsizeiptr GraphicsContextGLOpenGL::getVertexAttribOffset(GCGLuint index, GCGLenum pname) > { > if (!makeContextCurrent()) >@@ -2392,12 +2394,13 @@ void GraphicsContextGLOpenGL::endQuery(GCGLenum target) > gl::EndQuery(target); > } > >-void GraphicsContextGLOpenGL::getQueryObjectuiv(GCGLuint id, GCGLenum pname, GCGLuint* params) >+GCGLuint GraphicsContextGLOpenGL::getQueryObjectui(GCGLuint id, GCGLenum pname) > { >+ GCGLuint value = 0; > if (!makeContextCurrent()) >- return; >- >- gl::GetQueryObjectuiv(id, pname, params); >+ return value; >+ gl::GetQueryObjectuivRobustANGLE(id, pname, 1, nullptr, &value); >+ return value; > } > > // Transform Feedback Functions >@@ -2839,20 +2842,24 @@ void GraphicsContextGLOpenGL::samplerParameterf(PlatformGLObject sampler, GCGLen > gl::SamplerParameterf(sampler, pname, param); > } > >-void GraphicsContextGLOpenGL::getSamplerParameterfv(PlatformGLObject sampler, GCGLenum pname, GCGLfloat* value) >+GCGLfloat GraphicsContextGLOpenGL::getSamplerParameterf(PlatformGLObject sampler, GCGLenum pname) > { >+ GCGLfloat value = 0.f; > if (!makeContextCurrent()) >- return; >+ return value; > >- gl::GetSamplerParameterfv(sampler, pname, value); >+ gl::GetSamplerParameterfvRobustANGLE(sampler, pname, 1, nullptr, &value); >+ return value; > } > >-void GraphicsContextGLOpenGL::getSamplerParameteriv(PlatformGLObject sampler, GCGLenum pname, GCGLint* value) >+GCGLint GraphicsContextGLOpenGL::getSamplerParameteri(PlatformGLObject sampler, GCGLenum pname) > { >+ GCGLint value = 0; > if (!makeContextCurrent()) >- return; >+ return value; > >- gl::GetSamplerParameteriv(sampler, pname, value); >+ gl::GetSamplerParameterivRobustANGLE(sampler, pname, 1, nullptr, &value); >+ return value; > } > > GCGLsync GraphicsContextGLOpenGL::fenceSync(GCGLenum condition, GCGLbitfield flags) >@@ -2895,12 +2902,14 @@ void GraphicsContextGLOpenGL::waitSync(GCGLsync sync, GCGLbitfield flags, GCGLin > gl::WaitSync(sync, flags, timeout); > } > >-void GraphicsContextGLOpenGL::getSynciv(GCGLsync sync, GCGLenum pname, GCGLsizei bufSize, GCGLint *value) >+GCGLint GraphicsContextGLOpenGL::getSynci(GCGLsync sync, GCGLenum pname) > { >+ GCGLint value = 0; > if (!makeContextCurrent()) >- return; >+ return value; > >- gl::GetSynciv(sync, pname, bufSize, nullptr, value); >+ gl::GetSynciv(sync, pname, 1, nullptr, &value); >+ return value; > } > > void GraphicsContextGLOpenGL::pauseTransformFeedback() >diff --git a/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp b/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..f73597f4753d0bec1d02e7d5fcfdc643a983c88d >--- /dev/null >+++ b/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.cpp >@@ -0,0 +1,37 @@ >+/* >+ * Copyright (C) 2009, 2014-2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "GraphicsContextGLIOSurfaceSwapChain.h" >+ >+#if ENABLE(GRAPHICS_CONTEXT_GL) && PLATFORM(COCOA) >+ >+namespace WebCore { >+ >+GraphicsContextGLIOSurfaceSwapChain::~GraphicsContextGLIOSurfaceSwapChain() = default; >+ >+} >+ >+#endif >diff --git a/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h b/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h >new file mode 100644 >index 0000000000000000000000000000000000000000..99e88c2f99b1caa58117c73911a51b67dde632bc >--- /dev/null >+++ b/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLIOSurfaceSwapChain.h >@@ -0,0 +1,73 @@ >+/* >+ * Copyright (C) 2009, 2014-2019 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(GRAPHICS_CONTEXT_GL) && PLATFORM(COCOA) >+ >+#include "IOSurface.h" >+#include <memory> >+ >+namespace WebCore { >+ >+// An interface for implementing front buffer management of a 3-buffering swap >+// chain of IOSurfaces. >+// The implementor will own the IOSurfaces it uses for display. >+// The client may attach metadata to each IOSurface and will receive the metadata >+// back once the IOSurface has been displayed. However, the client may not neccessarily >+// be able to obtain the IOSurface itself for reuse. >+// Example use of the metadata is to use EGLSurface binding as the metadata. This way >+// when the display client is done with the IOSurface display, the client can continue using >+// the existing binding obtained through the buffer recycle logic. >+class WEBCORE_EXPORT GraphicsContextGLIOSurfaceSwapChain { >+public: >+ virtual ~GraphicsContextGLIOSurfaceSwapChain(); >+ struct Buffer { >+ std::unique_ptr<WebCore::IOSurface> surface; // The actual contents. >+ void* handle { nullptr }; // Producer specific metadata handle (such as EGLSurface). >+ }; >+ // Returns the metadata handle of last unused contents buffer. >+ // Client may recieve back also the ownership of the contents surface, in case it is available at the >+ // time of the call. >+ // Returns either: >+ // - Empty buffer if no buffer has been submitted. >+ // - Buffer with empty surface and non-empty metadata handle if the recycled buffer was available >+ // but the surface is still in use. >+ // - Surface and handle. >+ virtual Buffer recycleBuffer() = 0; >+ >+ // Prepares the target for display with a contents buffer. >+ // Client transfers the ownership of the IOSurface surface in the `buffer`. >+ virtual void present(Buffer) = 0; >+ >+ // Detaches the client and returns the current contents buffer metadata handle. >+ // The if multiple buffers have been submitted, recycleBuffer must have been called before calling >+ // this. >+ virtual void* detachClient() = 0; >+}; >+ >+} >+ >+#endif >diff --git a/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm b/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm >index 2e1c799e82853b320b8ceddd4a6fe5e504a9d89c..77ca200bd7ffefed398f912a79d4251346bf7d24 100644 >--- a/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm >+++ b/Source/WebCore/platform/graphics/cocoa/GraphicsContextGLOpenGLCocoa.mm >@@ -20,7 +20,7 @@ > * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY > * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > > #import "config.h" >@@ -30,6 +30,7 @@ > > #import "ExtensionsGLANGLE.h" > #import "GraphicsContextGLANGLEUtilities.h" >+#import "GraphicsContextGLIOSurfaceSwapChain.h" > #import "GraphicsContextGLOpenGLManager.h" > #import "HostWindow.h" > #import "Logging.h" >@@ -81,7 +82,7 @@ static EGLDisplay InitializeEGLDisplay() > EGLint majorVersion = 0; > EGLint minorVersion = 0; > EGLDisplay display; >- bool shouldInitializeWithVolatileContextSupport = !isInWebProcess(); >+ bool shouldInitializeWithVolatileContextSupport = !(isInWebProcess() || isInGPUProcess()); > if (shouldInitializeWithVolatileContextSupport) { > // For WK1 type APIs we need to set "volatile platform context" for specific > // APIs, since client code will be able to override the thread-global context >@@ -134,7 +135,7 @@ RefPtr<GraphicsContextGLOpenGL> GraphicsContextGLOpenGL::create(GraphicsContextG > if (GraphicsContextGLOpenGLManager::sharedManager().hasTooManyContexts()) > return nullptr; > >- RefPtr<GraphicsContextGLOpenGL> context = adoptRef(new GraphicsContextGLOpenGL(attrs, hostWindow, destination)); >+ RefPtr<GraphicsContextGLOpenGL> context = adoptRef(new GraphicsContextGLOpenGL(attrs, hostWindow, nullptr, nullptr)); > > if (!context->m_contextObj) > return nullptr; >@@ -147,13 +148,18 @@ RefPtr<GraphicsContextGLOpenGL> GraphicsContextGLOpenGL::create(GraphicsContextG > Ref<GraphicsContextGLOpenGL> GraphicsContextGLOpenGL::createShared(GraphicsContextGLOpenGL& sharedContext) > { > auto hostWindow = GraphicsContextGLOpenGLManager::sharedManager().hostWindowForContext(&sharedContext); >- auto context = adoptRef(*new GraphicsContextGLOpenGL(sharedContext.contextAttributes(), hostWindow, sharedContext.destination(), &sharedContext)); >+ auto context = adoptRef(*new GraphicsContextGLOpenGL(sharedContext.contextAttributes(), hostWindow, &sharedContext, nullptr)); > > GraphicsContextGLOpenGLManager::sharedManager().addContext(context.ptr(), hostWindow); > > return context; > } > >+Ref<GraphicsContextGLOpenGL> GraphicsContextGLOpenGL::createForGPUProcess(const GraphicsContextGLAttributes& attrs, GraphicsContextGLIOSurfaceSwapChain& swapChain) >+{ >+ return adoptRef(*new GraphicsContextGLOpenGL(attrs, nullptr, nullptr, &swapChain)); >+} >+ > #if PLATFORM(MAC) // FIXME: This probably should be just enabled - see <rdar://53062794>. > > static void setGPUByRegistryID(CGLContextObj contextObj, CGLPixelFormatObj pixelFormatObj, IORegistryGPUID preferredGPUID) >@@ -204,8 +210,8 @@ static void setGPUByRegistryID(CGLContextObj contextObj, CGLPixelFormatObj pixel > > #endif // PLATFORM(MAC) > >-GraphicsContextGLOpenGL::GraphicsContextGLOpenGL(GraphicsContextGLAttributes attrs, HostWindow* hostWindow, GraphicsContextGL::Destination destination, GraphicsContextGLOpenGL* sharedContext) >- : GraphicsContextGL(attrs, destination, sharedContext) >+GraphicsContextGLOpenGL::GraphicsContextGLOpenGL(GraphicsContextGLAttributes attrs, HostWindow* hostWindow, GraphicsContextGLOpenGL* sharedContext, GraphicsContextGLIOSurfaceSwapChain* swapChain) >+ : GraphicsContextGL(attrs, Destination::Offscreen, sharedContext) > { > m_isForWebGL2 = attrs.isWebGL2; > >@@ -293,26 +299,28 @@ GraphicsContextGLOpenGL::GraphicsContextGLOpenGL(GraphicsContextGLAttributes att > if (m_isForWebGL2) > gl::Enable(GraphicsContextGL::PRIMITIVE_RESTART_FIXED_INDEX); > >+ Vector<ASCIILiteral, 4> requiredExtensions; >+ if (m_isForWebGL2) { >+ // For WebGL 2.0 occlusion queries to work. >+ requiredExtensions.append("GL_EXT_occlusion_query_boolean"_s); >+ } > #if PLATFORM(MAC) || PLATFORM(MACCATALYST) >- ExtensionsGL& extensions = getExtensions(); >- > if (!needsEAGLOnMac()) { >- static constexpr const char* requiredExtensions[] = { >- "GL_ANGLE_texture_rectangle", // For IOSurface-backed textures. >- "GL_EXT_texture_format_BGRA8888", // For creating the EGL surface from an IOSurface. >- }; >- >- for (size_t i = 0; i < WTF_ARRAY_LENGTH(requiredExtensions); ++i) { >- if (!extensions.supports(requiredExtensions[i])) { >- LOG(WebGL, "Missing required extension. %s", requiredExtensions[i]); >- return; >- } >+ // For IOSurface-backed textures. >+ requiredExtensions.append("GL_ANGLE_texture_rectangle"_s); >+ // For creating the EGL surface from an IOSurface. >+ requiredExtensions.append("GL_EXT_texture_format_BGRA8888"_s); >+ } > >- extensions.ensureEnabled(requiredExtensions[i]); >+#endif // PLATFORM(MAC) || PLATFORM(MACCATALYST) >+ ExtensionsGL& extensions = getExtensions(); >+ for (auto& extension : requiredExtensions) { >+ if (!extensions.supports(extension)) { >+ LOG(WebGL, "Missing required extension. %s", extension.characters()); >+ return; > } >+ extensions.ensureEnabled(extension); > } >-#endif // PLATFORM(MAC) || PLATFORM(MACCATALYST) >- > #if PLATFORM(MAC) > // FIXME: It's unclear if MACCATALYST should take these steps as well, but that > // would require the PlatformScreenMac code to be exposed to Catalyst too. >@@ -331,13 +339,17 @@ GraphicsContextGLOpenGL::GraphicsContextGLOpenGL(GraphicsContextGLAttributes att > validateAttributes(); > attrs = contextAttributes(); // They may have changed during validation. > >- // Create the WebGLLayer >- BEGIN_BLOCK_OBJC_EXCEPTIONS >- m_webGLLayer = adoptNS([[WebGLLayer alloc] initWithDevicePixelRatio:attrs.devicePixelRatio contentsOpaque:!attrs.alpha]); >+ if (swapChain) >+ m_swapChain = swapChain; >+ else { >+ BEGIN_BLOCK_OBJC_EXCEPTIONS >+ m_webGLLayer = adoptNS([[WebGLLayer alloc] initWithDevicePixelRatio:attrs.devicePixelRatio contentsOpaque:!attrs.alpha]); > #ifndef NDEBUG >- [m_webGLLayer setName:@"WebGL Layer"]; >+ [m_webGLLayer setName:@"WebGL Layer"]; > #endif >- END_BLOCK_OBJC_EXCEPTIONS >+ END_BLOCK_OBJC_EXCEPTIONS >+ m_swapChain = &[m_webGLLayer swapChain]; >+ } > > // Create the texture that will be used for the framebuffer. > GLenum textureTarget = IOSurfaceTextureTarget(); >@@ -406,13 +418,12 @@ GraphicsContextGLOpenGL::~GraphicsContextGLOpenGL() > if (m_preserveDrawingBufferFBO) > gl::DeleteFramebuffers(1, &m_preserveDrawingBufferFBO); > } >- if (m_displayBufferPbuffer) >+ if (m_displayBufferPbuffer) { > EGL_DestroySurface(m_displayObj, m_displayBufferPbuffer); >- if (m_webGLLayer) { >- auto recycledBuffer = [m_webGLLayer recycleBuffer]; >+ auto recycledBuffer = m_swapChain->recycleBuffer(); > if (recycledBuffer.handle) > EGL_DestroySurface(m_displayObj, recycledBuffer.handle); >- auto contentsHandle = [m_webGLLayer detachClient]; >+ auto contentsHandle = m_swapChain->detachClient(); > if (contentsHandle) > EGL_DestroySurface(m_displayObj, contentsHandle); > } >@@ -575,11 +586,16 @@ bool GraphicsContextGLOpenGL::reshapeDisplayBufferBacking() > m_displayBufferPbuffer = EGL_NO_SURFACE; > } > // Reset the future recycled buffer now, because it most likely will not be reusable at the time it will be reused. >- auto recycledBuffer = [m_webGLLayer recycleBuffer]; >+ auto recycledBuffer = m_swapChain->recycleBuffer(); > if (recycledBuffer.handle) > EGL_DestroySurface(m_displayObj, recycledBuffer.handle); > recycledBuffer.surface.reset(); >+ return allocateAndBindDisplayBufferBacking(); >+} > >+bool GraphicsContextGLOpenGL::allocateAndBindDisplayBufferBacking() >+{ >+ ASSERT(!getInternalFramebufferSize().isEmpty()); > auto backing = WebCore::IOSurface::create(getInternalFramebufferSize(), WebCore::sRGBColorSpaceRef()); > if (!backing) > return false; >@@ -637,7 +653,7 @@ bool GraphicsContextGLOpenGL::allowOfflineRenderers() const > // for OpenGL to decide which GPU is connected to a display (online/offline). > // OpenGL will then consider all GPUs, or renderers, as offline, which means > // all offline renderers need to be considered when finding a pixel format. >- // In WebKit legacy, there will still be a WindowServer connection, and >+ // In WebKit legacy, there will still be a WindwServer connection, and > // m_displayMask will not be set in this case. > if (primaryOpenGLDisplayMask()) > return true; >@@ -646,12 +662,12 @@ bool GraphicsContextGLOpenGL::allowOfflineRenderers() const > // and MAC/MACCATALYST and OPENGL/OPENGLES. > return true; > #endif >- >+ > #if HAVE(APPLE_GRAPHICS_CONTROL) > if (hasLowAndHighPowerGPUs()) > return true; > #endif >- >+ > return false; > } > >@@ -683,10 +699,10 @@ void GraphicsContextGLOpenGL::prepareForDisplay() > // The IOSurface will be used from other graphics subsystem, so flush GL commands. > gl::Flush(); > >- auto recycledBuffer = [m_webGLLayer recycleBuffer]; >+ auto recycledBuffer = m_swapChain->recycleBuffer(); > > EGL_ReleaseTexImage(m_displayObj, m_displayBufferPbuffer, EGL_BACK_BUFFER); >- [m_webGLLayer prepareForDisplayWithContents: {WTFMove(m_displayBufferBacking), m_displayBufferPbuffer}]; >+ m_swapChain->present({ WTFMove(m_displayBufferBacking), m_displayBufferPbuffer }); > m_displayBufferPbuffer = EGL_NO_SURFACE; > > bool hasNewBacking = false; >@@ -700,7 +716,7 @@ void GraphicsContextGLOpenGL::prepareForDisplay() > > // Error will be handled by next call to makeContextCurrent() which will notice lack of display buffer. > if (!hasNewBacking) >- reshapeDisplayBufferBacking(); >+ allocateAndBindDisplayBufferBacking(); > > markLayerComposited(); > } >diff --git a/Source/WebCore/platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm b/Source/WebCore/platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm >new file mode 100644 >index 0000000000000000000000000000000000000000..0c414015b7b0f34bb28be345509c7429e31daa3c >--- /dev/null >+++ b/Source/WebCore/platform/graphics/cocoa/RemoteGraphicsContextGLProxyBaseCocoa.mm >@@ -0,0 +1,67 @@ >+/* >+ * Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#import "config.h" >+#import "RemoteGraphicsContextGLProxyBase.h" >+ >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) && PLATFORM(COCOA) >+ >+#import "GraphicsContextGLIOSurfaceSwapChain.h" >+#import "WebGLLayer.h" >+#import <wtf/BlockObjCExceptions.h> >+ >+namespace WebCore { >+ >+void RemoteGraphicsContextGLProxyBase::platformInitialize() >+{ >+ auto attrs = contextAttributes(); >+ BEGIN_BLOCK_OBJC_EXCEPTIONS >+ m_webGLLayer = adoptNS([[WebGLLayer alloc] initWithDevicePixelRatio:attrs.devicePixelRatio contentsOpaque:!attrs.alpha]); >+#ifndef NDEBUG >+ [m_webGLLayer setName:@"WebGL Layer"]; >+#endif >+ END_BLOCK_OBJC_EXCEPTIONS >+} >+ >+ >+PlatformLayer* RemoteGraphicsContextGLProxyBase::platformLayer() const >+{ >+ return m_webGLLayer.get(); >+} >+ >+#if ENABLE(VIDEO) && USE(AVFOUNDATION) >+GraphicsContextGLCV* RemoteGraphicsContextGLProxyBase::asCV() >+{ >+ return nullptr; >+} >+#endif >+ >+GraphicsContextGLIOSurfaceSwapChain& RemoteGraphicsContextGLProxyBase::platformSwapChain() >+{ >+ return [m_webGLLayer swapChain]; >+} >+ >+} >+#endif >diff --git a/Source/WebCore/platform/graphics/cocoa/WebGLLayer.h b/Source/WebCore/platform/graphics/cocoa/WebGLLayer.h >index 14b01e705f205301c7c97cf66e71a08bbf41e705..7fe88a2ff4ce0f559d59dc1cd952a3a7ea880962 100644 >--- a/Source/WebCore/platform/graphics/cocoa/WebGLLayer.h >+++ b/Source/WebCore/platform/graphics/cocoa/WebGLLayer.h >@@ -23,52 +23,22 @@ > * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#import "IOSurface.h" >+#import "GraphicsContextGLIOSurfaceSwapChain.h" > #import <QuartzCore/QuartzCore.h> >+#import <memory> > #import <wtf/NakedPtr.h> > >-namespace WebCore { >-struct WebGLLayerBuffer { >- std::unique_ptr<WebCore::IOSurface> surface; // The actual contents. >- void* handle { nullptr }; // Client specific metadata handle (such as EGLSurface). >-}; >-} >- > ALLOW_DEPRECATED_DECLARATIONS_BEGIN > > // A layer class implementing front buffer management of a 3-buffering swap > // chain of IOSurfaces. >-// The layer will own the IOSurfaces it uses for display. >-// The client may attach metadata to each IOSurface and will receive the metadata >-// back once the IOSurface has been displayed. However, the client may not neccessarily >-// be able to obtain the IOSurface itself for reuse. >-// Example use of the metadata is to use EGLSurface binding as the metadata. This way >-// when the WebGLLayer is done with the IOSurface display, the client can continue using >-// the existing binding obtained through the buffer recycle logic. > @interface WebGLLayer : CALayer > > - (id)initWithDevicePixelRatio:(float)devicePixelRatio contentsOpaque:(bool)contentsOpaque; > > - (CGImageRef)copyImageSnapshotWithColorSpace:(CGColorSpaceRef)colorSpace; > >-// Returns the metadata handle of last unused contents buffer. >-// Client may recieve back also the ownership of the contents surface, in case it is available at the >-// time of the call. >-// Returns either: >-// - Empty buffer if no buffer has been submitted. >-// - Buffer with empty surface and non-empty metadata handle if the recycled buffer was available >-// but the surface is still in use. >-// - Surface and handle. >-- (WebCore::WebGLLayerBuffer)recycleBuffer; >- >-// Prepares the layer for display with a contents buffer. >-// Client transfers the ownership of the IOSurface surface in the `buffer`. >-- (void)prepareForDisplayWithContents:(WebCore::WebGLLayerBuffer)buffer; >- >-// Detaches the client and returns the current contents buffer metadata handle. >-// The if multiple buffers have been submitted, recycleBuffer must have been called before calling >-// this. >-- (void*)detachClient; >+- (WebCore::GraphicsContextGLIOSurfaceSwapChain&) swapChain; > > @end > >diff --git a/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm b/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm >index c8f4e79f7312eaa6ab04468083ea8d0c8befa3bc..168fd5f6c84237bdf8ab9cbbca640739505c9203 100644 >--- a/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm >+++ b/Source/WebCore/platform/graphics/cocoa/WebGLLayer.mm >@@ -20,7 +20,7 @@ > * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY > * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > > #import "config.h" >@@ -32,13 +32,39 @@ > #import "GraphicsLayerCA.h" > #import "PlatformCALayer.h" > #import <pal/spi/cocoa/QuartzCoreSPI.h> >-#import <wtf/RetainPtr.h> >+#import <wtf/Optional.h> >+ >+class WebGLLayerSwapChain final : public WebCore::GraphicsContextGLIOSurfaceSwapChain { >+public: >+ explicit WebGLLayerSwapChain(WebGLLayer* layer) : m_layer(layer) { }; >+ ~WebGLLayerSwapChain() override = default; >+ void present(Buffer) override; >+ Buffer recycleBuffer() override >+ { >+ if (m_spareBuffer.surface) { >+ if (m_spareBuffer.surface->isInUse()) >+ m_spareBuffer.surface.reset(); >+ return WTFMove(m_spareBuffer); >+ } >+ return { }; >+ } >+ void* detachClient() override >+ { >+ ASSERT(!m_spareBuffer.surface); >+ void* result = m_displayBuffer.handle; >+ m_displayBuffer.handle = nullptr; >+ return result; >+ } >+ WebCore::IOSurface* displaySurface() { return m_displayBuffer.surface.get(); } >+private: >+ Buffer m_displayBuffer; >+ Buffer m_spareBuffer; >+ WebGLLayer* const m_layer; >+}; > > @implementation WebGLLayer { >- WebCore::WebGLLayerBuffer _contentsBuffer; >- WebCore::WebGLLayerBuffer _spareBuffer; >- > BOOL _preparedForDisplay; >+ Optional<WebGLLayerSwapChain> _swapChain; > } > > - (id)initWithDevicePixelRatio:(float)devicePixelRatio contentsOpaque:(bool)contentsOpaque >@@ -47,6 +73,7 @@ > self.transform = CATransform3DIdentity; > self.contentsOpaque = contentsOpaque; > self.contentsScale = devicePixelRatio; >+ _swapChain.emplace(self); > return self; > } > >@@ -73,30 +100,21 @@ > UNUSED_PARAM(colorSpace); > return nullptr; > } >- >-- (WebCore::WebGLLayerBuffer) recycleBuffer >+- (WebCore::GraphicsContextGLIOSurfaceSwapChain&) swapChain > { >- if (_spareBuffer.surface) { >- if (_spareBuffer.surface->isInUse()) >- _spareBuffer.surface.reset(); >- return WTFMove(_spareBuffer); >- } >- return { }; >+ return _swapChain.value(); > } > >-- (void)prepareForDisplayWithContents:(WebCore::WebGLLayerBuffer) buffer >+- (void)prepareForDisplay > { >- ASSERT(!_spareBuffer.surface); >- _spareBuffer = WTFMove(_contentsBuffer); >- _contentsBuffer = WTFMove(buffer); > [self setNeedsDisplay]; > _preparedForDisplay = YES; > } > > - (void)display > { >- if (_contentsBuffer.surface && _preparedForDisplay) { >- self.contents = _contentsBuffer.surface->asLayerContents(); >+ if (_swapChain->displaySurface() && _preparedForDisplay) { >+ self.contents = _swapChain->displaySurface()->asLayerContents(); > [self reloadValueForKeyPath:@"contents"]; > } > auto layer = WebCore::PlatformCALayer::platformCALayerForLayer((__bridge void*)self); >@@ -106,13 +124,14 @@ > _preparedForDisplay = NO; > } > >-- (void*) detachClient >+@end >+ >+void WebGLLayerSwapChain::present(Buffer buffer) > { >- ASSERT(!_spareBuffer.surface); >- void* result = _contentsBuffer.handle; >- _contentsBuffer.handle = nullptr; >- return result; >+ ASSERT(!m_spareBuffer.surface); >+ m_spareBuffer = WTFMove(m_displayBuffer); >+ m_displayBuffer = WTFMove(buffer); >+ [m_layer prepareForDisplay]; > } >-@end > > #endif // ENABLE(WEBGL) >diff --git a/Source/WebCore/platform/graphics/coreimage/FilterEffectRendererCoreImage.mm b/Source/WebCore/platform/graphics/coreimage/FilterEffectRendererCoreImage.mm >index 38de8552f1e46a1d370ae6dc2789a1ec6674ba12..99ad91652591873e0e83fe878925eca233a1a1c8 100644 >--- a/Source/WebCore/platform/graphics/coreimage/FilterEffectRendererCoreImage.mm >+++ b/Source/WebCore/platform/graphics/coreimage/FilterEffectRendererCoreImage.mm >@@ -36,6 +36,7 @@ > #import "FloatConversion.h" > #import "GraphicsContextCG.h" > #import "ImageBuffer.h" >+#import "Logging.h" > #import "PlatformImageBuffer.h" > #import "SourceGraphic.h" > #import <CoreImage/CIContext.h> >diff --git a/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGL.cpp b/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGL.cpp >index 7ec81cf4ae5772cae97288bc80e365646d627c7b..e707405598e32eb20f18cb313b157cb4ec0b665e 100644 >--- a/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGL.cpp >+++ b/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGL.cpp >@@ -48,7 +48,7 @@ ExtensionsGLOpenGL::ExtensionsGLOpenGL(GraphicsContextGLOpenGL* context, bool us > ExtensionsGLOpenGL::~ExtensionsGLOpenGL() = default; > > >-void ExtensionsGLOpenGL::blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter) >+void ExtensionsGLOpenGL::blitFramebufferANGLE(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter) > { > if (!m_context->makeContextCurrent()) > return; >@@ -56,7 +56,7 @@ void ExtensionsGLOpenGL::blitFramebuffer(long srcX0, long srcY0, long srcX1, lon > ::glBlitFramebufferEXT(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); > } > >-void ExtensionsGLOpenGL::renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height) >+void ExtensionsGLOpenGL::renderbufferStorageMultisampleANGLE(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height) > { > if (!m_context->makeContextCurrent()) > return; >@@ -222,7 +222,7 @@ void ExtensionsGLOpenGL::drawBuffersEXT(GCGLSpan<const GCGLenum> bufs) > #endif > } > >-void ExtensionsGLOpenGL::drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) >+void ExtensionsGLOpenGL::drawArraysInstancedANGLE(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) > { > if (!m_context->makeContextCurrent()) > return; >@@ -237,7 +237,7 @@ void ExtensionsGLOpenGL::drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLs > #endif > } > >-void ExtensionsGLOpenGL::drawElementsInstanced(GCGLenum mode, GCGLsizei count, GCGLenum type, long long offset, GCGLsizei primcount) >+void ExtensionsGLOpenGL::drawElementsInstancedANGLE(GCGLenum mode, GCGLsizei count, GCGLenum type, long long offset, GCGLsizei primcount) > { > if (!m_context->makeContextCurrent()) > return; >@@ -253,7 +253,7 @@ void ExtensionsGLOpenGL::drawElementsInstanced(GCGLenum mode, GCGLsizei count, G > #endif > } > >-void ExtensionsGLOpenGL::vertexAttribDivisor(GCGLuint index, GCGLuint divisor) >+void ExtensionsGLOpenGL::vertexAttribDivisorANGLE(GCGLuint index, GCGLuint divisor) > { > if (!m_context->makeContextCurrent()) > return; >diff --git a/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGL.h b/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGL.h >index 496289cea0e6a09d6db731f868b54993a44449a8..e4d355dea20e8a6ebea09c20e05101ca92427e32 100644 >--- a/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGL.h >+++ b/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGL.h >@@ -40,8 +40,8 @@ public: > virtual ~ExtensionsGLOpenGL(); > > // ExtensionsGL methods. >- void blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter) override; >- void renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height) override; >+ void blitFramebufferANGLE(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter) override; >+ void renderbufferStorageMultisampleANGLE(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height) override; > > PlatformGLObject createVertexArrayOES() override; > void deleteVertexArrayOES(PlatformGLObject) override; >@@ -52,9 +52,9 @@ public: > void popGroupMarkerEXT(void) override; > void drawBuffersEXT(GCGLSpan<const GCGLenum>) override; > >- void drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) override; >- void drawElementsInstanced(GCGLenum mode, GCGLsizei count, GCGLenum type, long long offset, GCGLsizei primcount) override; >- void vertexAttribDivisor(GCGLuint index, GCGLuint divisor) override; >+ void drawArraysInstancedANGLE(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) override; >+ void drawElementsInstancedANGLE(GCGLenum mode, GCGLsizei count, GCGLenum type, long long offset, GCGLsizei primcount) override; >+ void vertexAttribDivisorANGLE(GCGLuint index, GCGLuint divisor) override; > > protected: > bool supportsExtension(const WTF::String&) override; >diff --git a/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp b/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp >index 43b5161fba778f8fb4384b1bc2db38ecf6c483eb..ba7299db2f0419c3f8ca4f41ef6b5a7eb4ca74c1 100644 >--- a/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp >+++ b/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLCommon.cpp >@@ -366,7 +366,7 @@ void ExtensionsGLOpenGLCommon::getPointervRobustANGLERobustANGLE(GCGLenum, GCGLs > m_context->synthesizeGLError(GL_INVALID_OPERATION); > } > >-void ExtensionsGLOpenGLCommon::readnPixelsRobustANGLE(int, int, GCGLsizei, GCGLsizei, GCGLenum, GCGLenum, GCGLsizei, GCGLsizei *, GCGLsizei *, GCGLsizei *, void *, bool) >+void ExtensionsGLOpenGLCommon::readnPixelsRobustANGLE(int, int, GCGLsizei, GCGLsizei, GCGLenum, GCGLenum, GCGLsizei *, GCGLsizei *, GCGLsizei *, GCGLSpan<GCGLvoid>, bool) > { > m_context->synthesizeGLError(GL_INVALID_OPERATION); > } >diff --git a/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLCommon.h b/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLCommon.h >index bfe4521543ff4b272137f344cee4a22d8fb28c64..8acb9c8374f9acdcc60f311a48101aaef1998cbe 100644 >--- a/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLCommon.h >+++ b/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLCommon.h >@@ -93,7 +93,7 @@ public: > void getTexLevelParameterfvRobustANGLE(GCGLenum target, int level, GCGLenum pname, GCGLsizei bufSize, GCGLsizei *length, GCGLfloat *params) override; > > void getPointervRobustANGLERobustANGLE(GCGLenum pname, GCGLsizei bufSize, GCGLsizei *length, void **params) override; >- void readnPixelsRobustANGLE(int x, int y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLsizei *length, GCGLsizei *columns, GCGLsizei *rows, void *data, bool readingToPixelBufferObject) override; >+ void readnPixelsRobustANGLE(int x, int y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLsizei* length, GCGLsizei* columns, GCGLsizei* rows, GCGLSpan<GCGLvoid> data, bool readingToPixelBufferObject) override; > void getnUniformfvRobustANGLE(GCGLuint program, int location, GCGLsizei bufSize, GCGLsizei *length, GCGLfloat *params) override; > void getnUniformivRobustANGLE(GCGLuint program, int location, GCGLsizei bufSize, GCGLsizei *length, GCGLint *params) override; > void getnUniformuivRobustANGLE(GCGLuint program, int location, GCGLsizei bufSize, GCGLsizei *length, GCGLuint *params) override; >diff --git a/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.cpp b/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.cpp >index 36c3ef38f98b99af011506991427bacefcbb8ac3..427015ea791d8f784611758cebcec51760d11cee 100644 >--- a/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.cpp >+++ b/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.cpp >@@ -100,12 +100,12 @@ void ExtensionsGLOpenGLES::renderbufferStorageMultisampleIMG(unsigned long targe > m_context->synthesizeGLError(GL_INVALID_OPERATION); > } > >-void ExtensionsGLOpenGLES::blitFramebuffer(long /* srcX0 */, long /* srcY0 */, long /* srcX1 */, long /* srcY1 */, long /* dstX0 */, long /* dstY0 */, long /* dstX1 */, long /* dstY1 */, unsigned long /* mask */, unsigned long /* filter */) >+void ExtensionsGLOpenGLES::blitFramebufferANGLE(long /* srcX0 */, long /* srcY0 */, long /* srcX1 */, long /* srcY1 */, long /* dstX0 */, long /* dstY0 */, long /* dstX1 */, long /* dstY1 */, unsigned long /* mask */, unsigned long /* filter */) > { > notImplemented(); > } > >-void ExtensionsGLOpenGLES::renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height) >+void ExtensionsGLOpenGLES::renderbufferStorageMultisampleANGLE(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height) > { > if (!m_context->makeContextCurrent()) > return; >@@ -251,7 +251,7 @@ void ExtensionsGLOpenGLES::getnUniformivEXT(GCGLuint program, int location, GCGL > m_context->synthesizeGLError(GL_INVALID_OPERATION); > } > >-void ExtensionsGLOpenGLES::drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) >+void ExtensionsGLOpenGLES::drawArraysInstancedANGLE(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) > { > if (!m_glDrawArraysInstancedANGLE) { > m_context->synthesizeGLError(GL_INVALID_OPERATION); >@@ -264,7 +264,7 @@ void ExtensionsGLOpenGLES::drawArraysInstanced(GCGLenum mode, GCGLint first, GCG > m_glDrawArraysInstancedANGLE(mode, first, count, primcount); > } > >-void ExtensionsGLOpenGLES::drawElementsInstanced(GCGLenum mode, GCGLsizei count, GCGLenum type, long long offset, GCGLsizei primcount) >+void ExtensionsGLOpenGLES::drawElementsInstancedANGLE(GCGLenum mode, GCGLsizei count, GCGLenum type, long long offset, GCGLsizei primcount) > { > if (!m_glDrawElementsInstancedANGLE) { > m_context->synthesizeGLError(GL_INVALID_OPERATION); >@@ -277,7 +277,7 @@ void ExtensionsGLOpenGLES::drawElementsInstanced(GCGLenum mode, GCGLsizei count, > m_glDrawElementsInstancedANGLE(mode, count, type, reinterpret_cast<GLvoid*>(static_cast<intptr_t>(offset)), primcount); > } > >-void ExtensionsGLOpenGLES::vertexAttribDivisor(GCGLuint index, GCGLuint divisor) >+void ExtensionsGLOpenGLES::vertexAttribDivisorANGLE(GCGLuint index, GCGLuint divisor) > { > if (!m_glVertexAttribDivisorANGLE) { > m_context->synthesizeGLError(GL_INVALID_OPERATION); >diff --git a/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.h b/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.h >index 017a45b7398d0992ed14767f0767e04b46416283..664795bda8b8552252ad966d64cde8a65c408afe 100644 >--- a/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.h >+++ b/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGLES.h >@@ -75,8 +75,8 @@ public: > > // Extension3D methods > bool isEnabled(const String&) override; >- void blitFramebuffer(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter) override; >- void renderbufferStorageMultisample(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height) override; >+ void blitFramebufferANGLE(long srcX0, long srcY0, long srcX1, long srcY1, long dstX0, long dstY0, long dstX1, long dstY1, unsigned long mask, unsigned long filter) override; >+ void renderbufferStorageMultisampleANGLE(unsigned long target, unsigned long samples, unsigned long internalformat, unsigned long width, unsigned long height) override; > void insertEventMarkerEXT(const String&) override; > void pushGroupMarkerEXT(const String&) override; > void popGroupMarkerEXT(void) override; >@@ -87,9 +87,9 @@ public: > void bindVertexArrayOES(PlatformGLObject) override; > void drawBuffersEXT(GCGLSpan<const GCGLenum>) override; > >- void drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) override; >- void drawElementsInstanced(GCGLenum mode, GCGLsizei count, GCGLenum type, long long offset, GCGLsizei primcount) override; >- void vertexAttribDivisor(GCGLuint index, GCGLuint divisor) override; >+ void drawArraysInstancedANGLE(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) override; >+ void drawElementsInstancedANGLE(GCGLenum mode, GCGLsizei count, GCGLenum type, long long offset, GCGLsizei primcount) override; >+ void vertexAttribDivisorANGLE(GCGLuint index, GCGLuint divisor) override; > > // EXT Robustness - reset > int getGraphicsResetStatusARB() override; >diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h >index c255b0c12f4fcbfa46db02d55c80b4cb77d17b70..02728f89788e0b85ed126f5f981f5c1d60dffdec 100644 >--- a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h >+++ b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h >@@ -58,6 +58,9 @@ > #if PLATFORM(COCOA) > OBJC_CLASS CALayer; > OBJC_CLASS WebGLLayer; >+namespace WebCore { >+class GraphicsContextGLIOSurfaceSwapChain; >+} > #endif // PLATFORM(COCOA) > > #if USE(NICOSIA) >@@ -86,7 +89,7 @@ typedef WTF::HashMap<CString, uint64_t> ShaderNameHash; > > class GraphicsContextGLOpenGLPrivate; > >-class GraphicsContextGLOpenGL final : public GraphicsContextGL >+class WEBCORE_EXPORT GraphicsContextGLOpenGL final : public GraphicsContextGL > { > public: > static RefPtr<GraphicsContextGLOpenGL> create(GraphicsContextGLAttributes, HostWindow*, Destination = Destination::Offscreen); >@@ -94,6 +97,8 @@ public: > > #if PLATFORM(COCOA) > static Ref<GraphicsContextGLOpenGL> createShared(GraphicsContextGLOpenGL& sharedContext); >+ static Ref<GraphicsContextGLOpenGL> createForGPUProcess(const GraphicsContextGLAttributes&, GraphicsContextGLIOSurfaceSwapChain&); >+ > PlatformGraphicsContextGL platformGraphicsContextGL() const final { return m_contextObj; } > PlatformGLObject platformTexture() const final { return m_texture; } > CALayer* platformLayer() const final { return reinterpret_cast<CALayer*>(m_webGLLayer.get()); } >@@ -191,7 +196,7 @@ public: > bool getActiveAttribImpl(PlatformGLObject program, GCGLuint index, ActiveInfo&); > bool getActiveUniform(PlatformGLObject program, GCGLuint index, ActiveInfo&) final; > bool getActiveUniformImpl(PlatformGLObject program, GCGLuint index, ActiveInfo&); >- void getAttachedShaders(PlatformGLObject program, GCGLsizei maxCount, GCGLsizei* count, PlatformGLObject* shaders) final; >+ void getAttachedShaders(PlatformGLObject program, GCGLsizei maxCount, GCGLsizei* count, PlatformGLObject* shaders); > GCGLint getAttribLocation(PlatformGLObject, const String& name) final; > void getBooleanv(GCGLenum pname, GCGLSpan<GCGLboolean> value) final; > GCGLint getBufferParameteri(GCGLenum target, GCGLenum pname) final; >@@ -219,8 +224,6 @@ public: > void getUniformiv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLint> value) final; > void getUniformuiv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLuint> value) final; > GCGLint getUniformLocation(PlatformGLObject, const String& name) final; >- void getVertexAttribfv(GCGLuint index, GCGLenum pname, GCGLSpan<GCGLfloat> value) final; >- void getVertexAttribiv(GCGLuint index, GCGLenum pname, GCGLSpan<GCGLint> value) final; > GCGLsizeiptr getVertexAttribOffset(GCGLuint index, GCGLenum pname) final; > > void hint(GCGLenum target, GCGLenum mode) final; >@@ -236,7 +239,8 @@ public: > void pixelStorei(GCGLenum pname, GCGLint param) final; > void polygonOffset(GCGLfloat factor, GCGLfloat units) final; > >- void readPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, void* data) final; >+ void readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<GCGLvoid> data) final; >+ void readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset) final; > > void renderbufferStorage(GCGLenum target, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) final; > void sampleCoverage(GCGLclampf value, GCGLboolean invert) final; >@@ -254,7 +258,7 @@ public: > void texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels) final; > void texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset) final; > void compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) final; >- void compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLsizei imageSize, GCGLintptr offset) final; >+ void compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLsizei imageSize, GCGLintptr offset) final; > void compressedTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) final; > void compressedTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLintptr offset) final; > >@@ -317,12 +321,10 @@ public: > #if !USE(ANGLE) > void bufferData(GCGLenum target, const void* data, GCGLenum usage, GCGLuint srcOffset, GCGLuint length); > void bufferSubData(GCGLenum target, GCGLintptr dstByteOffset, const void* srcData, GCGLuint srcOffset, GCGLuint length); >- void getBufferSubData(GCGLenum target, GCGLintptr srcByteOffset, const void* dstData, GCGLuint dstOffset, GCGLuint length); > #endif > void copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLintptr readOffset, GCGLintptr writeOffset, GCGLsizeiptr size) final; > >- void* mapBufferRange(GCGLenum target, GCGLintptr offset, GCGLsizeiptr length, GCGLbitfield access) final; >- GCGLboolean unmapBuffer(GCGLenum target) final; >+ void getBufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<GCGLvoid> data) final; > > void blitFramebuffer(GCGLint srcX0, GCGLint srcY0, GCGLint srcX1, GCGLint srcY1, GCGLint dstX0, GCGLint dstY0, GCGLint dstX1, GCGLint dstY1, GCGLbitfield mask, GCGLenum filter) final; > void framebufferTextureLayer(GCGLenum target, GCGLenum attachment, PlatformGLObject texture, GCGLint level, GCGLint layer) final; >@@ -384,7 +386,7 @@ public: > void endQuery(GCGLenum target) final; > PlatformGLObject getQuery(GCGLenum target, GCGLenum pname) final; > // getQueryParameter >- void getQueryObjectuiv(PlatformGLObject query, GCGLenum pname, GCGLuint* value) final; >+ GCGLuint getQueryObjectui(PlatformGLObject query, GCGLenum pname) final; > > PlatformGLObject createSampler() final; > void deleteSampler(PlatformGLObject sampler) final; >@@ -393,8 +395,8 @@ public: > void samplerParameteri(PlatformGLObject sampler, GCGLenum pname, GCGLint param) final; > void samplerParameterf(PlatformGLObject sampler, GCGLenum pname, GCGLfloat param) final; > // getSamplerParameter >- void getSamplerParameterfv(PlatformGLObject sampler, GCGLenum pname, GCGLfloat* value) final; >- void getSamplerParameteriv(PlatformGLObject sampler, GCGLenum pname, GCGLint* value) final; >+ GCGLfloat getSamplerParameterf(PlatformGLObject sampler, GCGLenum pname) final; >+ GCGLint getSamplerParameteri(PlatformGLObject sampler, GCGLenum pname) final; > > GCGLsync fenceSync(GCGLenum condition, GCGLbitfield flags) final; > GCGLboolean isSync(GCGLsync) final; >@@ -403,7 +405,7 @@ public: > void waitSync(GCGLsync, GCGLbitfield flags, GCGLint64 timeout) final; > // getSyncParameter > // FIXME - this can be implemented at the WebGL level if we signal the WebGLSync object. >- void getSynciv(GCGLsync, GCGLenum pname, GCGLsizei bufSize, GCGLint *value) final; >+ GCGLint getSynci(GCGLsync, GCGLenum pname) final; > > PlatformGLObject createTransformFeedback() final; > void deleteTransformFeedback(PlatformGLObject id) final; >@@ -420,7 +422,7 @@ public: > void bindBufferRange(GCGLenum target, GCGLuint index, PlatformGLObject buffer, GCGLintptr offset, GCGLsizeiptr size) final; > // getIndexedParameter -> use getParameter calls above. > Vector<GCGLuint> getUniformIndices(PlatformGLObject program, const Vector<String>& uniformNames) final; >- void getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname, Vector<GCGLint>& params) final; >+ Vector<GCGLint> getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname) final; > > GCGLuint getUniformBlockIndex(PlatformGLObject program, const String& uniformBlockName) final; > // getActiveUniformBlockParameter >@@ -429,11 +431,6 @@ public: > > void getActiveUniformBlockiv(GCGLuint program, GCGLuint uniformBlockIndex, GCGLenum pname, GCGLSpan<GCGLint> params) final; > >-#if !USE(ANGLE) >- void readPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset); >- void readPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, const void* dstData, GCGLuint dstOffset); >-#endif >- > // Helper methods. > > void paintToCanvas(const unsigned char* imagePixels, const IntSize& imageSize, const IntSize& canvasSize, GraphicsContext&); >@@ -515,7 +512,11 @@ public: > #endif // !USE(ANGLE) > > private: >+#if PLATFORM(COCOA) >+ GraphicsContextGLOpenGL(GraphicsContextGLAttributes, HostWindow*, GraphicsContextGLOpenGL* sharedContext = nullptr, GraphicsContextGLIOSurfaceSwapChain* = nullptr); >+#else > GraphicsContextGLOpenGL(GraphicsContextGLAttributes, HostWindow*, Destination = Destination::Offscreen, GraphicsContextGLOpenGL* sharedContext = nullptr); >+#endif > > // Called once by all the public entry points that eventually call OpenGL. > // Called once by all the public entry points of ExtensionsGL that eventually call OpenGL. >@@ -527,7 +528,9 @@ private: > // implementation. > void validateDepthStencil(const char* packedDepthStencilExtension); > void validateAttributes(); >- >+ >+ void readnPixelsImpl(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLsizei* length, GCGLsizei* columns, GCGLsizei* rows, GCGLvoid* data, bool readingToPixelBufferObject); >+ > // Did the most recent drawing operation leave the GPU in an acceptable state? > void checkGPUStatus(); > >@@ -548,10 +551,13 @@ private: > #if PLATFORM(COCOA) > bool allowOfflineRenderers() const; > bool reshapeDisplayBufferBacking(); >+ bool allocateAndBindDisplayBufferBacking(); > bool bindDisplayBufferBacking(std::unique_ptr<IOSurface> backing, void* pbuffer); > #endif > > #if PLATFORM(COCOA) >+ GraphicsContextGLIOSurfaceSwapChain* m_swapChain { nullptr }; >+ // TODO: this should be removed once the context draws to a image buffer. See https://bugs.webkit.org/show_bug.cgi?id=218179 . > RetainPtr<WebGLLayer> m_webGLLayer; > PlatformGraphicsContextGL m_contextObj { nullptr }; > PlatformGraphicsContextGLDisplay m_displayObj { nullptr }; >@@ -579,7 +585,7 @@ private: > , isValid(false) > { > } >- >+ > ShaderSymbolMap& symbolMap(enum ANGLEShaderSymbolType symbolType) > { > ASSERT(symbolType == SHADER_SYMBOL_TYPE_ATTRIBUTE || symbolType == SHADER_SYMBOL_TYPE_UNIFORM || symbolType == SHADER_SYMBOL_TYPE_VARYING); >@@ -672,7 +678,7 @@ private: > > using BoundTextureMap = HashMap<GCGLenum, > std::pair<GCGLuint, GCGLenum>, >- WTF::IntHash<GCGLenum>, >+ WTF::IntHash<GCGLenum>, > WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>, > WTF::PairHashTraits<WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>, WTF::UnsignedWithZeroKeyHashTraits<GCGLuint>> > >; >diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp >index bc44cd57788672039aea4f59996e4d94e1c1a0fe..fa287f603fd289a837b76e1553ebbda3dc7223d0 100644 >--- a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp >+++ b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp >@@ -2278,19 +2278,19 @@ void GraphicsContextGLOpenGL::texImage2DDirect(GCGLenum target, GCGLint level, G > > void GraphicsContextGLOpenGL::drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) > { >- getExtensions().drawArraysInstanced(mode, first, count, primcount); >+ getExtensions().drawArraysInstancedANGLE(mode, first, count, primcount); > checkGPUStatus(); > } > > void GraphicsContextGLOpenGL::drawElementsInstanced(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLintptr offset, GCGLsizei primcount) > { >- getExtensions().drawElementsInstanced(mode, count, type, offset, primcount); >+ getExtensions().drawElementsInstancedANGLE(mode, count, type, offset, primcount); > checkGPUStatus(); > } > > void GraphicsContextGLOpenGL::vertexAttribDivisor(GCGLuint index, GCGLuint divisor) > { >- getExtensions().vertexAttribDivisor(index, divisor); >+ getExtensions().vertexAttribDivisorANGLE(index, divisor); > } > > #if HAVE(OPENGL_4) && ENABLE(WEBGL2) >@@ -2335,13 +2335,8 @@ void GraphicsContextGLOpenGL::copyBufferSubData(GCGLenum, GCGLenum, GCGLintptr, > } > #endif > >-void GraphicsContextGLOpenGL::getBufferSubData(GCGLenum target, GCGLintptr srcByteOffset, const void* dstData, GCGLuint dstOffset, GCGLuint length) >+void GraphicsContextGLOpenGL::getBufferSubData(GCGLenum, GCGLintptr, GCGLSpan<GLvoid>) > { >- UNUSED_PARAM(target); >- UNUSED_PARAM(srcByteOffset); >- UNUSED_PARAM(dstData); >- UNUSED_PARAM(dstOffset); >- UNUSED_PARAM(length); > } > > #if HAVE(OPENGL_4) || HAVE(OPENGL_ES_3) >@@ -2712,7 +2707,7 @@ PlatformGLObject GraphicsContextGLOpenGL::getQuery(GCGLenum target, GCGLenum pna > return 0; > } > >-void GraphicsContextGLOpenGL::getQueryObjectuiv(PlatformGLObject query, GCGLenum pname, GCGLuint* value) >+void GraphicsContextGLOpenGL::getQueryObjectui(PlatformGLObject query, GCGLenum pname) > { > UNUSED_PARAM(query); > UNUSED_PARAM(pname); >@@ -2756,18 +2751,19 @@ void GraphicsContextGLOpenGL::samplerParameterf(PlatformGLObject sampler, GCGLen > UNUSED_PARAM(param); > } > >-void GraphicsContextGLOpenGL::getSamplerParameterfv(PlatformGLObject sampler, GCGLenum pname, GCGLfloat* value) >+GCGLfloat GraphicsContextGLOpenGL::getSamplerParameterf(PlatformGLObject sampler, GCGLenum pname) > { > UNUSED_PARAM(sampler); > UNUSED_PARAM(pname); >- UNUSED_PARAM(value); >+ return 0.f; > } > >-void GraphicsContextGLOpenGL::getSamplerParameteriv(PlatformGLObject sampler, GCGLenum pname, GCGLint* value) >+GCGLint GraphicsContextGLOpenGL::getSamplerParameteri(PlatformGLObject sampler, GCGLenum pname) >+ > { > UNUSED_PARAM(sampler); > UNUSED_PARAM(pname); >- UNUSED_PARAM(value); >+ return 0; > } > > GCGLsync GraphicsContextGLOpenGL::fenceSync(GCGLenum condition, GCGLbitfield flags) >@@ -2806,12 +2802,12 @@ void GraphicsContextGLOpenGL::waitSync(GCGLsync sync, GCGLbitfield flags, GCGLin > UNUSED_PARAM(timeout); > } > >-void GraphicsContextGLOpenGL::getSynciv(GCGLsync sync, GCGLenum pname, GCGLsizei bufSize, GCGLint *value) >+GCGLint GraphicsContextGLOpenGL::getSynci(GCGLsync sync, GCGLenum pname) > { > UNUSED_PARAM(sync); > UNUSED_PARAM(pname); > UNUSED_PARAM(bufSize); >- UNUSED_PARAM(value); >+ return 0; > } > > PlatformGLObject GraphicsContextGLOpenGL::createTransformFeedback() >@@ -2894,11 +2890,13 @@ Vector<GCGLuint> GraphicsContextGLOpenGL::getUniformIndices(PlatformGLObject pro > #if HAVE(OPENGL_4) || HAVE(OPENGL_ES_3) > void GraphicsContextGLOpenGL::getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname, Vector<GCGLint>& params) > { >+ Vector<GCGLint> result(uniformIndices.size(), 0); > ASSERT(program); > if (!makeContextCurrent()) >- return; >+ return result; > >- ::glGetActiveUniformsiv(program, uniformIndices.size(), uniformIndices.data(), pname, params.data()); >+ ::glGetActiveUniformsiv(program, uniformIndices.size(), uniformIndices.data(), pname, result.data()); >+ return result; > } > > GCGLuint GraphicsContextGLOpenGL::getUniformBlockIndex(PlatformGLObject program, const String& uniformBlockName) >diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp >index 23d74fa80d70791be600df58e756173396aa5505..bf7c686f01e72323548613573c91f7eaf2b44c54 100644 >--- a/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp >+++ b/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLES.cpp >@@ -130,7 +130,7 @@ bool GraphicsContextGLOpenGL::reshapeFBOs(const IntSize& size) > // Use a 24 bit depth buffer where we know we have it. > if (supportPackedDepthStencilBuffer) { > ::glBindRenderbuffer(GL_RENDERBUFFER, m_depthStencilBuffer); >- extensions.renderbufferStorageMultisample(GL_RENDERBUFFER, sampleCount, GL_DEPTH24_STENCIL8_OES, width, height); >+ extensions.renderbufferStorageMultisampleANGLE(GL_RENDERBUFFER, sampleCount, GL_DEPTH24_STENCIL8_OES, width, height); > if (attributes.stencil) > ::glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, m_depthStencilBuffer); > if (attributes.depth) >@@ -138,12 +138,12 @@ bool GraphicsContextGLOpenGL::reshapeFBOs(const IntSize& size) > } else { > if (attributes.stencil) { > ::glBindRenderbuffer(GL_RENDERBUFFER, m_stencilBuffer); >- extensions.renderbufferStorageMultisample(GL_RENDERBUFFER, sampleCount, GL_STENCIL_INDEX8, width, height); >+ extensions.renderbufferStorageMultisampleANGLE(GL_RENDERBUFFER, sampleCount, GL_STENCIL_INDEX8, width, height); > ::glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, m_stencilBuffer); > } > if (attributes.depth) { > ::glBindRenderbuffer(GL_RENDERBUFFER, m_depthBuffer); >- extensions.renderbufferStorageMultisample(GL_RENDERBUFFER, sampleCount, GL_DEPTH_COMPONENT16, width, height); >+ extensions.renderbufferStorageMultisampleANGLE(GL_RENDERBUFFER, sampleCount, GL_DEPTH_COMPONENT16, width, height); > ::glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, m_depthBuffer); > } > } >diff --git a/Source/WebKit/CMakeLists.txt b/Source/WebKit/CMakeLists.txt >index 6284453250335107fd54982232b8b9eaec8e68cb..9f8317b18d53b7b3c16669a4c511993eaf37c775 100644 >--- a/Source/WebKit/CMakeLists.txt >+++ b/Source/WebKit/CMakeLists.txt >@@ -123,6 +123,7 @@ set(WebKit_MESSAGES_IN_FILES > GPUProcess/GPUConnectionToWebProcess > GPUProcess/GPUProcess > >+ GPUProcess/graphics/RemoteGraphicsContextGL > GPUProcess/graphics/RemoteRenderingBackend > > GPUProcess/media/RemoteAudioDestinationManager >@@ -218,6 +219,7 @@ set(WebKit_MESSAGES_IN_FILES > > WebProcess/GPU/GPUProcessConnection > >+ WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy > WebProcess/GPU/graphics/RemoteRenderingBackendProxy > > WebProcess/GPU/media/MediaPlayerPrivateRemote >diff --git a/Source/WebKit/DerivedSources-input.xcfilelist b/Source/WebKit/DerivedSources-input.xcfilelist >index edb6ca5979d2f4def8b2b2e773f9d69ae786e7e9..4a67df8edc3b4f489187702efbf041b3d34a9135 100644 >--- a/Source/WebKit/DerivedSources-input.xcfilelist >+++ b/Source/WebKit/DerivedSources-input.xcfilelist >@@ -20,6 +20,7 @@ $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR)/models.py > $(JAVASCRIPTCORE_PRIVATE_HEADERS_DIR)/xxd.pl > $(PROJECT_DIR)/GPUProcess/GPUConnectionToWebProcess.messages.in > $(PROJECT_DIR)/GPUProcess/GPUProcess.messages.in >+$(PROJECT_DIR)/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in > $(PROJECT_DIR)/GPUProcess/graphics/RemoteRenderingBackend.messages.in > $(PROJECT_DIR)/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in > $(PROJECT_DIR)/GPUProcess/media/RemoteAudioDestinationManager.messages.in >@@ -131,6 +132,7 @@ $(PROJECT_DIR)/WebProcess/Cache/WebCacheStorageConnection.messages.in > $(PROJECT_DIR)/WebProcess/Databases/IndexedDB/WebIDBConnectionToServer.messages.in > $(PROJECT_DIR)/WebProcess/FullScreen/WebFullScreenManager.messages.in > $(PROJECT_DIR)/WebProcess/GPU/GPUProcessConnection.messages.in >+$(PROJECT_DIR)/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in > $(PROJECT_DIR)/WebProcess/GPU/graphics/RemoteRenderingBackendProxy.messages.in > $(PROJECT_DIR)/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in > $(PROJECT_DIR)/WebProcess/GPU/media/RemoteAudioDestinationProxy.messages.in >diff --git a/Source/WebKit/DerivedSources-output.xcfilelist b/Source/WebKit/DerivedSources-output.xcfilelist >index 75679f55f5ae399b5eaf477f1893256bc248844d..7cd3dbcca350c6e3814c340c393c963edbb9811b 100644 >--- a/Source/WebKit/DerivedSources-output.xcfilelist >+++ b/Source/WebKit/DerivedSources-output.xcfilelist >@@ -175,6 +175,12 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteCDMProxyMessagesReplies.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteCaptureSampleManagerMessageReceiver.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteCaptureSampleManagerMessages.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteCaptureSampleManagerMessagesReplies.h >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteGraphicsContextGLMessageReceiver.cpp >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteGraphicsContextGLMessages.h >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteGraphicsContextGLMessagesReplies.h >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteGraphicsContextGLProxyMessageReceiver.cpp >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteGraphicsContextGLProxyMessages.h >+$(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteGraphicsContextGLProxyMessagesReplies.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteLayerTreeDrawingAreaProxyMessageReceiver.cpp > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteLayerTreeDrawingAreaProxyMessages.h > $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKit2/RemoteLayerTreeDrawingAreaProxyMessagesReplies.h >diff --git a/Source/WebKit/DerivedSources.make b/Source/WebKit/DerivedSources.make >index 37701b01c3c1a2c300e1dd2d72e6b85237f424b5..976b1a5a3e5c0d3115d4450c908615719e6decfe 100644 >--- a/Source/WebKit/DerivedSources.make >+++ b/Source/WebKit/DerivedSources.make >@@ -171,6 +171,7 @@ MESSAGE_RECEIVERS = \ > WebProcess/Databases/IndexedDB/WebIDBConnectionToServer \ > WebProcess/GPU/GPUProcessConnection \ > WebProcess/GPU/graphics/RemoteRenderingBackendProxy \ >+ WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy \ > WebProcess/GPU/webrtc/LibWebRTCCodecs \ > WebProcess/GPU/webrtc/SampleBufferDisplayLayer \ > WebProcess/GPU/media/MediaPlayerPrivateRemote \ >@@ -227,6 +228,7 @@ MESSAGE_RECEIVERS = \ > PluginProcess/PluginProcess \ > GPUProcess/GPUConnectionToWebProcess \ > GPUProcess/graphics/RemoteRenderingBackend \ >+ GPUProcess/graphics/RemoteGraphicsContextGL \ > GPUProcess/webrtc/LibWebRTCCodecsProxy \ > GPUProcess/webrtc/RemoteSampleBufferDisplayLayerManager \ > GPUProcess/webrtc/RemoteAudioMediaStreamTrackRendererManager \ >diff --git a/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp b/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp >index 0e2e8832b1e20f1e0f319d5d9f25d72ce1bf73ad..44b9f63e14c50b741993d6f35a5a95f5afd80a5a 100644 >--- a/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp >+++ b/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp >@@ -64,6 +64,10 @@ > #include <WebCore/MediaSessionManagerIOS.h> > #endif > >+#if ENABLE(WEBGL) >+#include "RemoteGraphicsContextGL.h" >+#endif >+ > #if ENABLE(ENCRYPTED_MEDIA) > #include "RemoteCDMFactoryProxy.h" > #include "RemoteCDMFactoryProxyMessages.h" >@@ -290,6 +294,21 @@ void GPUConnectionToWebProcess::releaseRenderingBackend(RenderingBackendIdentifi > ASSERT_UNUSED(found, found); > } > >+#if ENABLE(WEBGL) >+void GPUConnectionToWebProcess::createGraphicsContextGL(WebCore::GraphicsContextGLAttributes attributes, GraphicsContextGLIdentifier graphicsContextGLIdentifier) >+{ >+ auto addResult = m_remoteGraphicsContextGLMap.ensure(graphicsContextGLIdentifier, [&]() { >+ return RemoteGraphicsContextGL::create(attributes, *this, graphicsContextGLIdentifier); >+ }); >+ ASSERT_UNUSED(addResult, addResult.isNewEntry); >+} >+ >+void GPUConnectionToWebProcess::releaseGraphicsContextGL(GraphicsContextGLIdentifier graphicsContextGLIdentifier) >+{ >+ bool found = m_remoteGraphicsContextGLMap.remove(graphicsContextGLIdentifier); >+ ASSERT_UNUSED(found, found); >+} >+#endif > void GPUConnectionToWebProcess::clearNowPlayingInfo() > { > gpuProcess().nowPlayingManager().clearNowPlayingInfoClient(*this); >diff --git a/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h b/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h >index 2678dbc4e5d365fad28e8b4827863762a3c4578d..5aedfbb4d2cac7b7660ff073609d377c601584b4 100644 >--- a/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h >+++ b/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.h >@@ -32,6 +32,7 @@ > #include "MessageReceiverMap.h" > #include "RemoteAudioSessionIdentifier.h" > #include "RenderingBackendIdentifier.h" >+ > #include <WebCore/LibWebRTCEnumTraits.h> > #include <WebCore/NowPlayingManager.h> > #include <WebCore/ProcessIdentifier.h> >@@ -39,6 +40,11 @@ > #include <wtf/Logger.h> > #include <wtf/RefCounted.h> > >+#if ENABLE(WEBGL) >+#include "GraphicsContextGLIdentifier.h" >+#include <WebCore/GraphicsContextGLAttributes.h> >+#endif >+ > namespace WebKit { > > class GPUProcess; >@@ -54,6 +60,7 @@ class RemoteMediaRecorderManager; > class RemoteMediaResourceManager; > class RemoteMediaSessionHelperProxy; > class RemoteRenderingBackend; >+class RemoteGraphicsContextGL; > class RemoteSampleBufferDisplayLayerManager; > class UserMediaCaptureManagerProxy; > struct RemoteAudioSessionConfiguration; >@@ -119,6 +126,11 @@ private: > void createRenderingBackend(RenderingBackendIdentifier); > void releaseRenderingBackend(RenderingBackendIdentifier); > >+#if ENABLE(WEBGL) >+ void createGraphicsContextGL(WebCore::GraphicsContextGLAttributes, GraphicsContextGLIdentifier); >+ void releaseGraphicsContextGL(GraphicsContextGLIdentifier); >+#endif >+ > void clearNowPlayingInfo(); > void setNowPlayingInfo(bool setAsNowPlayingApplication, WebCore::NowPlayingInfo&&); > >@@ -180,7 +192,10 @@ private: > > using RemoteRenderingBackendMap = HashMap<RenderingBackendIdentifier, std::unique_ptr<RemoteRenderingBackend>>; > RemoteRenderingBackendMap m_remoteRenderingBackendMap; >- >+#if ENABLE(WEBGL) >+ using RemoteGraphicsContextGLMap = HashMap<GraphicsContextGLIdentifier, std::unique_ptr<RemoteGraphicsContextGL>>; >+ RemoteGraphicsContextGLMap m_remoteGraphicsContextGLMap; >+#endif > #if ENABLE(ENCRYPTED_MEDIA) > std::unique_ptr<RemoteCDMFactoryProxy> m_cdmFactoryProxy; > #endif >diff --git a/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in b/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in >index 5194fb4f6085d624d5983f6252c365eb3271f344..9d54e164595b0a361dfe4c75bff4018a85759c8f 100644 >--- a/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in >+++ b/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.messages.in >@@ -25,6 +25,10 @@ > messages -> GPUConnectionToWebProcess WantsDispatchMessage { > void CreateRenderingBackend(WebKit::RenderingBackendIdentifier renderingBackendIdentifier) > void ReleaseRenderingBackend(WebKit::RenderingBackendIdentifier renderingBackendIdentifier) >+#if ENABLE(WEBGL) >+ void CreateGraphicsContextGL(struct WebCore::GraphicsContextGLAttributes attributes, WebKit::GraphicsContextGLIdentifier graphicsContextGLIdentifier) >+ void ReleaseGraphicsContextGL(WebKit::GraphicsContextGLIdentifier graphicsContextGLIdentifier) >+#endif > void ClearNowPlayingInfo() > void SetNowPlayingInfo(bool setAsNowPlayingApplication, struct WebCore::NowPlayingInfo nowPlayingInfo) > #if USE(AUDIO_SESSION) >diff --git a/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp b/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..4e2310d4aee006b9f940afa9c438c1acc95e3ba7 >--- /dev/null >+++ b/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.cpp >@@ -0,0 +1,146 @@ >+/* >+ * Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "RemoteGraphicsContextGL.h" >+ >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+ >+#include "GPUConnectionToWebProcess.h" >+#include "RemoteGraphicsContextGLMessages.h" >+#include "RemoteGraphicsContextGLProxyMessages.h" >+#include <WebCore/GraphicsContextGLOpenGL.h> >+#include <wtf/MachSendRight.h> >+ >+namespace WebKit { >+using namespace WebCore; >+ >+std::unique_ptr<RemoteGraphicsContextGL> RemoteGraphicsContextGL::create(const WebCore::GraphicsContextGLAttributes& attributes, GPUConnectionToWebProcess& gpuConnectionToWebProcess, GraphicsContextGLIdentifier graphicsContextGLIdentifier) >+{ >+ return std::unique_ptr<RemoteGraphicsContextGL>(new RemoteGraphicsContextGL(attributes, gpuConnectionToWebProcess, graphicsContextGLIdentifier)); >+} >+ >+RemoteGraphicsContextGL::RemoteGraphicsContextGL(const WebCore::GraphicsContextGLAttributes& attributes, GPUConnectionToWebProcess& gpuConnectionToWebProcess, GraphicsContextGLIdentifier graphicsContextGLIdentifier) >+ : m_context(GraphicsContextGLOpenGL::createForGPUProcess(attributes, *this)) >+ , m_gpuConnectionToWebProcess(makeWeakPtr(gpuConnectionToWebProcess)) >+ , m_graphicsContextGLIdentifier(graphicsContextGLIdentifier) >+{ >+ if (auto* gpuConnectionToWebProcess = m_gpuConnectionToWebProcess.get()) >+ gpuConnectionToWebProcess->messageReceiverMap().addMessageReceiver(Messages::RemoteGraphicsContextGL::messageReceiverName(), graphicsContextGLIdentifier.toUInt64(), *this); >+ m_context->addClient(*this); >+ String extensions = m_context->getString(GraphicsContextGL::EXTENSIONS); >+ String requestableExtensions = m_context->getString(GraphicsContextGL::REQUESTABLE_EXTENSIONS_ANGLE); >+ send(Messages::RemoteGraphicsContextGLProxy::WasCreated(extensions, requestableExtensions), m_graphicsContextGLIdentifier); >+} >+ >+RemoteGraphicsContextGL::~RemoteGraphicsContextGL() >+{ >+ if (auto* gpuConnectionToWebProcess = m_gpuConnectionToWebProcess.get()) >+ gpuConnectionToWebProcess->messageReceiverMap().removeMessageReceiver(Messages::RemoteGraphicsContextGL::messageReceiverName(), m_graphicsContextGLIdentifier.toUInt64()); >+} >+ >+GPUConnectionToWebProcess* RemoteGraphicsContextGL::gpuConnectionToWebProcess() const >+{ >+ return m_gpuConnectionToWebProcess.get(); >+} >+ >+IPC::Connection* RemoteGraphicsContextGL::messageSenderConnection() const >+{ >+ if (auto* gpuConnectionToWebProcess = m_gpuConnectionToWebProcess.get()) >+ return &gpuConnectionToWebProcess->connection(); >+ return nullptr; >+} >+ >+uint64_t RemoteGraphicsContextGL::messageSenderDestinationID() const >+{ >+ return m_graphicsContextGLIdentifier.toUInt64(); >+} >+ >+void RemoteGraphicsContextGL::didComposite() >+{ >+} >+ >+void RemoteGraphicsContextGL::forceContextLost() >+{ >+ send(Messages::RemoteGraphicsContextGLProxy::WasLost(), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGL::recycleContext() >+{ >+ ASSERT_NOT_REACHED(); >+} >+ >+void RemoteGraphicsContextGL::dispatchContextChangedNotification() >+{ >+ send(Messages::RemoteGraphicsContextGLProxy::WasChanged(), m_graphicsContextGLIdentifier); >+} >+ >+GraphicsContextGLIOSurfaceSwapChain::Buffer RemoteGraphicsContextGL::recycleBuffer() >+{ >+ return WTFMove(m_displayBuffer); >+} >+ >+void RemoteGraphicsContextGL::present(Buffer buffer) >+{ >+ ASSERT(!m_displayBuffer.surface); >+ m_displayBuffer = WTFMove(buffer); >+} >+ >+void* RemoteGraphicsContextGL::detachClient() >+{ >+ return std::exchange(m_displayBuffer.handle, nullptr); >+} >+ >+void RemoteGraphicsContextGL::reshape(int32_t width, int32_t height) >+{ >+ if (width && height) >+ m_context->reshape(width, height); >+ else >+ forceContextLost(); >+} >+ >+void RemoteGraphicsContextGL::prepareForDisplay(CompletionHandler<void(WTF::MachSendRight&&)>&& completionHandler) >+{ >+ m_context->prepareForDisplay(); >+ auto displayBuffer = WTFMove(m_displayBuffer.surface); >+ MachSendRight sendRight; >+ if (displayBuffer) >+ sendRight = displayBuffer->createSendRight(); >+ completionHandler(WTFMove(sendRight)); >+} >+ >+void RemoteGraphicsContextGL::ensureExtensionEnabled(String&& extension) >+{ >+ m_context->getExtensions().ensureEnabled(extension); >+} >+ >+void RemoteGraphicsContextGL::notifyMarkContextChanged() >+{ >+ m_context->markContextChanged(); >+} >+ >+} // namespace WebKit >+ >+#endif >diff --git a/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h b/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h >new file mode 100644 >index 0000000000000000000000000000000000000000..1bf0572101d9bc0f09f7da94c94e532ba7f7c307 >--- /dev/null >+++ b/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.h >@@ -0,0 +1,101 @@ >+/* >+ * Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+ >+#include "Connection.h" >+#include "GraphicsContextGLIdentifier.h" >+#include "MessageReceiver.h" >+#include "MessageSender.h" >+ >+#include <WebCore/ExtensionsGL.h> >+#include <WebCore/GraphicsContextGLIOSurfaceSwapChain.h> >+#include <WebCore/GraphicsContextGLOpenGL.h> >+#include <WebCore/NotImplemented.h> >+#include <wtf/WeakPtr.h> >+ >+namespace WTF { >+class MachSendRight; >+} >+ >+namespace WebKit { >+ >+class GPUConnectionToWebProcess; >+ >+// GPU process side implementation of that receives messages about GraphicsContextGL calls >+// and issues real GraphicsContextGL calls based on the received messages. >+// The implementation is largely generated by running Tools/Scripts/generate-gpup-webgl. >+class RemoteGraphicsContextGL final >+ : public IPC::MessageSender >+ , private IPC::MessageReceiver >+ , private WebCore::GraphicsContextGL::Client >+ , private WebCore::GraphicsContextGLIOSurfaceSwapChain { >+public: >+ static std::unique_ptr<RemoteGraphicsContextGL> create(const WebCore::GraphicsContextGLAttributes&, GPUConnectionToWebProcess&, GraphicsContextGLIdentifier); >+ ~RemoteGraphicsContextGL() final; >+ >+ GPUConnectionToWebProcess* gpuConnectionToWebProcess() const; >+ >+private: >+ RemoteGraphicsContextGL(const WebCore::GraphicsContextGLAttributes&, GPUConnectionToWebProcess&, GraphicsContextGLIdentifier); >+ >+ // IPC::MessageSender overrides. >+ IPC::Connection* messageSenderConnection() const final; >+ uint64_t messageSenderDestinationID() const final; >+ >+ // IPC::MessageReceiver overrides. >+ void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final; >+ void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) final; >+ >+ // GraphicsContextGL::Client overrides. >+ void didComposite() final; >+ void forceContextLost() final; >+ void recycleContext() final; >+ void dispatchContextChangedNotification() final; >+ >+ // GraphicsContextGLIOSurfaceSwapChain overrides. >+ Buffer recycleBuffer() final; >+ void present(Buffer) final; >+ void* detachClient() final; >+ >+ // Messages to be received. >+ void reshape(int32_t width, int32_t height); >+ void prepareForDisplay(CompletionHandler<void(WTF::MachSendRight&&)>&&); >+ void ensureExtensionEnabled(String&&); >+ void notifyMarkContextChanged(); >+ >+#include "RemoteGraphicsContextGLFunctionsGenerated.h" // NOLINT >+ >+ Ref<WebCore::GraphicsContextGLOpenGL> m_context; >+ WeakPtr<GPUConnectionToWebProcess> m_gpuConnectionToWebProcess; >+ GraphicsContextGLIdentifier m_graphicsContextGLIdentifier; >+ GraphicsContextGLIOSurfaceSwapChain::Buffer m_displayBuffer; >+}; >+ >+} // namespace WebKit >+ >+#endif >diff --git a/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in b/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in >new file mode 100644 >index 0000000000000000000000000000000000000000..eea71524d40819ba0310cb420136075668786857 >--- /dev/null >+++ b/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in >@@ -0,0 +1,294 @@ >+/* Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND >+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR >+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR >+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER >+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, >+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+// This file is generated by generate-gpup-webgl. Do not edit. >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+ >+messages -> RemoteGraphicsContextGL NotRefCounted { >+ void Reshape(int32_t width, int32_t height) >+#if PLATFORM(COCOA) >+ void PrepareForDisplay() -> (MachSendRight displayBuffer) Synchronous >+#endif >+#if !PLATFORM(COCOA) >+ void PrepareForDisplay() -> () Synchronous >+#endif >+ void EnsureExtensionEnabled(String extension) >+ void NotifyMarkContextChanged() >+ >+ void SetFailNextGPUStatusCheck() >+ void SynthesizeGLError(uint32_t error) >+ void MoveErrorsToSyntheticErrorList() -> (bool returnValue) Synchronous >+ void ActiveTexture(uint32_t texture) >+ void AttachShader(uint32_t program, uint32_t shader) >+ void BindAttribLocation(uint32_t arg0, uint32_t index, String name) >+ void BindBuffer(uint32_t target, uint32_t arg1) >+ void BindFramebuffer(uint32_t target, uint32_t arg1) >+ void BindRenderbuffer(uint32_t target, uint32_t arg1) >+ void BindTexture(uint32_t target, uint32_t arg1) >+ void BlendColor(float red, float green, float blue, float alpha) >+ void BlendEquation(uint32_t mode) >+ void BlendEquationSeparate(uint32_t modeRGB, uint32_t modeAlpha) >+ void BlendFunc(uint32_t sfactor, uint32_t dfactor) >+ void BlendFuncSeparate(uint32_t srcRGB, uint32_t dstRGB, uint32_t srcAlpha, uint32_t dstAlpha) >+ void CheckFramebufferStatus(uint32_t target) -> (uint32_t returnValue) Synchronous >+ void Clear(uint32_t mask) >+ void ClearColor(float red, float green, float blue, float alpha) >+ void ClearDepth(float depth) >+ void ClearStencil(int32_t s) >+ void ColorMask(bool red, bool green, bool blue, bool alpha) >+ void CompileShader(uint32_t arg0) >+ void CopyTexImage2D(uint32_t target, int32_t level, uint32_t internalformat, int32_t x, int32_t y, int32_t width, int32_t height, int32_t border) >+ void CopyTexSubImage2D(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t x, int32_t y, int32_t width, int32_t height) >+ void CreateBuffer() -> (uint32_t returnValue) Synchronous >+ void CreateFramebuffer() -> (uint32_t returnValue) Synchronous >+ void CreateProgram() -> (uint32_t returnValue) Synchronous >+ void CreateRenderbuffer() -> (uint32_t returnValue) Synchronous >+ void CreateShader(uint32_t arg0) -> (uint32_t returnValue) Synchronous >+ void CreateTexture() -> (uint32_t returnValue) Synchronous >+ void CullFace(uint32_t mode) >+ void DeleteBuffer(uint32_t arg0) >+ void DeleteFramebuffer(uint32_t arg0) >+ void DeleteProgram(uint32_t arg0) >+ void DeleteRenderbuffer(uint32_t arg0) >+ void DeleteShader(uint32_t arg0) >+ void DeleteTexture(uint32_t arg0) >+ void DepthFunc(uint32_t func) >+ void DepthMask(bool flag) >+ void DepthRange(float zNear, float zFar) >+ void DetachShader(uint32_t arg0, uint32_t arg1) >+ void Disable(uint32_t cap) >+ void DisableVertexAttribArray(uint32_t index) >+ void DrawArrays(uint32_t mode, int32_t first, int32_t count) >+ void DrawElements(uint32_t mode, int32_t count, uint32_t type, uint64_t offset) >+ void Enable(uint32_t cap) >+ void EnableVertexAttribArray(uint32_t index) >+ void Finish() >+ void Flush() >+ void FramebufferRenderbuffer(uint32_t target, uint32_t attachment, uint32_t renderbuffertarget, uint32_t arg3) >+ void FramebufferTexture2D(uint32_t target, uint32_t attachment, uint32_t textarget, uint32_t arg3, int32_t level) >+ void FrontFace(uint32_t mode) >+ void GenerateMipmap(uint32_t target) >+ void GetActiveAttrib(uint32_t program, uint32_t index) -> (bool returnValue, WebCore::GraphicsContextGL::ActiveInfo arg2) Synchronous >+ void GetActiveUniform(uint32_t program, uint32_t index) -> (bool returnValue, WebCore::GraphicsContextGL::ActiveInfo arg2) Synchronous >+ void GetAttribLocation(uint32_t arg0, String name) -> (int32_t returnValue) Synchronous >+ void GetBufferParameteri(uint32_t target, uint32_t pname) -> (int32_t returnValue) Synchronous >+ void GetString(uint32_t name) -> (String returnValue) Synchronous >+ void GetFloatv(uint32_t pname, uint64_t valueSize) -> (IPC::ArrayReference<float> value) Synchronous >+ void GetIntegerv(uint32_t pname, uint64_t valueSize) -> (IPC::ArrayReference<int32_t> value) Synchronous >+ void GetInteger64(uint32_t pname) -> (int64_t returnValue) Synchronous >+ void GetInteger64i(uint32_t pname, uint32_t index) -> (int64_t returnValue) Synchronous >+ void GetProgrami(uint32_t program, uint32_t pname) -> (int32_t returnValue) Synchronous >+ void GetBooleanv(uint32_t pname, uint64_t valueSize) -> (IPC::ArrayReference<bool> value) Synchronous >+ void GetError() -> (uint32_t returnValue) Synchronous >+ void GetFramebufferAttachmentParameteri(uint32_t target, uint32_t attachment, uint32_t pname) -> (int32_t returnValue) Synchronous >+ void GetProgramInfoLog(uint32_t arg0) -> (String returnValue) Synchronous >+ void GetRenderbufferParameteri(uint32_t target, uint32_t pname) -> (int32_t returnValue) Synchronous >+ void GetShaderi(uint32_t arg0, uint32_t pname) -> (int32_t returnValue) Synchronous >+ void GetShaderInfoLog(uint32_t arg0) -> (String returnValue) Synchronous >+ void GetShaderPrecisionFormat(uint32_t shaderType, uint32_t precisionType) -> (IPC::ArrayReference<int32_t, 2> range, GCGLint precision) Synchronous >+ void GetShaderSource(uint32_t arg0) -> (String returnValue) Synchronous >+ void GetTexParameterf(uint32_t target, uint32_t pname) -> (float returnValue) Synchronous >+ void GetTexParameteri(uint32_t target, uint32_t pname) -> (int32_t returnValue) Synchronous >+ void GetUniformfv(uint32_t program, int32_t location, uint64_t valueSize) -> (IPC::ArrayReference<float> value) Synchronous >+ void GetUniformiv(uint32_t program, int32_t location, uint64_t valueSize) -> (IPC::ArrayReference<int32_t> value) Synchronous >+ void GetUniformuiv(uint32_t program, int32_t location, uint64_t valueSize) -> (IPC::ArrayReference<uint32_t> value) Synchronous >+ void GetUniformLocation(uint32_t arg0, String name) -> (int32_t returnValue) Synchronous >+ void GetVertexAttribOffset(uint32_t index, uint32_t pname) -> (uint64_t returnValue) Synchronous >+ void Hint(uint32_t target, uint32_t mode) >+ void IsBuffer(uint32_t arg0) -> (bool returnValue) Synchronous >+ void IsEnabled(uint32_t cap) -> (bool returnValue) Synchronous >+ void IsFramebuffer(uint32_t arg0) -> (bool returnValue) Synchronous >+ void IsProgram(uint32_t arg0) -> (bool returnValue) Synchronous >+ void IsRenderbuffer(uint32_t arg0) -> (bool returnValue) Synchronous >+ void IsShader(uint32_t arg0) -> (bool returnValue) Synchronous >+ void IsTexture(uint32_t arg0) -> (bool returnValue) Synchronous >+ void LineWidth(float arg0) >+ void LinkProgram(uint32_t arg0) >+ void PixelStorei(uint32_t pname, int32_t param) >+ void PolygonOffset(float factor, float units) >+ void RenderbufferStorage(uint32_t target, uint32_t internalformat, int32_t width, int32_t height) >+ void SampleCoverage(float value, bool invert) >+ void Scissor(int32_t x, int32_t y, int32_t width, int32_t height) >+ void ShaderSource(uint32_t arg0, String arg1) >+ void StencilFunc(uint32_t func, int32_t ref, uint32_t mask) >+ void StencilFuncSeparate(uint32_t face, uint32_t func, int32_t ref, uint32_t mask) >+ void StencilMask(uint32_t mask) >+ void StencilMaskSeparate(uint32_t face, uint32_t mask) >+ void StencilOp(uint32_t fail, uint32_t zfail, uint32_t zpass) >+ void StencilOpSeparate(uint32_t face, uint32_t fail, uint32_t zfail, uint32_t zpass) >+ void TexParameterf(uint32_t target, uint32_t pname, float param) >+ void TexParameteri(uint32_t target, uint32_t pname, int32_t param) >+ void Uniform1f(int32_t location, float x) >+ void Uniform1fv(int32_t location, IPC::ArrayReference<float> v) >+ void Uniform1i(int32_t location, int32_t x) >+ void Uniform1iv(int32_t location, IPC::ArrayReference<int32_t> v) >+ void Uniform2f(int32_t location, float x, float y) >+ void Uniform2fv(int32_t location, IPC::ArrayReference<float> v) >+ void Uniform2i(int32_t location, int32_t x, int32_t y) >+ void Uniform2iv(int32_t location, IPC::ArrayReference<int32_t> v) >+ void Uniform3f(int32_t location, float x, float y, float z) >+ void Uniform3fv(int32_t location, IPC::ArrayReference<float> v) >+ void Uniform3i(int32_t location, int32_t x, int32_t y, int32_t z) >+ void Uniform3iv(int32_t location, IPC::ArrayReference<int32_t> v) >+ void Uniform4f(int32_t location, float x, float y, float z, float w) >+ void Uniform4fv(int32_t location, IPC::ArrayReference<float> v) >+ void Uniform4i(int32_t location, int32_t x, int32_t y, int32_t z, int32_t w) >+ void Uniform4iv(int32_t location, IPC::ArrayReference<int32_t> v) >+ void UniformMatrix2fv(int32_t location, bool transpose, IPC::ArrayReference<float> value) >+ void UniformMatrix3fv(int32_t location, bool transpose, IPC::ArrayReference<float> value) >+ void UniformMatrix4fv(int32_t location, bool transpose, IPC::ArrayReference<float> value) >+ void UseProgram(uint32_t arg0) >+ void ValidateProgram(uint32_t arg0) >+ void VertexAttrib1f(uint32_t index, float x) >+ void VertexAttrib1fv(uint32_t index, IPC::ArrayReference<float, 1> values) >+ void VertexAttrib2f(uint32_t index, float x, float y) >+ void VertexAttrib2fv(uint32_t index, IPC::ArrayReference<float, 2> values) >+ void VertexAttrib3f(uint32_t index, float x, float y, float z) >+ void VertexAttrib3fv(uint32_t index, IPC::ArrayReference<float, 3> values) >+ void VertexAttrib4f(uint32_t index, float x, float y, float z, float w) >+ void VertexAttrib4fv(uint32_t index, IPC::ArrayReference<float, 4> values) >+ void VertexAttribPointer(uint32_t index, int32_t size, uint32_t type, bool normalized, int32_t stride, uint64_t offset) >+ void Viewport(int32_t x, int32_t y, int32_t width, int32_t height) >+ void BufferData0(uint32_t target, uint64_t arg1, uint32_t usage) >+ void BufferData1(uint32_t target, IPC::ArrayReference<uint8_t> data, uint32_t usage) >+ void BufferSubData(uint32_t target, uint64_t offset, IPC::ArrayReference<uint8_t> data) >+ void ReadnPixels0(int32_t x, int32_t y, int32_t width, int32_t height, uint32_t format, uint32_t type, uint64_t dataSize) -> (IPC::ArrayReference<uint8_t> data) Synchronous >+ void ReadnPixels1(int32_t x, int32_t y, int32_t width, int32_t height, uint32_t format, uint32_t type, uint64_t offset) >+ void TexImage2D0(uint32_t target, int32_t level, uint32_t internalformat, int32_t width, int32_t height, int32_t border, uint32_t format, uint32_t type, IPC::ArrayReference<uint8_t> pixels) >+ void TexImage2D1(uint32_t target, int32_t level, uint32_t internalformat, int32_t width, int32_t height, int32_t border, uint32_t format, uint32_t type, uint64_t offset) >+ void TexSubImage2D0(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t width, int32_t height, uint32_t format, uint32_t type, IPC::ArrayReference<uint8_t> pixels) >+ void TexSubImage2D1(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t width, int32_t height, uint32_t format, uint32_t type, uint64_t offset) >+ void CompressedTexImage2D0(uint32_t target, int32_t level, uint32_t internalformat, int32_t width, int32_t height, int32_t border, int32_t imageSize, IPC::ArrayReference<uint8_t> data) >+ void CompressedTexImage2D1(uint32_t target, int32_t level, uint32_t internalformat, int32_t width, int32_t height, int32_t border, int32_t imageSize, uint64_t offset) >+ void CompressedTexSubImage2D0(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t width, int32_t height, uint32_t format, int32_t imageSize, IPC::ArrayReference<uint8_t> data) >+ void CompressedTexSubImage2D1(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t width, int32_t height, uint32_t format, int32_t imageSize, uint64_t offset) >+ void DrawArraysInstanced(uint32_t mode, int32_t first, int32_t count, int32_t primcount) >+ void DrawElementsInstanced(uint32_t mode, int32_t count, uint32_t type, uint64_t offset, int32_t primcount) >+ void VertexAttribDivisor(uint32_t index, uint32_t divisor) >+ void CreateVertexArray() -> (uint32_t returnValue) Synchronous >+ void DeleteVertexArray(uint32_t arg0) >+ void IsVertexArray(uint32_t arg0) -> (bool returnValue) Synchronous >+ void BindVertexArray(uint32_t arg0) >+ void CopyBufferSubData(uint32_t readTarget, uint32_t writeTarget, uint64_t readOffset, uint64_t writeOffset, uint64_t arg4) >+ void GetBufferSubData(uint32_t target, uint64_t offset, uint64_t dataSize) -> (IPC::ArrayReference<uint8_t> data) Synchronous >+ void BlitFramebuffer(int32_t srcX0, int32_t srcY0, int32_t srcX1, int32_t srcY1, int32_t dstX0, int32_t dstY0, int32_t dstX1, int32_t dstY1, uint32_t mask, uint32_t filter) >+ void FramebufferTextureLayer(uint32_t target, uint32_t attachment, uint32_t texture, int32_t level, int32_t layer) >+ void InvalidateFramebuffer(uint32_t target, IPC::ArrayReference<uint32_t> attachments) >+ void InvalidateSubFramebuffer(uint32_t target, IPC::ArrayReference<uint32_t> attachments, int32_t x, int32_t y, int32_t width, int32_t height) >+ void ReadBuffer(uint32_t src) >+ void RenderbufferStorageMultisample(uint32_t target, int32_t samples, uint32_t internalformat, int32_t width, int32_t height) >+ void TexStorage2D(uint32_t target, int32_t levels, uint32_t internalformat, int32_t width, int32_t height) >+ void TexStorage3D(uint32_t target, int32_t levels, uint32_t internalformat, int32_t width, int32_t height, int32_t depth) >+ void TexImage3D0(uint32_t target, int32_t level, int32_t internalformat, int32_t width, int32_t height, int32_t depth, int32_t border, uint32_t format, uint32_t type, IPC::ArrayReference<uint8_t> pixels) >+ void TexImage3D1(uint32_t target, int32_t level, int32_t internalformat, int32_t width, int32_t height, int32_t depth, int32_t border, uint32_t format, uint32_t type, uint64_t offset) >+ void TexSubImage3D0(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t zoffset, int32_t width, int32_t height, int32_t depth, uint32_t format, uint32_t type, IPC::ArrayReference<uint8_t> pixels) >+ void TexSubImage3D1(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t zoffset, int32_t width, int32_t height, int32_t depth, uint32_t format, uint32_t type, uint64_t offset) >+ void CopyTexSubImage3D(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t zoffset, int32_t x, int32_t y, int32_t width, int32_t height) >+ void CompressedTexImage3D0(uint32_t target, int32_t level, uint32_t internalformat, int32_t width, int32_t height, int32_t depth, int32_t border, int32_t imageSize, IPC::ArrayReference<uint8_t> data) >+ void CompressedTexImage3D1(uint32_t target, int32_t level, uint32_t internalformat, int32_t width, int32_t height, int32_t depth, int32_t border, int32_t imageSize, uint64_t offset) >+ void CompressedTexSubImage3D0(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t zoffset, int32_t width, int32_t height, int32_t depth, uint32_t format, int32_t imageSize, IPC::ArrayReference<uint8_t> data) >+ void CompressedTexSubImage3D1(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t zoffset, int32_t width, int32_t height, int32_t depth, uint32_t format, int32_t imageSize, uint64_t offset) >+ void GetFragDataLocation(uint32_t program, String name) -> (int32_t returnValue) Synchronous >+ void Uniform1ui(int32_t location, uint32_t v0) >+ void Uniform2ui(int32_t location, uint32_t v0, uint32_t v1) >+ void Uniform3ui(int32_t location, uint32_t v0, uint32_t v1, uint32_t v2) >+ void Uniform4ui(int32_t location, uint32_t v0, uint32_t v1, uint32_t v2, uint32_t v3) >+ void Uniform1uiv(int32_t location, IPC::ArrayReference<uint32_t> data) >+ void Uniform2uiv(int32_t location, IPC::ArrayReference<uint32_t> data) >+ void Uniform3uiv(int32_t location, IPC::ArrayReference<uint32_t> data) >+ void Uniform4uiv(int32_t location, IPC::ArrayReference<uint32_t> data) >+ void UniformMatrix2x3fv(int32_t location, bool transpose, IPC::ArrayReference<float> data) >+ void UniformMatrix3x2fv(int32_t location, bool transpose, IPC::ArrayReference<float> data) >+ void UniformMatrix2x4fv(int32_t location, bool transpose, IPC::ArrayReference<float> data) >+ void UniformMatrix4x2fv(int32_t location, bool transpose, IPC::ArrayReference<float> data) >+ void UniformMatrix3x4fv(int32_t location, bool transpose, IPC::ArrayReference<float> data) >+ void UniformMatrix4x3fv(int32_t location, bool transpose, IPC::ArrayReference<float> data) >+ void VertexAttribI4i(uint32_t index, int32_t x, int32_t y, int32_t z, int32_t w) >+ void VertexAttribI4iv(uint32_t index, IPC::ArrayReference<int32_t, 4> values) >+ void VertexAttribI4ui(uint32_t index, uint32_t x, uint32_t y, uint32_t z, uint32_t w) >+ void VertexAttribI4uiv(uint32_t index, IPC::ArrayReference<uint32_t, 4> values) >+ void VertexAttribIPointer(uint32_t index, int32_t size, uint32_t type, int32_t stride, uint64_t offset) >+ void DrawRangeElements(uint32_t mode, uint32_t start, uint32_t end, int32_t count, uint32_t type, uint64_t offset) >+ void DrawBuffers(IPC::ArrayReference<uint32_t> bufs) >+ void ClearBufferiv(uint32_t buffer, int32_t drawbuffer, IPC::ArrayReference<int32_t> values) >+ void ClearBufferuiv(uint32_t buffer, int32_t drawbuffer, IPC::ArrayReference<uint32_t> values) >+ void ClearBufferfv(uint32_t buffer, int32_t drawbuffer, IPC::ArrayReference<float> values) >+ void ClearBufferfi(uint32_t buffer, int32_t drawbuffer, float depth, int32_t stencil) >+ void CreateQuery() -> (uint32_t returnValue) Synchronous >+ void DeleteQuery(uint32_t query) >+ void IsQuery(uint32_t query) -> (bool returnValue) Synchronous >+ void BeginQuery(uint32_t target, uint32_t query) >+ void EndQuery(uint32_t target) >+ void GetQuery(uint32_t target, uint32_t pname) -> (uint32_t returnValue) Synchronous >+ void GetQueryObjectui(uint32_t query, uint32_t pname) -> (uint32_t returnValue) Synchronous >+ void CreateSampler() -> (uint32_t returnValue) Synchronous >+ void DeleteSampler(uint32_t sampler) >+ void IsSampler(uint32_t sampler) -> (bool returnValue) Synchronous >+ void BindSampler(uint32_t unit, uint32_t sampler) >+ void SamplerParameteri(uint32_t sampler, uint32_t pname, int32_t param) >+ void SamplerParameterf(uint32_t sampler, uint32_t pname, float param) >+ void GetSamplerParameterf(uint32_t sampler, uint32_t pname) -> (float returnValue) Synchronous >+ void GetSamplerParameteri(uint32_t sampler, uint32_t pname) -> (int32_t returnValue) Synchronous >+ void FenceSync(uint32_t condition, uint32_t flags) -> (uint64_t returnValue) Synchronous >+ void IsSync(uint64_t arg0) -> (bool returnValue) Synchronous >+ void DeleteSync(uint64_t arg0) >+ void ClientWaitSync(uint64_t arg0, uint32_t flags, uint64_t timeout) -> (uint32_t returnValue) Synchronous >+ void WaitSync(uint64_t arg0, uint32_t flags, int64_t timeout) >+ void GetSynci(uint64_t arg0, uint32_t pname) -> (int32_t returnValue) Synchronous >+ void CreateTransformFeedback() -> (uint32_t returnValue) Synchronous >+ void DeleteTransformFeedback(uint32_t id) >+ void IsTransformFeedback(uint32_t id) -> (bool returnValue) Synchronous >+ void BindTransformFeedback(uint32_t target, uint32_t id) >+ void BeginTransformFeedback(uint32_t primitiveMode) >+ void EndTransformFeedback() >+ void TransformFeedbackVaryings(uint32_t program, Vector<String> varyings, uint32_t bufferMode) >+ void GetTransformFeedbackVarying(uint32_t program, uint32_t index) -> (WebCore::GraphicsContextGL::ActiveInfo arg2) Synchronous >+ void PauseTransformFeedback() >+ void ResumeTransformFeedback() >+ void BindBufferBase(uint32_t target, uint32_t index, uint32_t buffer) >+ void BindBufferRange(uint32_t target, uint32_t index, uint32_t buffer, uint64_t offset, uint64_t arg4) >+ void GetUniformIndices(uint32_t program, Vector<String> uniformNames) -> (Vector<uint32_t> returnValue) Synchronous >+ void GetActiveUniforms(uint32_t program, Vector<uint32_t> uniformIndices, uint32_t pname) -> (Vector<int32_t> returnValue) Synchronous >+ void GetUniformBlockIndex(uint32_t program, String uniformBlockName) -> (uint32_t returnValue) Synchronous >+ void GetActiveUniformBlockName(uint32_t program, uint32_t uniformBlockIndex) -> (String returnValue) Synchronous >+ void UniformBlockBinding(uint32_t program, uint32_t uniformBlockIndex, uint32_t uniformBlockBinding) >+ void GetActiveUniformBlockiv(uint32_t program, uint32_t uniformBlockIndex, uint32_t pname, uint64_t paramsSize) -> (IPC::ArrayReference<int32_t> params) Synchronous >+ void GetGraphicsResetStatusARB() -> (int32_t returnValue) Synchronous >+ void BlitFramebufferANGLE(int32_t srcX0, int32_t srcY0, int32_t srcX1, int32_t srcY1, int32_t dstX0, int32_t dstY0, int32_t dstX1, int32_t dstY1, uint32_t mask, uint32_t filter) >+ void RenderbufferStorageMultisampleANGLE(uint32_t target, int32_t samples, uint32_t internalformat, int32_t width, int32_t height) >+ void CreateVertexArrayOES() -> (uint32_t returnValue) Synchronous >+ void DeleteVertexArrayOES(uint32_t arg0) >+ void IsVertexArrayOES(uint32_t arg0) -> (bool returnValue) Synchronous >+ void BindVertexArrayOES(uint32_t arg0) >+ void GetTranslatedShaderSourceANGLE(uint32_t arg0) -> (String returnValue) Synchronous >+ void InsertEventMarkerEXT(String arg0) >+ void PushGroupMarkerEXT(String arg0) >+ void PopGroupMarkerEXT() >+ void DrawBuffersEXT(IPC::ArrayReference<uint32_t> bufs) >+ void DrawArraysInstancedANGLE(uint32_t mode, int32_t first, int32_t count, int32_t primcount) >+ void DrawElementsInstancedANGLE(uint32_t mode, int32_t count, uint32_t type, uint64_t offset, int32_t primcount) >+ void VertexAttribDivisorANGLE(uint32_t index, uint32_t divisor) >+} >+ >+#endif >+ >diff --git a/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h b/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h >new file mode 100644 >index 0000000000000000000000000000000000000000..9ffe8c1fc7afa172f1bb9c7342675c5dfe6e176e >--- /dev/null >+++ b/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h >@@ -0,0 +1,1183 @@ >+/* Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND >+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR >+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR >+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER >+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, >+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+// This file is generated by generate-gpup-webgl. Do not edit. >+// This file should be included in the private section of the >+// RemoteGraphicsContextGL implementations. >+#pragma once >+ void setFailNextGPUStatusCheck() >+ { >+ m_context->setFailNextGPUStatusCheck(); >+ } >+ void synthesizeGLError(uint32_t error) >+ { >+ m_context->synthesizeGLError(error); >+ } >+ void moveErrorsToSyntheticErrorList(CompletionHandler<void(bool)>&& completionHandler) >+ { >+ bool returnValue = { }; >+ returnValue = m_context->moveErrorsToSyntheticErrorList(); >+ completionHandler(returnValue); >+ } >+ void activeTexture(uint32_t texture) >+ { >+ m_context->activeTexture(texture); >+ } >+ void attachShader(uint32_t program, uint32_t shader) >+ { >+ m_context->attachShader(program, shader); >+ } >+ void bindAttribLocation(uint32_t arg0, uint32_t index, String&& name) >+ { >+ m_context->bindAttribLocation(arg0, index, name); >+ } >+ void bindBuffer(uint32_t target, uint32_t arg1) >+ { >+ m_context->bindBuffer(target, arg1); >+ } >+ void bindFramebuffer(uint32_t target, uint32_t arg1) >+ { >+ m_context->bindFramebuffer(target, arg1); >+ } >+ void bindRenderbuffer(uint32_t target, uint32_t arg1) >+ { >+ m_context->bindRenderbuffer(target, arg1); >+ } >+ void bindTexture(uint32_t target, uint32_t arg1) >+ { >+ m_context->bindTexture(target, arg1); >+ } >+ void blendColor(float red, float green, float blue, float alpha) >+ { >+ m_context->blendColor(red, green, blue, alpha); >+ } >+ void blendEquation(uint32_t mode) >+ { >+ m_context->blendEquation(mode); >+ } >+ void blendEquationSeparate(uint32_t modeRGB, uint32_t modeAlpha) >+ { >+ m_context->blendEquationSeparate(modeRGB, modeAlpha); >+ } >+ void blendFunc(uint32_t sfactor, uint32_t dfactor) >+ { >+ m_context->blendFunc(sfactor, dfactor); >+ } >+ void blendFuncSeparate(uint32_t srcRGB, uint32_t dstRGB, uint32_t srcAlpha, uint32_t dstAlpha) >+ { >+ m_context->blendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha); >+ } >+ void checkFramebufferStatus(uint32_t target, CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ GCGLenum returnValue = { }; >+ returnValue = m_context->checkFramebufferStatus(target); >+ completionHandler(returnValue); >+ } >+ void clear(uint32_t mask) >+ { >+ m_context->clear(mask); >+ } >+ void clearColor(float red, float green, float blue, float alpha) >+ { >+ m_context->clearColor(red, green, blue, alpha); >+ } >+ void clearDepth(float depth) >+ { >+ m_context->clearDepth(depth); >+ } >+ void clearStencil(int32_t s) >+ { >+ m_context->clearStencil(s); >+ } >+ void colorMask(bool red, bool green, bool blue, bool alpha) >+ { >+ m_context->colorMask(static_cast<GCGLboolean>(red), static_cast<GCGLboolean>(green), static_cast<GCGLboolean>(blue), static_cast<GCGLboolean>(alpha)); >+ } >+ void compileShader(uint32_t arg0) >+ { >+ m_context->compileShader(arg0); >+ } >+ void copyTexImage2D(uint32_t target, int32_t level, uint32_t internalformat, int32_t x, int32_t y, int32_t width, int32_t height, int32_t border) >+ { >+ m_context->copyTexImage2D(target, level, internalformat, x, y, width, height, border); >+ } >+ void copyTexSubImage2D(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t x, int32_t y, int32_t width, int32_t height) >+ { >+ m_context->copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); >+ } >+ void createBuffer(CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ PlatformGLObject returnValue = { }; >+ returnValue = m_context->createBuffer(); >+ completionHandler(returnValue); >+ } >+ void createFramebuffer(CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ PlatformGLObject returnValue = { }; >+ returnValue = m_context->createFramebuffer(); >+ completionHandler(returnValue); >+ } >+ void createProgram(CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ PlatformGLObject returnValue = { }; >+ returnValue = m_context->createProgram(); >+ completionHandler(returnValue); >+ } >+ void createRenderbuffer(CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ PlatformGLObject returnValue = { }; >+ returnValue = m_context->createRenderbuffer(); >+ completionHandler(returnValue); >+ } >+ void createShader(uint32_t arg0, CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ PlatformGLObject returnValue = { }; >+ returnValue = m_context->createShader(arg0); >+ completionHandler(returnValue); >+ } >+ void createTexture(CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ PlatformGLObject returnValue = { }; >+ returnValue = m_context->createTexture(); >+ completionHandler(returnValue); >+ } >+ void cullFace(uint32_t mode) >+ { >+ m_context->cullFace(mode); >+ } >+ void deleteBuffer(uint32_t arg0) >+ { >+ m_context->deleteBuffer(arg0); >+ } >+ void deleteFramebuffer(uint32_t arg0) >+ { >+ m_context->deleteFramebuffer(arg0); >+ } >+ void deleteProgram(uint32_t arg0) >+ { >+ m_context->deleteProgram(arg0); >+ } >+ void deleteRenderbuffer(uint32_t arg0) >+ { >+ m_context->deleteRenderbuffer(arg0); >+ } >+ void deleteShader(uint32_t arg0) >+ { >+ m_context->deleteShader(arg0); >+ } >+ void deleteTexture(uint32_t arg0) >+ { >+ m_context->deleteTexture(arg0); >+ } >+ void depthFunc(uint32_t func) >+ { >+ m_context->depthFunc(func); >+ } >+ void depthMask(bool flag) >+ { >+ m_context->depthMask(static_cast<GCGLboolean>(flag)); >+ } >+ void depthRange(float zNear, float zFar) >+ { >+ m_context->depthRange(zNear, zFar); >+ } >+ void detachShader(uint32_t arg0, uint32_t arg1) >+ { >+ m_context->detachShader(arg0, arg1); >+ } >+ void disable(uint32_t cap) >+ { >+ m_context->disable(cap); >+ } >+ void disableVertexAttribArray(uint32_t index) >+ { >+ m_context->disableVertexAttribArray(index); >+ } >+ void drawArrays(uint32_t mode, int32_t first, int32_t count) >+ { >+ m_context->drawArrays(mode, first, count); >+ } >+ void drawElements(uint32_t mode, int32_t count, uint32_t type, uint64_t offset) >+ { >+ m_context->drawElements(mode, count, type, static_cast<GCGLintptr>(offset)); >+ } >+ void enable(uint32_t cap) >+ { >+ m_context->enable(cap); >+ } >+ void enableVertexAttribArray(uint32_t index) >+ { >+ m_context->enableVertexAttribArray(index); >+ } >+ void finish() >+ { >+ m_context->finish(); >+ } >+ void flush() >+ { >+ m_context->flush(); >+ } >+ void framebufferRenderbuffer(uint32_t target, uint32_t attachment, uint32_t renderbuffertarget, uint32_t arg3) >+ { >+ m_context->framebufferRenderbuffer(target, attachment, renderbuffertarget, arg3); >+ } >+ void framebufferTexture2D(uint32_t target, uint32_t attachment, uint32_t textarget, uint32_t arg3, int32_t level) >+ { >+ m_context->framebufferTexture2D(target, attachment, textarget, arg3, level); >+ } >+ void frontFace(uint32_t mode) >+ { >+ m_context->frontFace(mode); >+ } >+ void generateMipmap(uint32_t target) >+ { >+ m_context->generateMipmap(target); >+ } >+ void getActiveAttrib(uint32_t program, uint32_t index, CompletionHandler<void(bool, WebCore::GraphicsContextGL::ActiveInfo&&)>&& completionHandler) >+ { >+ bool returnValue = { }; >+ WebCore::GraphicsContextGL::ActiveInfo arg2 { }; >+ returnValue = m_context->getActiveAttrib(program, index, arg2); >+ completionHandler(returnValue, WTFMove(arg2)); >+ } >+ void getActiveUniform(uint32_t program, uint32_t index, CompletionHandler<void(bool, WebCore::GraphicsContextGL::ActiveInfo&&)>&& completionHandler) >+ { >+ bool returnValue = { }; >+ WebCore::GraphicsContextGL::ActiveInfo arg2 { }; >+ returnValue = m_context->getActiveUniform(program, index, arg2); >+ completionHandler(returnValue, WTFMove(arg2)); >+ } >+ void getAttribLocation(uint32_t arg0, String&& name, CompletionHandler<void(int32_t)>&& completionHandler) >+ { >+ GCGLint returnValue = { }; >+ returnValue = m_context->getAttribLocation(arg0, name); >+ completionHandler(returnValue); >+ } >+ void getBufferParameteri(uint32_t target, uint32_t pname, CompletionHandler<void(int32_t)>&& completionHandler) >+ { >+ GCGLint returnValue = { }; >+ returnValue = m_context->getBufferParameteri(target, pname); >+ completionHandler(returnValue); >+ } >+ void getString(uint32_t name, CompletionHandler<void(String&&)>&& completionHandler) >+ { >+ String returnValue = { }; >+ returnValue = m_context->getString(name); >+ completionHandler(WTFMove(returnValue)); >+ } >+ void getFloatv(uint32_t pname, uint64_t valueSize, CompletionHandler<void(IPC::ArrayReference<float>)>&& completionHandler) >+ { >+ Vector<GCGLfloat, 16> value(static_cast<size_t>(valueSize), 0); >+ m_context->getFloatv(pname, value); >+ completionHandler(IPC::ArrayReference<float>(reinterpret_cast<float*>(value.data()), value.size())); >+ } >+ void getIntegerv(uint32_t pname, uint64_t valueSize, CompletionHandler<void(IPC::ArrayReference<int32_t>)>&& completionHandler) >+ { >+ Vector<GCGLint, 4> value(static_cast<size_t>(valueSize), 0); >+ m_context->getIntegerv(pname, value); >+ completionHandler(IPC::ArrayReference<int32_t>(reinterpret_cast<int32_t*>(value.data()), value.size())); >+ } >+ void getInteger64(uint32_t pname, CompletionHandler<void(int64_t)>&& completionHandler) >+ { >+ GCGLint64 returnValue = { }; >+ returnValue = m_context->getInteger64(pname); >+ completionHandler(static_cast<int64_t>(returnValue)); >+ } >+ void getInteger64i(uint32_t pname, uint32_t index, CompletionHandler<void(int64_t)>&& completionHandler) >+ { >+ GCGLint64 returnValue = { }; >+ returnValue = m_context->getInteger64i(pname, index); >+ completionHandler(static_cast<int64_t>(returnValue)); >+ } >+ void getProgrami(uint32_t program, uint32_t pname, CompletionHandler<void(int32_t)>&& completionHandler) >+ { >+ GCGLint returnValue = { }; >+ returnValue = m_context->getProgrami(program, pname); >+ completionHandler(returnValue); >+ } >+ void getBooleanv(uint32_t pname, uint64_t valueSize, CompletionHandler<void(IPC::ArrayReference<bool>)>&& completionHandler) >+ { >+ Vector<GCGLboolean, 4> value(static_cast<size_t>(valueSize), 0); >+ m_context->getBooleanv(pname, value); >+ completionHandler(IPC::ArrayReference<bool>(reinterpret_cast<bool*>(value.data()), value.size())); >+ } >+ void getError(CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ GCGLenum returnValue = { }; >+ returnValue = m_context->getError(); >+ completionHandler(returnValue); >+ } >+ void getFramebufferAttachmentParameteri(uint32_t target, uint32_t attachment, uint32_t pname, CompletionHandler<void(int32_t)>&& completionHandler) >+ { >+ GCGLint returnValue = { }; >+ returnValue = m_context->getFramebufferAttachmentParameteri(target, attachment, pname); >+ completionHandler(returnValue); >+ } >+ void getProgramInfoLog(uint32_t arg0, CompletionHandler<void(String&&)>&& completionHandler) >+ { >+ String returnValue = { }; >+ returnValue = m_context->getProgramInfoLog(arg0); >+ completionHandler(WTFMove(returnValue)); >+ } >+ void getRenderbufferParameteri(uint32_t target, uint32_t pname, CompletionHandler<void(int32_t)>&& completionHandler) >+ { >+ GCGLint returnValue = { }; >+ returnValue = m_context->getRenderbufferParameteri(target, pname); >+ completionHandler(returnValue); >+ } >+ void getShaderi(uint32_t arg0, uint32_t pname, CompletionHandler<void(int32_t)>&& completionHandler) >+ { >+ GCGLint returnValue = { }; >+ returnValue = m_context->getShaderi(arg0, pname); >+ completionHandler(returnValue); >+ } >+ void getShaderInfoLog(uint32_t arg0, CompletionHandler<void(String&&)>&& completionHandler) >+ { >+ String returnValue = { }; >+ returnValue = m_context->getShaderInfoLog(arg0); >+ completionHandler(WTFMove(returnValue)); >+ } >+ void getShaderPrecisionFormat(uint32_t shaderType, uint32_t precisionType, CompletionHandler<void(IPC::ArrayReference<int32_t, 2>, int32_t)>&& completionHandler) >+ { >+ std::array<GCGLint, 2> range { }; >+ GCGLint precision = { }; >+ m_context->getShaderPrecisionFormat(shaderType, precisionType, range, &precision); >+ completionHandler(IPC::ArrayReference<int32_t, 2>(reinterpret_cast<int32_t*>(range.data()), range.size()), precision); >+ } >+ void getShaderSource(uint32_t arg0, CompletionHandler<void(String&&)>&& completionHandler) >+ { >+ String returnValue = { }; >+ returnValue = m_context->getShaderSource(arg0); >+ completionHandler(WTFMove(returnValue)); >+ } >+ void getTexParameterf(uint32_t target, uint32_t pname, CompletionHandler<void(float)>&& completionHandler) >+ { >+ GCGLfloat returnValue = { }; >+ returnValue = m_context->getTexParameterf(target, pname); >+ completionHandler(returnValue); >+ } >+ void getTexParameteri(uint32_t target, uint32_t pname, CompletionHandler<void(int32_t)>&& completionHandler) >+ { >+ GCGLint returnValue = { }; >+ returnValue = m_context->getTexParameteri(target, pname); >+ completionHandler(returnValue); >+ } >+ void getUniformfv(uint32_t program, int32_t location, uint64_t valueSize, CompletionHandler<void(IPC::ArrayReference<float>)>&& completionHandler) >+ { >+ Vector<GCGLfloat, 16> value(static_cast<size_t>(valueSize), 0); >+ m_context->getUniformfv(program, location, value); >+ completionHandler(IPC::ArrayReference<float>(reinterpret_cast<float*>(value.data()), value.size())); >+ } >+ void getUniformiv(uint32_t program, int32_t location, uint64_t valueSize, CompletionHandler<void(IPC::ArrayReference<int32_t>)>&& completionHandler) >+ { >+ Vector<GCGLint, 4> value(static_cast<size_t>(valueSize), 0); >+ m_context->getUniformiv(program, location, value); >+ completionHandler(IPC::ArrayReference<int32_t>(reinterpret_cast<int32_t*>(value.data()), value.size())); >+ } >+ void getUniformuiv(uint32_t program, int32_t location, uint64_t valueSize, CompletionHandler<void(IPC::ArrayReference<uint32_t>)>&& completionHandler) >+ { >+ Vector<GCGLuint, 4> value(static_cast<size_t>(valueSize), 0); >+ m_context->getUniformuiv(program, location, value); >+ completionHandler(IPC::ArrayReference<uint32_t>(reinterpret_cast<uint32_t*>(value.data()), value.size())); >+ } >+ void getUniformLocation(uint32_t arg0, String&& name, CompletionHandler<void(int32_t)>&& completionHandler) >+ { >+ GCGLint returnValue = { }; >+ returnValue = m_context->getUniformLocation(arg0, name); >+ completionHandler(returnValue); >+ } >+ void getVertexAttribOffset(uint32_t index, uint32_t pname, CompletionHandler<void(uint64_t)>&& completionHandler) >+ { >+ GCGLsizeiptr returnValue = { }; >+ returnValue = m_context->getVertexAttribOffset(index, pname); >+ completionHandler(static_cast<uint64_t>(returnValue)); >+ } >+ void hint(uint32_t target, uint32_t mode) >+ { >+ m_context->hint(target, mode); >+ } >+ void isBuffer(uint32_t arg0, CompletionHandler<void(bool)>&& completionHandler) >+ { >+ GCGLboolean returnValue = { }; >+ returnValue = m_context->isBuffer(arg0); >+ completionHandler(static_cast<bool>(returnValue)); >+ } >+ void isEnabled(uint32_t cap, CompletionHandler<void(bool)>&& completionHandler) >+ { >+ GCGLboolean returnValue = { }; >+ returnValue = m_context->isEnabled(cap); >+ completionHandler(static_cast<bool>(returnValue)); >+ } >+ void isFramebuffer(uint32_t arg0, CompletionHandler<void(bool)>&& completionHandler) >+ { >+ GCGLboolean returnValue = { }; >+ returnValue = m_context->isFramebuffer(arg0); >+ completionHandler(static_cast<bool>(returnValue)); >+ } >+ void isProgram(uint32_t arg0, CompletionHandler<void(bool)>&& completionHandler) >+ { >+ GCGLboolean returnValue = { }; >+ returnValue = m_context->isProgram(arg0); >+ completionHandler(static_cast<bool>(returnValue)); >+ } >+ void isRenderbuffer(uint32_t arg0, CompletionHandler<void(bool)>&& completionHandler) >+ { >+ GCGLboolean returnValue = { }; >+ returnValue = m_context->isRenderbuffer(arg0); >+ completionHandler(static_cast<bool>(returnValue)); >+ } >+ void isShader(uint32_t arg0, CompletionHandler<void(bool)>&& completionHandler) >+ { >+ GCGLboolean returnValue = { }; >+ returnValue = m_context->isShader(arg0); >+ completionHandler(static_cast<bool>(returnValue)); >+ } >+ void isTexture(uint32_t arg0, CompletionHandler<void(bool)>&& completionHandler) >+ { >+ GCGLboolean returnValue = { }; >+ returnValue = m_context->isTexture(arg0); >+ completionHandler(static_cast<bool>(returnValue)); >+ } >+ void lineWidth(float arg0) >+ { >+ m_context->lineWidth(arg0); >+ } >+ void linkProgram(uint32_t arg0) >+ { >+ m_context->linkProgram(arg0); >+ } >+ void pixelStorei(uint32_t pname, int32_t param) >+ { >+ m_context->pixelStorei(pname, param); >+ } >+ void polygonOffset(float factor, float units) >+ { >+ m_context->polygonOffset(factor, units); >+ } >+ void renderbufferStorage(uint32_t target, uint32_t internalformat, int32_t width, int32_t height) >+ { >+ m_context->renderbufferStorage(target, internalformat, width, height); >+ } >+ void sampleCoverage(float value, bool invert) >+ { >+ m_context->sampleCoverage(value, static_cast<GCGLboolean>(invert)); >+ } >+ void scissor(int32_t x, int32_t y, int32_t width, int32_t height) >+ { >+ m_context->scissor(x, y, width, height); >+ } >+ void shaderSource(uint32_t arg0, String&& arg1) >+ { >+ m_context->shaderSource(arg0, arg1); >+ } >+ void stencilFunc(uint32_t func, int32_t ref, uint32_t mask) >+ { >+ m_context->stencilFunc(func, ref, mask); >+ } >+ void stencilFuncSeparate(uint32_t face, uint32_t func, int32_t ref, uint32_t mask) >+ { >+ m_context->stencilFuncSeparate(face, func, ref, mask); >+ } >+ void stencilMask(uint32_t mask) >+ { >+ m_context->stencilMask(mask); >+ } >+ void stencilMaskSeparate(uint32_t face, uint32_t mask) >+ { >+ m_context->stencilMaskSeparate(face, mask); >+ } >+ void stencilOp(uint32_t fail, uint32_t zfail, uint32_t zpass) >+ { >+ m_context->stencilOp(fail, zfail, zpass); >+ } >+ void stencilOpSeparate(uint32_t face, uint32_t fail, uint32_t zfail, uint32_t zpass) >+ { >+ m_context->stencilOpSeparate(face, fail, zfail, zpass); >+ } >+ void texParameterf(uint32_t target, uint32_t pname, float param) >+ { >+ m_context->texParameterf(target, pname, param); >+ } >+ void texParameteri(uint32_t target, uint32_t pname, int32_t param) >+ { >+ m_context->texParameteri(target, pname, param); >+ } >+ void uniform1f(int32_t location, float x) >+ { >+ m_context->uniform1f(location, x); >+ } >+ void uniform1fv(int32_t location, IPC::ArrayReference<float>&& v) >+ { >+ m_context->uniform1fv(location, makeGCGLSpan(reinterpret_cast<const GCGLfloat*>(v.data()), v.size())); >+ } >+ void uniform1i(int32_t location, int32_t x) >+ { >+ m_context->uniform1i(location, x); >+ } >+ void uniform1iv(int32_t location, IPC::ArrayReference<int32_t>&& v) >+ { >+ m_context->uniform1iv(location, makeGCGLSpan(reinterpret_cast<const GCGLint*>(v.data()), v.size())); >+ } >+ void uniform2f(int32_t location, float x, float y) >+ { >+ m_context->uniform2f(location, x, y); >+ } >+ void uniform2fv(int32_t location, IPC::ArrayReference<float>&& v) >+ { >+ m_context->uniform2fv(location, makeGCGLSpan(reinterpret_cast<const GCGLfloat*>(v.data()), v.size())); >+ } >+ void uniform2i(int32_t location, int32_t x, int32_t y) >+ { >+ m_context->uniform2i(location, x, y); >+ } >+ void uniform2iv(int32_t location, IPC::ArrayReference<int32_t>&& v) >+ { >+ m_context->uniform2iv(location, makeGCGLSpan(reinterpret_cast<const GCGLint*>(v.data()), v.size())); >+ } >+ void uniform3f(int32_t location, float x, float y, float z) >+ { >+ m_context->uniform3f(location, x, y, z); >+ } >+ void uniform3fv(int32_t location, IPC::ArrayReference<float>&& v) >+ { >+ m_context->uniform3fv(location, makeGCGLSpan(reinterpret_cast<const GCGLfloat*>(v.data()), v.size())); >+ } >+ void uniform3i(int32_t location, int32_t x, int32_t y, int32_t z) >+ { >+ m_context->uniform3i(location, x, y, z); >+ } >+ void uniform3iv(int32_t location, IPC::ArrayReference<int32_t>&& v) >+ { >+ m_context->uniform3iv(location, makeGCGLSpan(reinterpret_cast<const GCGLint*>(v.data()), v.size())); >+ } >+ void uniform4f(int32_t location, float x, float y, float z, float w) >+ { >+ m_context->uniform4f(location, x, y, z, w); >+ } >+ void uniform4fv(int32_t location, IPC::ArrayReference<float>&& v) >+ { >+ m_context->uniform4fv(location, makeGCGLSpan(reinterpret_cast<const GCGLfloat*>(v.data()), v.size())); >+ } >+ void uniform4i(int32_t location, int32_t x, int32_t y, int32_t z, int32_t w) >+ { >+ m_context->uniform4i(location, x, y, z, w); >+ } >+ void uniform4iv(int32_t location, IPC::ArrayReference<int32_t>&& v) >+ { >+ m_context->uniform4iv(location, makeGCGLSpan(reinterpret_cast<const GCGLint*>(v.data()), v.size())); >+ } >+ void uniformMatrix2fv(int32_t location, bool transpose, IPC::ArrayReference<float>&& value) >+ { >+ m_context->uniformMatrix2fv(location, static_cast<GCGLboolean>(transpose), makeGCGLSpan(reinterpret_cast<const GCGLfloat*>(value.data()), value.size())); >+ } >+ void uniformMatrix3fv(int32_t location, bool transpose, IPC::ArrayReference<float>&& value) >+ { >+ m_context->uniformMatrix3fv(location, static_cast<GCGLboolean>(transpose), makeGCGLSpan(reinterpret_cast<const GCGLfloat*>(value.data()), value.size())); >+ } >+ void uniformMatrix4fv(int32_t location, bool transpose, IPC::ArrayReference<float>&& value) >+ { >+ m_context->uniformMatrix4fv(location, static_cast<GCGLboolean>(transpose), makeGCGLSpan(reinterpret_cast<const GCGLfloat*>(value.data()), value.size())); >+ } >+ void useProgram(uint32_t arg0) >+ { >+ m_context->useProgram(arg0); >+ } >+ void validateProgram(uint32_t arg0) >+ { >+ m_context->validateProgram(arg0); >+ } >+ void vertexAttrib1f(uint32_t index, float x) >+ { >+ m_context->vertexAttrib1f(index, x); >+ } >+ void vertexAttrib1fv(uint32_t index, IPC::ArrayReference<float, 1>&& values) >+ { >+ m_context->vertexAttrib1fv(index, makeGCGLSpan<1>(reinterpret_cast<const GCGLfloat*>(values.data()))); >+ } >+ void vertexAttrib2f(uint32_t index, float x, float y) >+ { >+ m_context->vertexAttrib2f(index, x, y); >+ } >+ void vertexAttrib2fv(uint32_t index, IPC::ArrayReference<float, 2>&& values) >+ { >+ m_context->vertexAttrib2fv(index, makeGCGLSpan<2>(reinterpret_cast<const GCGLfloat*>(values.data()))); >+ } >+ void vertexAttrib3f(uint32_t index, float x, float y, float z) >+ { >+ m_context->vertexAttrib3f(index, x, y, z); >+ } >+ void vertexAttrib3fv(uint32_t index, IPC::ArrayReference<float, 3>&& values) >+ { >+ m_context->vertexAttrib3fv(index, makeGCGLSpan<3>(reinterpret_cast<const GCGLfloat*>(values.data()))); >+ } >+ void vertexAttrib4f(uint32_t index, float x, float y, float z, float w) >+ { >+ m_context->vertexAttrib4f(index, x, y, z, w); >+ } >+ void vertexAttrib4fv(uint32_t index, IPC::ArrayReference<float, 4>&& values) >+ { >+ m_context->vertexAttrib4fv(index, makeGCGLSpan<4>(reinterpret_cast<const GCGLfloat*>(values.data()))); >+ } >+ void vertexAttribPointer(uint32_t index, int32_t size, uint32_t type, bool normalized, int32_t stride, uint64_t offset) >+ { >+ m_context->vertexAttribPointer(index, size, type, static_cast<GCGLboolean>(normalized), stride, static_cast<GCGLintptr>(offset)); >+ } >+ void viewport(int32_t x, int32_t y, int32_t width, int32_t height) >+ { >+ m_context->viewport(x, y, width, height); >+ } >+ void bufferData0(uint32_t target, uint64_t arg1, uint32_t usage) >+ { >+ m_context->bufferData(target, static_cast<GCGLsizeiptr>(arg1), usage); >+ } >+ void bufferData1(uint32_t target, IPC::ArrayReference<uint8_t>&& data, uint32_t usage) >+ { >+ m_context->bufferData(target, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(data.data()), data.size()), usage); >+ } >+ void bufferSubData(uint32_t target, uint64_t offset, IPC::ArrayReference<uint8_t>&& data) >+ { >+ m_context->bufferSubData(target, static_cast<GCGLintptr>(offset), makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(data.data()), data.size())); >+ } >+ void readnPixels0(int32_t x, int32_t y, int32_t width, int32_t height, uint32_t format, uint32_t type, uint64_t dataSize, CompletionHandler<void(IPC::ArrayReference<uint8_t>)>&& completionHandler) >+ { >+ Vector<GCGLchar, 4> data(static_cast<size_t>(dataSize), 0); >+ m_context->readnPixels(x, y, width, height, format, type, data); >+ completionHandler(IPC::ArrayReference<uint8_t>(reinterpret_cast<uint8_t*>(data.data()), data.size())); >+ } >+ void readnPixels1(int32_t x, int32_t y, int32_t width, int32_t height, uint32_t format, uint32_t type, uint64_t offset) >+ { >+ m_context->readnPixels(x, y, width, height, format, type, static_cast<GCGLintptr>(offset)); >+ } >+ void texImage2D0(uint32_t target, int32_t level, uint32_t internalformat, int32_t width, int32_t height, int32_t border, uint32_t format, uint32_t type, IPC::ArrayReference<uint8_t>&& pixels) >+ { >+ m_context->texImage2D(target, level, internalformat, width, height, border, format, type, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(pixels.data()), pixels.size())); >+ } >+ void texImage2D1(uint32_t target, int32_t level, uint32_t internalformat, int32_t width, int32_t height, int32_t border, uint32_t format, uint32_t type, uint64_t offset) >+ { >+ m_context->texImage2D(target, level, internalformat, width, height, border, format, type, static_cast<GCGLintptr>(offset)); >+ } >+ void texSubImage2D0(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t width, int32_t height, uint32_t format, uint32_t type, IPC::ArrayReference<uint8_t>&& pixels) >+ { >+ m_context->texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(pixels.data()), pixels.size())); >+ } >+ void texSubImage2D1(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t width, int32_t height, uint32_t format, uint32_t type, uint64_t offset) >+ { >+ m_context->texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, static_cast<GCGLintptr>(offset)); >+ } >+ void compressedTexImage2D0(uint32_t target, int32_t level, uint32_t internalformat, int32_t width, int32_t height, int32_t border, int32_t imageSize, IPC::ArrayReference<uint8_t>&& data) >+ { >+ m_context->compressedTexImage2D(target, level, internalformat, width, height, border, imageSize, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(data.data()), data.size())); >+ } >+ void compressedTexImage2D1(uint32_t target, int32_t level, uint32_t internalformat, int32_t width, int32_t height, int32_t border, int32_t imageSize, uint64_t offset) >+ { >+ m_context->compressedTexImage2D(target, level, internalformat, width, height, border, imageSize, static_cast<GCGLintptr>(offset)); >+ } >+ void compressedTexSubImage2D0(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t width, int32_t height, uint32_t format, int32_t imageSize, IPC::ArrayReference<uint8_t>&& data) >+ { >+ m_context->compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(data.data()), data.size())); >+ } >+ void compressedTexSubImage2D1(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t width, int32_t height, uint32_t format, int32_t imageSize, uint64_t offset) >+ { >+ m_context->compressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, static_cast<GCGLintptr>(offset)); >+ } >+ void drawArraysInstanced(uint32_t mode, int32_t first, int32_t count, int32_t primcount) >+ { >+ m_context->drawArraysInstanced(mode, first, count, primcount); >+ } >+ void drawElementsInstanced(uint32_t mode, int32_t count, uint32_t type, uint64_t offset, int32_t primcount) >+ { >+ m_context->drawElementsInstanced(mode, count, type, static_cast<GCGLintptr>(offset), primcount); >+ } >+ void vertexAttribDivisor(uint32_t index, uint32_t divisor) >+ { >+ m_context->vertexAttribDivisor(index, divisor); >+ } >+ void createVertexArray(CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ PlatformGLObject returnValue = { }; >+ returnValue = m_context->createVertexArray(); >+ completionHandler(returnValue); >+ } >+ void deleteVertexArray(uint32_t arg0) >+ { >+ m_context->deleteVertexArray(arg0); >+ } >+ void isVertexArray(uint32_t arg0, CompletionHandler<void(bool)>&& completionHandler) >+ { >+ GCGLboolean returnValue = { }; >+ returnValue = m_context->isVertexArray(arg0); >+ completionHandler(static_cast<bool>(returnValue)); >+ } >+ void bindVertexArray(uint32_t arg0) >+ { >+ m_context->bindVertexArray(arg0); >+ } >+ void copyBufferSubData(uint32_t readTarget, uint32_t writeTarget, uint64_t readOffset, uint64_t writeOffset, uint64_t arg4) >+ { >+ m_context->copyBufferSubData(readTarget, writeTarget, static_cast<GCGLintptr>(readOffset), static_cast<GCGLintptr>(writeOffset), static_cast<GCGLsizeiptr>(arg4)); >+ } >+ void getBufferSubData(uint32_t target, uint64_t offset, uint64_t dataSize, CompletionHandler<void(IPC::ArrayReference<uint8_t>)>&& completionHandler) >+ { >+ Vector<GCGLchar, 4> data(static_cast<size_t>(dataSize), 0); >+ m_context->getBufferSubData(target, static_cast<GCGLintptr>(offset), data); >+ completionHandler(IPC::ArrayReference<uint8_t>(reinterpret_cast<uint8_t*>(data.data()), data.size())); >+ } >+ void blitFramebuffer(int32_t srcX0, int32_t srcY0, int32_t srcX1, int32_t srcY1, int32_t dstX0, int32_t dstY0, int32_t dstX1, int32_t dstY1, uint32_t mask, uint32_t filter) >+ { >+ m_context->blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); >+ } >+ void framebufferTextureLayer(uint32_t target, uint32_t attachment, uint32_t texture, int32_t level, int32_t layer) >+ { >+ m_context->framebufferTextureLayer(target, attachment, texture, level, layer); >+ } >+ void invalidateFramebuffer(uint32_t target, IPC::ArrayReference<uint32_t>&& attachments) >+ { >+ m_context->invalidateFramebuffer(target, makeGCGLSpan(reinterpret_cast<const GCGLenum*>(attachments.data()), attachments.size())); >+ } >+ void invalidateSubFramebuffer(uint32_t target, IPC::ArrayReference<uint32_t>&& attachments, int32_t x, int32_t y, int32_t width, int32_t height) >+ { >+ m_context->invalidateSubFramebuffer(target, makeGCGLSpan(reinterpret_cast<const GCGLenum*>(attachments.data()), attachments.size()), x, y, width, height); >+ } >+ void readBuffer(uint32_t src) >+ { >+ m_context->readBuffer(src); >+ } >+ void renderbufferStorageMultisample(uint32_t target, int32_t samples, uint32_t internalformat, int32_t width, int32_t height) >+ { >+ m_context->renderbufferStorageMultisample(target, samples, internalformat, width, height); >+ } >+ void texStorage2D(uint32_t target, int32_t levels, uint32_t internalformat, int32_t width, int32_t height) >+ { >+ m_context->texStorage2D(target, levels, internalformat, width, height); >+ } >+ void texStorage3D(uint32_t target, int32_t levels, uint32_t internalformat, int32_t width, int32_t height, int32_t depth) >+ { >+ m_context->texStorage3D(target, levels, internalformat, width, height, depth); >+ } >+ void texImage3D0(uint32_t target, int32_t level, int32_t internalformat, int32_t width, int32_t height, int32_t depth, int32_t border, uint32_t format, uint32_t type, IPC::ArrayReference<uint8_t>&& pixels) >+ { >+ m_context->texImage3D(target, level, internalformat, width, height, depth, border, format, type, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(pixels.data()), pixels.size())); >+ } >+ void texImage3D1(uint32_t target, int32_t level, int32_t internalformat, int32_t width, int32_t height, int32_t depth, int32_t border, uint32_t format, uint32_t type, uint64_t offset) >+ { >+ m_context->texImage3D(target, level, internalformat, width, height, depth, border, format, type, static_cast<GCGLintptr>(offset)); >+ } >+ void texSubImage3D0(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t zoffset, int32_t width, int32_t height, int32_t depth, uint32_t format, uint32_t type, IPC::ArrayReference<uint8_t>&& pixels) >+ { >+ m_context->texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(pixels.data()), pixels.size())); >+ } >+ void texSubImage3D1(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t zoffset, int32_t width, int32_t height, int32_t depth, uint32_t format, uint32_t type, uint64_t offset) >+ { >+ m_context->texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, static_cast<GCGLintptr>(offset)); >+ } >+ void copyTexSubImage3D(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t zoffset, int32_t x, int32_t y, int32_t width, int32_t height) >+ { >+ m_context->copyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); >+ } >+ void compressedTexImage3D0(uint32_t target, int32_t level, uint32_t internalformat, int32_t width, int32_t height, int32_t depth, int32_t border, int32_t imageSize, IPC::ArrayReference<uint8_t>&& data) >+ { >+ m_context->compressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(data.data()), data.size())); >+ } >+ void compressedTexImage3D1(uint32_t target, int32_t level, uint32_t internalformat, int32_t width, int32_t height, int32_t depth, int32_t border, int32_t imageSize, uint64_t offset) >+ { >+ m_context->compressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, static_cast<GCGLintptr>(offset)); >+ } >+ void compressedTexSubImage3D0(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t zoffset, int32_t width, int32_t height, int32_t depth, uint32_t format, int32_t imageSize, IPC::ArrayReference<uint8_t>&& data) >+ { >+ m_context->compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, makeGCGLSpan(reinterpret_cast<const GCGLvoid*>(data.data()), data.size())); >+ } >+ void compressedTexSubImage3D1(uint32_t target, int32_t level, int32_t xoffset, int32_t yoffset, int32_t zoffset, int32_t width, int32_t height, int32_t depth, uint32_t format, int32_t imageSize, uint64_t offset) >+ { >+ m_context->compressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, static_cast<GCGLintptr>(offset)); >+ } >+ void getFragDataLocation(uint32_t program, String&& name, CompletionHandler<void(int32_t)>&& completionHandler) >+ { >+ GCGLint returnValue = { }; >+ returnValue = m_context->getFragDataLocation(program, name); >+ completionHandler(returnValue); >+ } >+ void uniform1ui(int32_t location, uint32_t v0) >+ { >+ m_context->uniform1ui(location, v0); >+ } >+ void uniform2ui(int32_t location, uint32_t v0, uint32_t v1) >+ { >+ m_context->uniform2ui(location, v0, v1); >+ } >+ void uniform3ui(int32_t location, uint32_t v0, uint32_t v1, uint32_t v2) >+ { >+ m_context->uniform3ui(location, v0, v1, v2); >+ } >+ void uniform4ui(int32_t location, uint32_t v0, uint32_t v1, uint32_t v2, uint32_t v3) >+ { >+ m_context->uniform4ui(location, v0, v1, v2, v3); >+ } >+ void uniform1uiv(int32_t location, IPC::ArrayReference<uint32_t>&& data) >+ { >+ m_context->uniform1uiv(location, makeGCGLSpan(reinterpret_cast<const GCGLuint*>(data.data()), data.size())); >+ } >+ void uniform2uiv(int32_t location, IPC::ArrayReference<uint32_t>&& data) >+ { >+ m_context->uniform2uiv(location, makeGCGLSpan(reinterpret_cast<const GCGLuint*>(data.data()), data.size())); >+ } >+ void uniform3uiv(int32_t location, IPC::ArrayReference<uint32_t>&& data) >+ { >+ m_context->uniform3uiv(location, makeGCGLSpan(reinterpret_cast<const GCGLuint*>(data.data()), data.size())); >+ } >+ void uniform4uiv(int32_t location, IPC::ArrayReference<uint32_t>&& data) >+ { >+ m_context->uniform4uiv(location, makeGCGLSpan(reinterpret_cast<const GCGLuint*>(data.data()), data.size())); >+ } >+ void uniformMatrix2x3fv(int32_t location, bool transpose, IPC::ArrayReference<float>&& data) >+ { >+ m_context->uniformMatrix2x3fv(location, static_cast<GCGLboolean>(transpose), makeGCGLSpan(reinterpret_cast<const GCGLfloat*>(data.data()), data.size())); >+ } >+ void uniformMatrix3x2fv(int32_t location, bool transpose, IPC::ArrayReference<float>&& data) >+ { >+ m_context->uniformMatrix3x2fv(location, static_cast<GCGLboolean>(transpose), makeGCGLSpan(reinterpret_cast<const GCGLfloat*>(data.data()), data.size())); >+ } >+ void uniformMatrix2x4fv(int32_t location, bool transpose, IPC::ArrayReference<float>&& data) >+ { >+ m_context->uniformMatrix2x4fv(location, static_cast<GCGLboolean>(transpose), makeGCGLSpan(reinterpret_cast<const GCGLfloat*>(data.data()), data.size())); >+ } >+ void uniformMatrix4x2fv(int32_t location, bool transpose, IPC::ArrayReference<float>&& data) >+ { >+ m_context->uniformMatrix4x2fv(location, static_cast<GCGLboolean>(transpose), makeGCGLSpan(reinterpret_cast<const GCGLfloat*>(data.data()), data.size())); >+ } >+ void uniformMatrix3x4fv(int32_t location, bool transpose, IPC::ArrayReference<float>&& data) >+ { >+ m_context->uniformMatrix3x4fv(location, static_cast<GCGLboolean>(transpose), makeGCGLSpan(reinterpret_cast<const GCGLfloat*>(data.data()), data.size())); >+ } >+ void uniformMatrix4x3fv(int32_t location, bool transpose, IPC::ArrayReference<float>&& data) >+ { >+ m_context->uniformMatrix4x3fv(location, static_cast<GCGLboolean>(transpose), makeGCGLSpan(reinterpret_cast<const GCGLfloat*>(data.data()), data.size())); >+ } >+ void vertexAttribI4i(uint32_t index, int32_t x, int32_t y, int32_t z, int32_t w) >+ { >+ m_context->vertexAttribI4i(index, x, y, z, w); >+ } >+ void vertexAttribI4iv(uint32_t index, IPC::ArrayReference<int32_t, 4>&& values) >+ { >+ m_context->vertexAttribI4iv(index, makeGCGLSpan<4>(reinterpret_cast<const GCGLint*>(values.data()))); >+ } >+ void vertexAttribI4ui(uint32_t index, uint32_t x, uint32_t y, uint32_t z, uint32_t w) >+ { >+ m_context->vertexAttribI4ui(index, x, y, z, w); >+ } >+ void vertexAttribI4uiv(uint32_t index, IPC::ArrayReference<uint32_t, 4>&& values) >+ { >+ m_context->vertexAttribI4uiv(index, makeGCGLSpan<4>(reinterpret_cast<const GCGLuint*>(values.data()))); >+ } >+ void vertexAttribIPointer(uint32_t index, int32_t size, uint32_t type, int32_t stride, uint64_t offset) >+ { >+ m_context->vertexAttribIPointer(index, size, type, stride, static_cast<GCGLintptr>(offset)); >+ } >+ void drawRangeElements(uint32_t mode, uint32_t start, uint32_t end, int32_t count, uint32_t type, uint64_t offset) >+ { >+ m_context->drawRangeElements(mode, start, end, count, type, static_cast<GCGLintptr>(offset)); >+ } >+ void drawBuffers(IPC::ArrayReference<uint32_t>&& bufs) >+ { >+ m_context->drawBuffers(makeGCGLSpan(reinterpret_cast<const GCGLenum*>(bufs.data()), bufs.size())); >+ } >+ void clearBufferiv(uint32_t buffer, int32_t drawbuffer, IPC::ArrayReference<int32_t>&& values) >+ { >+ m_context->clearBufferiv(buffer, drawbuffer, makeGCGLSpan(reinterpret_cast<const GCGLint*>(values.data()), values.size())); >+ } >+ void clearBufferuiv(uint32_t buffer, int32_t drawbuffer, IPC::ArrayReference<uint32_t>&& values) >+ { >+ m_context->clearBufferuiv(buffer, drawbuffer, makeGCGLSpan(reinterpret_cast<const GCGLuint*>(values.data()), values.size())); >+ } >+ void clearBufferfv(uint32_t buffer, int32_t drawbuffer, IPC::ArrayReference<float>&& values) >+ { >+ m_context->clearBufferfv(buffer, drawbuffer, makeGCGLSpan(reinterpret_cast<const GCGLfloat*>(values.data()), values.size())); >+ } >+ void clearBufferfi(uint32_t buffer, int32_t drawbuffer, float depth, int32_t stencil) >+ { >+ m_context->clearBufferfi(buffer, drawbuffer, depth, stencil); >+ } >+ void createQuery(CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ PlatformGLObject returnValue = { }; >+ returnValue = m_context->createQuery(); >+ completionHandler(returnValue); >+ } >+ void deleteQuery(uint32_t query) >+ { >+ m_context->deleteQuery(query); >+ } >+ void isQuery(uint32_t query, CompletionHandler<void(bool)>&& completionHandler) >+ { >+ GCGLboolean returnValue = { }; >+ returnValue = m_context->isQuery(query); >+ completionHandler(static_cast<bool>(returnValue)); >+ } >+ void beginQuery(uint32_t target, uint32_t query) >+ { >+ m_context->beginQuery(target, query); >+ } >+ void endQuery(uint32_t target) >+ { >+ m_context->endQuery(target); >+ } >+ void getQuery(uint32_t target, uint32_t pname, CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ PlatformGLObject returnValue = { }; >+ returnValue = m_context->getQuery(target, pname); >+ completionHandler(returnValue); >+ } >+ void getQueryObjectui(uint32_t query, uint32_t pname, CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ GCGLuint returnValue = { }; >+ returnValue = m_context->getQueryObjectui(query, pname); >+ completionHandler(returnValue); >+ } >+ void createSampler(CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ PlatformGLObject returnValue = { }; >+ returnValue = m_context->createSampler(); >+ completionHandler(returnValue); >+ } >+ void deleteSampler(uint32_t sampler) >+ { >+ m_context->deleteSampler(sampler); >+ } >+ void isSampler(uint32_t sampler, CompletionHandler<void(bool)>&& completionHandler) >+ { >+ GCGLboolean returnValue = { }; >+ returnValue = m_context->isSampler(sampler); >+ completionHandler(static_cast<bool>(returnValue)); >+ } >+ void bindSampler(uint32_t unit, uint32_t sampler) >+ { >+ m_context->bindSampler(unit, sampler); >+ } >+ void samplerParameteri(uint32_t sampler, uint32_t pname, int32_t param) >+ { >+ m_context->samplerParameteri(sampler, pname, param); >+ } >+ void samplerParameterf(uint32_t sampler, uint32_t pname, float param) >+ { >+ m_context->samplerParameterf(sampler, pname, param); >+ } >+ void getSamplerParameterf(uint32_t sampler, uint32_t pname, CompletionHandler<void(float)>&& completionHandler) >+ { >+ GCGLfloat returnValue = { }; >+ returnValue = m_context->getSamplerParameterf(sampler, pname); >+ completionHandler(returnValue); >+ } >+ void getSamplerParameteri(uint32_t sampler, uint32_t pname, CompletionHandler<void(int32_t)>&& completionHandler) >+ { >+ GCGLint returnValue = { }; >+ returnValue = m_context->getSamplerParameteri(sampler, pname); >+ completionHandler(returnValue); >+ } >+ void fenceSync(uint32_t condition, uint32_t flags, CompletionHandler<void(uint64_t)>&& completionHandler) >+ { >+ GCGLsync returnValue = { }; >+ returnValue = m_context->fenceSync(condition, flags); >+ completionHandler(static_cast<uint64_t>(reinterpret_cast<intptr_t>(returnValue))); >+ } >+ void isSync(uint64_t arg0, CompletionHandler<void(bool)>&& completionHandler) >+ { >+ GCGLboolean returnValue = { }; >+ returnValue = m_context->isSync(reinterpret_cast<GCGLsync>(static_cast<intptr_t>(arg0))); >+ completionHandler(static_cast<bool>(returnValue)); >+ } >+ void deleteSync(uint64_t arg0) >+ { >+ m_context->deleteSync(reinterpret_cast<GCGLsync>(static_cast<intptr_t>(arg0))); >+ } >+ void clientWaitSync(uint64_t arg0, uint32_t flags, uint64_t timeout, CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ GCGLenum returnValue = { }; >+ returnValue = m_context->clientWaitSync(reinterpret_cast<GCGLsync>(static_cast<intptr_t>(arg0)), flags, static_cast<GCGLuint64>(timeout)); >+ completionHandler(returnValue); >+ } >+ void waitSync(uint64_t arg0, uint32_t flags, int64_t timeout) >+ { >+ m_context->waitSync(reinterpret_cast<GCGLsync>(static_cast<intptr_t>(arg0)), flags, static_cast<GCGLint64>(timeout)); >+ } >+ void getSynci(uint64_t arg0, uint32_t pname, CompletionHandler<void(int32_t)>&& completionHandler) >+ { >+ GCGLint returnValue = { }; >+ returnValue = m_context->getSynci(reinterpret_cast<GCGLsync>(static_cast<intptr_t>(arg0)), pname); >+ completionHandler(returnValue); >+ } >+ void createTransformFeedback(CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ PlatformGLObject returnValue = { }; >+ returnValue = m_context->createTransformFeedback(); >+ completionHandler(returnValue); >+ } >+ void deleteTransformFeedback(uint32_t id) >+ { >+ m_context->deleteTransformFeedback(id); >+ } >+ void isTransformFeedback(uint32_t id, CompletionHandler<void(bool)>&& completionHandler) >+ { >+ GCGLboolean returnValue = { }; >+ returnValue = m_context->isTransformFeedback(id); >+ completionHandler(static_cast<bool>(returnValue)); >+ } >+ void bindTransformFeedback(uint32_t target, uint32_t id) >+ { >+ m_context->bindTransformFeedback(target, id); >+ } >+ void beginTransformFeedback(uint32_t primitiveMode) >+ { >+ m_context->beginTransformFeedback(primitiveMode); >+ } >+ void endTransformFeedback() >+ { >+ m_context->endTransformFeedback(); >+ } >+ void transformFeedbackVaryings(uint32_t program, Vector<String>&& varyings, uint32_t bufferMode) >+ { >+ m_context->transformFeedbackVaryings(program, varyings, bufferMode); >+ } >+ void getTransformFeedbackVarying(uint32_t program, uint32_t index, CompletionHandler<void(WebCore::GraphicsContextGL::ActiveInfo&&)>&& completionHandler) >+ { >+ WebCore::GraphicsContextGL::ActiveInfo arg2 { }; >+ m_context->getTransformFeedbackVarying(program, index, arg2); >+ completionHandler(WTFMove(arg2)); >+ } >+ void pauseTransformFeedback() >+ { >+ m_context->pauseTransformFeedback(); >+ } >+ void resumeTransformFeedback() >+ { >+ m_context->resumeTransformFeedback(); >+ } >+ void bindBufferBase(uint32_t target, uint32_t index, uint32_t buffer) >+ { >+ m_context->bindBufferBase(target, index, buffer); >+ } >+ void bindBufferRange(uint32_t target, uint32_t index, uint32_t buffer, uint64_t offset, uint64_t arg4) >+ { >+ m_context->bindBufferRange(target, index, buffer, static_cast<GCGLintptr>(offset), static_cast<GCGLsizeiptr>(arg4)); >+ } >+ void getUniformIndices(uint32_t program, Vector<String>&& uniformNames, CompletionHandler<void(Vector<uint32_t>&&)>&& completionHandler) >+ { >+ Vector<GCGLuint> returnValue = { }; >+ returnValue = m_context->getUniformIndices(program, uniformNames); >+ completionHandler(WTFMove(returnValue)); >+ } >+ void getActiveUniforms(uint32_t program, Vector<uint32_t>&& uniformIndices, uint32_t pname, CompletionHandler<void(Vector<int32_t>&&)>&& completionHandler) >+ { >+ Vector<GCGLint> returnValue = { }; >+ returnValue = m_context->getActiveUniforms(program, uniformIndices, pname); >+ completionHandler(WTFMove(returnValue)); >+ } >+ void getUniformBlockIndex(uint32_t program, String&& uniformBlockName, CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ GCGLuint returnValue = { }; >+ returnValue = m_context->getUniformBlockIndex(program, uniformBlockName); >+ completionHandler(returnValue); >+ } >+ void getActiveUniformBlockName(uint32_t program, uint32_t uniformBlockIndex, CompletionHandler<void(String&&)>&& completionHandler) >+ { >+ String returnValue = { }; >+ returnValue = m_context->getActiveUniformBlockName(program, uniformBlockIndex); >+ completionHandler(WTFMove(returnValue)); >+ } >+ void uniformBlockBinding(uint32_t program, uint32_t uniformBlockIndex, uint32_t uniformBlockBinding) >+ { >+ m_context->uniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); >+ } >+ void getActiveUniformBlockiv(uint32_t program, uint32_t uniformBlockIndex, uint32_t pname, uint64_t paramsSize, CompletionHandler<void(IPC::ArrayReference<int32_t>)>&& completionHandler) >+ { >+ Vector<GCGLint, 4> params(static_cast<size_t>(paramsSize), 0); >+ m_context->getActiveUniformBlockiv(program, uniformBlockIndex, pname, params); >+ completionHandler(IPC::ArrayReference<int32_t>(reinterpret_cast<int32_t*>(params.data()), params.size())); >+ } >+ void getGraphicsResetStatusARB(CompletionHandler<void(int32_t)>&& completionHandler) >+ { >+ GCGLint returnValue = { }; >+ returnValue = m_context->getExtensions().getGraphicsResetStatusARB(); >+ completionHandler(returnValue); >+ } >+ void blitFramebufferANGLE(int32_t srcX0, int32_t srcY0, int32_t srcX1, int32_t srcY1, int32_t dstX0, int32_t dstY0, int32_t dstX1, int32_t dstY1, uint32_t mask, uint32_t filter) >+ { >+ m_context->getExtensions().blitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); >+ } >+ void renderbufferStorageMultisampleANGLE(uint32_t target, int32_t samples, uint32_t internalformat, int32_t width, int32_t height) >+ { >+ m_context->getExtensions().renderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height); >+ } >+ void createVertexArrayOES(CompletionHandler<void(uint32_t)>&& completionHandler) >+ { >+ PlatformGLObject returnValue = { }; >+ returnValue = m_context->getExtensions().createVertexArrayOES(); >+ completionHandler(returnValue); >+ } >+ void deleteVertexArrayOES(uint32_t arg0) >+ { >+ m_context->getExtensions().deleteVertexArrayOES(arg0); >+ } >+ void isVertexArrayOES(uint32_t arg0, CompletionHandler<void(bool)>&& completionHandler) >+ { >+ GCGLboolean returnValue = { }; >+ returnValue = m_context->getExtensions().isVertexArrayOES(arg0); >+ completionHandler(static_cast<bool>(returnValue)); >+ } >+ void bindVertexArrayOES(uint32_t arg0) >+ { >+ m_context->getExtensions().bindVertexArrayOES(arg0); >+ } >+ void getTranslatedShaderSourceANGLE(uint32_t arg0, CompletionHandler<void(String&&)>&& completionHandler) >+ { >+ String returnValue = { }; >+ returnValue = m_context->getExtensions().getTranslatedShaderSourceANGLE(arg0); >+ completionHandler(WTFMove(returnValue)); >+ } >+ void insertEventMarkerEXT(String&& arg0) >+ { >+ m_context->getExtensions().insertEventMarkerEXT(arg0); >+ } >+ void pushGroupMarkerEXT(String&& arg0) >+ { >+ m_context->getExtensions().pushGroupMarkerEXT(arg0); >+ } >+ void popGroupMarkerEXT() >+ { >+ m_context->getExtensions().popGroupMarkerEXT(); >+ } >+ void drawBuffersEXT(IPC::ArrayReference<uint32_t>&& bufs) >+ { >+ m_context->getExtensions().drawBuffersEXT(makeGCGLSpan(reinterpret_cast<const GCGLenum*>(bufs.data()), bufs.size())); >+ } >+ void drawArraysInstancedANGLE(uint32_t mode, int32_t first, int32_t count, int32_t primcount) >+ { >+ m_context->getExtensions().drawArraysInstancedANGLE(mode, first, count, primcount); >+ } >+ void drawElementsInstancedANGLE(uint32_t mode, int32_t count, uint32_t type, uint64_t offset, int32_t primcount) >+ { >+ m_context->getExtensions().drawElementsInstancedANGLE(mode, count, type, static_cast<GCGLvoidptr>(offset), primcount); >+ } >+ void vertexAttribDivisorANGLE(uint32_t index, uint32_t divisor) >+ { >+ m_context->getExtensions().vertexAttribDivisorANGLE(index, divisor); >+ } >+ >diff --git a/Source/WebKit/GPUProcess/mac/GPUProcessMac.mm b/Source/WebKit/GPUProcess/mac/GPUProcessMac.mm >index b7bb63b29ad802172df27a12895bb1998fa4b6b0..24c437caae7f8f9a9aff92703efcf9da031e4c49 100644 >--- a/Source/WebKit/GPUProcess/mac/GPUProcessMac.mm >+++ b/Source/WebKit/GPUProcess/mac/GPUProcessMac.mm >@@ -32,8 +32,8 @@ > #import "SandboxInitializationParameters.h" > #import "WKFoundation.h" > #import <WebCore/LocalizedStrings.h> >+#import <pal/spi/cg/CoreGraphicsSPI.h> > #import <pal/spi/cocoa/LaunchServicesSPI.h> >-#import <pal/spi/mac/HIServicesSPI.h> > #import <sysexits.h> > #import <wtf/MemoryPressureHandler.h> > #import <wtf/text/WTFString.h> >@@ -44,9 +44,12 @@ using namespace WebCore; > void GPUProcess::initializeProcess(const AuxiliaryProcessInitializationParameters&) > { > #if PLATFORM(MAC) && !PLATFORM(MACCATALYST) >+#if 0 > // Having a window server connection in this process would result in spin logs (<rdar://problem/13239119>). >- OSStatus error = SetApplicationIsDaemon(true); >- ASSERT_UNUSED(error, error == noErr); >+ auto retval = CGSSetDenyWindowServerConnections(true); >+ RELEASE_ASSERT(retval == kCGErrorSuccess); >+ CGSShutdownServerConnections(); >+#endif > #endif > > launchServicesCheckIn(); >diff --git a/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in b/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in >index db06e534f7f51d2ebd03825f58245f8496f8b179..ed100b36ed6f46d4aaf6354477882ab793a11bcd 100644 >--- a/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in >+++ b/Source/WebKit/GPUProcess/mac/com.apple.WebKit.GPUProcess.sb.in >@@ -207,6 +207,7 @@ > (iokit-property-regex #"^AAPL,(DisplayPipe|OpenCLdisabled|IOGraphics_LER(|_RegTag_1|_RegTag_0|_Busy_2)|alias-policy|boot-display|display-alias|mux-switch-state|ndrv-dev|primary-display|slot-name)") > (iokit-property-regex #"^ATY,(cbits|fb_(linebytes|offset|size)|intrev)") > (iokit-property "ATY,DeviceName") ;; Needed by Metal compilers >+ (iokit-property "ATY,EFIDisplay") > (iokit-property "ATY,FamilyName") ;; Ditto > (iokit-property "AVCSupported") > (iokit-property "BacklightHandle") >@@ -217,6 +218,9 @@ > (iokit-property "CapsLockDelay") > (iokit-property "CaseSensitive") > (iokit-property "ConfigState") >+ (iokit-property "DPLanes") >+ (iokit-property "DPLinkBit") >+ (iokit-property "DPLinkRate") > (iokit-property "Description") > (iokit-property "Development") > (iokit-property-regex #"^Device( Characteristics|EqID)") >@@ -229,10 +233,17 @@ > (iokit-property "Family ID") > (iokit-property "ForceSupported") > (iokit-property "Formats") >+ (iokit-property "FramebufferEnabled") >+ (iokit-property "FramebufferStarted") > (iokit-property "GPUConfigurationVariable") >+ (iokit-property "GPUDCCDisplayable") >+ (iokit-property "GPUDebugNullClientMask") > (iokit-property "GpuDebugPolicy") >+ (iokit-property "GPURawCounterBundleName") >+ (iokit-property "GPURawCounterPluginClassName") > (iokit-property "HEVCSupported") > (iokit-property "HIDPointerAccelerationType") >+ (iokit-property "HwCtxCacheUpdate") > (iokit-property-regex #"^IOAccel(DisplayPipeCapabilities|Index|Types|Revision)") > (iokit-property-regex #"^IO(Class|MatchCategory|NameMatch)") > (iokit-property-regex #"^IOAudioControl(ChannelID|ID|SubType|Usage|Value)") >@@ -282,6 +293,8 @@ > (iokit-property "IOParentMatch") > (iokit-property-regex #"^IOPCI((Class|Primary|Property|)Match|Express(Capabilities|Link(Status|Capabilities))|MSIMode|Resourced|Tunnelled)") > (iokit-property "IOPMIsPowerManaged") >+ (iokit-property "IOPersonalityPublisher") >+ > (iokit-property-regex #"^IOPlatform(SerialNumber|UUID)") > (iokit-property "IOPowerManagement") > (iokit-property "IOProbeScore") >@@ -317,6 +330,7 @@ > (iokit-property "Protocol Characteristics") > (iokit-property "Removable") > (iokit-property-regex #"^ResetOn(Lock|Unlock)Ms") >+ (iokit-property "SWIP_properties") > (iokit-property "SafeEjectRequested") > (iokit-property "SampleRates") > (iokit-property "Serial Number") >@@ -338,6 +352,7 @@ > (iokit-property "attached-gpu-control-path") > (iokit-property-regex #"^audio-(codec-info|device-mvalue|device-nvalue|selector)") > (iokit-property "av-signal-type") >+ (iokit-property "backlight-PWM-freq") > (iokit-property "bcdVersion") > (iokit-property-regex #"^(board|device|revision|subsystem|vendor)-id") > (iokit-property "boot-gamma-restored") >@@ -350,6 +365,11 @@ > (iokit-property "connector-type") > (iokit-property-regex #"^(device|revision|subsystem-vendor|touch-size)-id") > (iokit-property "device_type") >+ (iokit-property "display-bpc") >+ (iokit-property "display-connect-flags") >+ (iokit-property "display-link-component-bits") >+ (iokit-property "display-pixel-component-bits") >+ (iokit-property "display-type") > (iokit-property "dpm") > (iokit-property "errordb") ;; Needed for OpenGL on older hardware > (iokit-property "filevault-image") ;; Needed by LaunchServices >diff --git a/Source/WebKit/GPUProcess/media/RemoteLegacyCDMProxy.h b/Source/WebKit/GPUProcess/media/RemoteLegacyCDMProxy.h >index 6a5c6725caa9bdb867ab86b8c57f36de2c896dcf..be7f5220be9b85f868a5f837efed66ddf95f294d 100644 >--- a/Source/WebKit/GPUProcess/media/RemoteLegacyCDMProxy.h >+++ b/Source/WebKit/GPUProcess/media/RemoteLegacyCDMProxy.h >@@ -39,10 +39,6 @@ namespace WebCore { > class SharedBuffer; > } > >-namespace IPC { >-class DataReference; >-} >- > namespace WebKit { > > class RemoteLegacyCDMProxy >diff --git a/Source/WebKit/GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp b/Source/WebKit/GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp >index 47f5d2f270fa5de4fade1514442111794ed36d28..2c5e7de7d2e756960a3f3ec876c8b825c6e45b53 100644 >--- a/Source/WebKit/GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp >+++ b/Source/WebKit/GPUProcess/media/RemoteLegacyCDMSessionProxy.cpp >@@ -33,6 +33,7 @@ > #include "RemoteLegacyCDMSessionMessages.h" > #include "SharedBufferCopy.h" > #include <JavaScriptCore/GenericTypedArrayViewInlines.h> >+#include <WebCore/LegacyCDM.h> > #include <WebCore/SharedBuffer.h> > > namespace WebKit { >diff --git a/Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.cpp b/Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.cpp >index a98cfa4c9f80231904f8ef0eaa936229afa97598..fec65cf62b6674b8300c50cd433415e915114400 100644 >--- a/Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.cpp >+++ b/Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.cpp >@@ -29,7 +29,6 @@ > #if ENABLE(GPU_PROCESS) > > #include "Connection.h" >-#include "DataReference.h" > #include "RemoteMediaResource.h" > #include "RemoteMediaResourceIdentifier.h" > #include "WebCoreArgumentCoders.h" >diff --git a/Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.h b/Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.h >index d89b803f6abf41c8e9edde414276932826d1b338..081eb3180d02164b5aa3d54806f72c7edc0cb1ee 100644 >--- a/Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.h >+++ b/Source/WebKit/GPUProcess/media/RemoteMediaResourceManager.h >@@ -27,15 +27,16 @@ > > #if ENABLE(GPU_PROCESS) > >+#include "DataReference.h" > #include "MessageReceiver.h" > #include "RemoteMediaResourceIdentifier.h" >+ > #include <WebCore/PolicyChecker.h> > #include <wtf/HashMap.h> > > namespace IPC { > class Connection; > class Decoder; >-class DataReference; > } > > namespace WebCore { >diff --git a/Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.h b/Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.h >index 6bfbfafb20447830d730c38c55d916022c23d316..06e309e4d57ea047f5ed8290258b19cbcda6192f 100644 >--- a/Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.h >+++ b/Source/WebKit/GPUProcess/media/RemoteMediaSourceProxy.h >@@ -38,7 +38,6 @@ > namespace IPC { > class Connection; > class Decoder; >-class DataReference; > } > > namespace WebCore { >diff --git a/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp b/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp >index 245cf40dfc6fc72417499c996eea95f0a3a8d69a..8682cd795a5f544abb78e7c1b8587b96883f9495 100644 >--- a/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp >+++ b/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.cpp >@@ -29,7 +29,6 @@ > #if ENABLE(GPU_PROCESS) && ENABLE(MEDIA_SOURCE) > > #include "Connection.h" >-#include "DataReference.h" > #include "RemoteSourceBufferProxyMessages.h" > #include "SourceBufferPrivateRemoteMessages.h" > #include <WebCore/NotImplemented.h> >diff --git a/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h b/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h >index 390c0ce1c27b608dc97aafa5186361880c3af4d3..c3378333c02666da61abac6494702121db5e86c4 100644 >--- a/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h >+++ b/Source/WebKit/GPUProcess/media/RemoteSourceBufferProxy.h >@@ -27,9 +27,11 @@ > > #if ENABLE(GPU_PROCESS) && ENABLE(MEDIA_SOURCE) > >+#include "DataReference.h" > #include "GPUConnectionToWebProcess.h" > #include "MessageReceiver.h" > #include "RemoteSourceBufferIdentifier.h" >+ > #include <WebCore/SourceBufferPrivate.h> > #include <WebCore/SourceBufferPrivateClient.h> > #include <wtf/Ref.h> >@@ -38,7 +40,6 @@ > namespace IPC { > class Connection; > class Decoder; >-class DataReference; > } > > namespace WebCore { >diff --git a/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h b/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h >index 360310b7d121d286d8d161f183abd0e745b83533..843bb06f7b56c6e3cfbee79a7e4281efee8f9a77 100644 >--- a/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h >+++ b/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.h >@@ -28,14 +28,15 @@ > #if USE(LIBWEBRTC) && PLATFORM(COCOA) && ENABLE(GPU_PROCESS) > > #include "Connection.h" >+#include "DataReference.h" > #include "RTCDecoderIdentifier.h" > #include "RTCEncoderIdentifier.h" >+ > #include <WebCore/ImageTransferSessionVT.h> > > namespace IPC { > class Connection; > class Decoder; >-class DataReference; > } > > namespace WebCore { >diff --git a/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm b/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm >index f8abc1f405fc1469475b4d90bad3d53ca0f8014e..61c4708ae96dbcaa569809ee1995be816a91ff2b 100644 >--- a/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm >+++ b/Source/WebKit/GPUProcess/webrtc/LibWebRTCCodecsProxy.mm >@@ -28,7 +28,6 @@ > > #if USE(LIBWEBRTC) && PLATFORM(COCOA) && ENABLE(GPU_PROCESS) > >-#import "DataReference.h" > #import "GPUConnectionToWebProcess.h" > #import "LibWebRTCCodecsMessages.h" > #import "LibWebRTCCodecsProxyMessages.h" >diff --git a/Source/WebKit/GPUProcess/webrtc/RemoteMediaRecorder.h b/Source/WebKit/GPUProcess/webrtc/RemoteMediaRecorder.h >index 788c5f00c02f4f148feeccd38d106818b0d7e961..3ab4e4b1cf1c141230c13e4576c5ed6e6efc2edb 100644 >--- a/Source/WebKit/GPUProcess/webrtc/RemoteMediaRecorder.h >+++ b/Source/WebKit/GPUProcess/webrtc/RemoteMediaRecorder.h >@@ -27,6 +27,7 @@ > > #if PLATFORM(COCOA) && ENABLE(GPU_PROCESS) && ENABLE(MEDIA_STREAM) && HAVE(AVASSETWRITERDELEGATE) > >+#include "DataReference.h" > #include "MediaRecorderIdentifier.h" > #include "MessageReceiver.h" > #include "SharedMemory.h" >@@ -36,7 +37,6 @@ > > namespace IPC { > class Connection; >-class DataReference; > class Decoder; > } > >diff --git a/Source/WebKit/NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm b/Source/WebKit/NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm >index 7a6336347c007e97b73b543774916838d64037da..1aa53cc2fb77baf9e326507210809fd76cfbbf27 100644 >--- a/Source/WebKit/NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm >+++ b/Source/WebKit/NetworkProcess/CustomProtocols/Cocoa/LegacyCustomProtocolManagerCocoa.mm >@@ -26,7 +26,6 @@ > #import "config.h" > #import "LegacyCustomProtocolManager.h" > >-#import "DataReference.h" > #import "LegacyCustomProtocolManagerMessages.h" > #import "NetworkProcess.h" > #import <Foundation/NSURLSession.h> >diff --git a/Source/WebKit/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h b/Source/WebKit/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h >index f6ed811f5342fe48555176f89d51457562c66585..0bcd5673c9346ada11d656c3add51be4edbc2730 100644 >--- a/Source/WebKit/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h >+++ b/Source/WebKit/NetworkProcess/CustomProtocols/LegacyCustomProtocolManager.h >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "DataReference.h" > #include "LegacyCustomProtocolID.h" > #include "MessageReceiver.h" > #include "NetworkProcessSupplement.h" >@@ -39,10 +40,6 @@ OBJC_CLASS NSURLSessionConfiguration; > OBJC_CLASS WKCustomProtocol; > #endif > >-namespace IPC { >-class DataReference; >-} // namespace IPC >- > namespace WebCore { > class ResourceError; > class ResourceRequest; >@@ -112,4 +109,3 @@ private: > }; > > } // namespace WebKit >- >diff --git a/Source/WebKit/NetworkProcess/Downloads/Download.cpp b/Source/WebKit/NetworkProcess/Downloads/Download.cpp >index ddbe4eedd441df87c55ad330f042ccdcfadfb90b..651ff254f905c16a90cb482c9773d4ac74294ec3 100644 >--- a/Source/WebKit/NetworkProcess/Downloads/Download.cpp >+++ b/Source/WebKit/NetworkProcess/Downloads/Download.cpp >@@ -29,7 +29,6 @@ > #include "AuthenticationChallengeDisposition.h" > #include "AuthenticationManager.h" > #include "Connection.h" >-#include "DataReference.h" > #include "DownloadManager.h" > #include "DownloadMonitor.h" > #include "DownloadProxyMessages.h" >diff --git a/Source/WebKit/NetworkProcess/Downloads/Download.h b/Source/WebKit/NetworkProcess/Downloads/Download.h >index 38af350807464293b95ffaf059fdec3690177274..93f03a8255f1ae717383c00290a24f91ca7c6581 100644 >--- a/Source/WebKit/NetworkProcess/Downloads/Download.h >+++ b/Source/WebKit/NetworkProcess/Downloads/Download.h >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "DataReference.h" > #include "DownloadID.h" > #include "DownloadManager.h" > #include "DownloadMonitor.h" >@@ -44,10 +45,6 @@ OBJC_CLASS NSProgress; > OBJC_CLASS NSURLSessionDownloadTask; > #endif > >-namespace IPC { >-class DataReference; >-} >- > namespace WebCore { > class AuthenticationChallenge; > class BlobDataFileReference; >diff --git a/Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp b/Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp >index 33216340f27c1605c3cd74bc6907b7d91b47b762..726dd990bafd4394b5afc032a1cf20f1849c49ac 100644 >--- a/Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp >+++ b/Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp >@@ -26,7 +26,6 @@ > #include "config.h" > #include "DownloadManager.h" > >-#include "DataReference.h" > #include "Download.h" > #include "NetworkConnectionToWebProcess.h" > #include "NetworkLoad.h" >diff --git a/Source/WebKit/NetworkProcess/Downloads/DownloadManager.h b/Source/WebKit/NetworkProcess/Downloads/DownloadManager.h >index 2cd161b0ac3e789e2246c05b0165f1c72678fa50..980a06f7839dbd5e9f9d5045409a33d77b1c0386 100644 >--- a/Source/WebKit/NetworkProcess/Downloads/DownloadManager.h >+++ b/Source/WebKit/NetworkProcess/Downloads/DownloadManager.h >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "DataReference.h" > #include "DownloadID.h" > #include "DownloadMap.h" > #include "NetworkDataTask.h" >@@ -49,7 +50,6 @@ class ResourceResponse; > > namespace IPC { > class Connection; >-class DataReference; > } > > namespace WebKit { >diff --git a/Source/WebKit/NetworkProcess/NetworkSocketChannel.cpp b/Source/WebKit/NetworkProcess/NetworkSocketChannel.cpp >index 449b13d8e07b2cd042c4ba3636ab793d37b1c3f4..c7788811f032d58f8b527736e1d2278410f913a9 100644 >--- a/Source/WebKit/NetworkProcess/NetworkSocketChannel.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkSocketChannel.cpp >@@ -26,7 +26,6 @@ > #include "config.h" > #include "NetworkSocketChannel.h" > >-#include "DataReference.h" > #include "NetworkConnectionToWebProcess.h" > #include "NetworkProcess.h" > #include "NetworkSession.h" >diff --git a/Source/WebKit/NetworkProcess/NetworkSocketChannel.h b/Source/WebKit/NetworkProcess/NetworkSocketChannel.h >index 31964190d141d549da0baf2dc8bf297b4e581e89..0434bf8809a7eb3ecc18e8f650cc0278ae6eb517 100644 >--- a/Source/WebKit/NetworkProcess/NetworkSocketChannel.h >+++ b/Source/WebKit/NetworkProcess/NetworkSocketChannel.h >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "DataReference.h" > #include "MessageReceiver.h" > #include "MessageSender.h" > #include <WebCore/Timer.h> >@@ -40,7 +41,6 @@ class ResourceRequest; > namespace IPC { > class Connection; > class Decoder; >-class DataReference; > } > > namespace WebKit { >diff --git a/Source/WebKit/NetworkProcess/NetworkSocketStream.cpp b/Source/WebKit/NetworkProcess/NetworkSocketStream.cpp >index 5b489cc538f7c071510106c58f5c094ec9a8e1b8..48c883bfc0fc7d501c8a4a4e7684ccc33e38c14d 100644 >--- a/Source/WebKit/NetworkProcess/NetworkSocketStream.cpp >+++ b/Source/WebKit/NetworkProcess/NetworkSocketStream.cpp >@@ -26,7 +26,6 @@ > #include "config.h" > #include "NetworkSocketStream.h" > >-#include "DataReference.h" > #include "NetworkStorageSessionProvider.h" > #include "WebSocketStreamMessages.h" > #include <WebCore/CookieRequestHeaderFieldProxy.h> >diff --git a/Source/WebKit/NetworkProcess/NetworkSocketStream.h b/Source/WebKit/NetworkProcess/NetworkSocketStream.h >index 52ec392690218ede668d55e638d8e17502fd6ee5..73429a027906b416a38c0c6b3946a0db9fb206fa 100644 >--- a/Source/WebKit/NetworkProcess/NetworkSocketStream.h >+++ b/Source/WebKit/NetworkProcess/NetworkSocketStream.h >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "DataReference.h" > #include "MessageReceiver.h" > #include "MessageSender.h" > #include <WebCore/SocketStreamError.h> >@@ -37,7 +38,6 @@ > namespace IPC { > class Connection; > class Decoder; >-class DataReference; > } > > namespace WebKit { >diff --git a/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h b/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h >index d33cbff1089cc105dd1a00bebfdf61d33c7f66bd..d37d7806983bba547ca0f9235eb4bf6b731565a4 100644 >--- a/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h >+++ b/Source/WebKit/NetworkProcess/ServiceWorker/ServiceWorkerFetchTask.h >@@ -27,6 +27,7 @@ > > #if ENABLE(SERVICE_WORKER) > >+#include "DataReference.h" > #include <WebCore/FetchIdentifier.h> > #include <WebCore/ResourceRequest.h> > #include <WebCore/ServiceWorkerClientIdentifier.h> >@@ -43,7 +44,6 @@ class ResourceResponse; > > namespace IPC { > class Connection; >-class DataReference; > class Decoder; > class FormDataReference; > } >diff --git a/Source/WebKit/NetworkProcess/WebSocketTask.h b/Source/WebKit/NetworkProcess/WebSocketTask.h >index db5795dd217f45ad5f67e30b791f92e276c02986..961e46459be77177e2605e7d8652ada802097b53 100644 >--- a/Source/WebKit/NetworkProcess/WebSocketTask.h >+++ b/Source/WebKit/NetworkProcess/WebSocketTask.h >@@ -31,9 +31,6 @@ > #include "WebSocketTaskSoup.h" > #else > >-namespace IPC { >-class DataReference; >-} > > namespace WebKit { > >diff --git a/Source/WebKit/NetworkProcess/cocoa/WebSocketTaskCocoa.h b/Source/WebKit/NetworkProcess/cocoa/WebSocketTaskCocoa.h >index dac693507eb3efcea6d1094801bc01b36fe2639d..e6826e47e839594028af8f4aed2392b4b05d2f5a 100644 >--- a/Source/WebKit/NetworkProcess/cocoa/WebSocketTaskCocoa.h >+++ b/Source/WebKit/NetworkProcess/cocoa/WebSocketTaskCocoa.h >@@ -27,15 +27,12 @@ > > #if HAVE(NSURLSESSION_WEBSOCKET) > >+#include "DataReference.h" > #include <wtf/RetainPtr.h> > #include <wtf/WeakPtr.h> > > OBJC_CLASS NSURLSessionWebSocketTask; > >-namespace IPC { >-class DataReference; >-} >- > namespace WebKit { > class NetworkSession; > class NetworkSessionCocoa; >diff --git a/Source/WebKit/NetworkProcess/cocoa/WebSocketTaskCocoa.mm b/Source/WebKit/NetworkProcess/cocoa/WebSocketTaskCocoa.mm >index 85534874404ce2baa44ae656547d37225332eab8..90bc409bffb70a0ee9e7358b3867597d29f24e06 100644 >--- a/Source/WebKit/NetworkProcess/cocoa/WebSocketTaskCocoa.mm >+++ b/Source/WebKit/NetworkProcess/cocoa/WebSocketTaskCocoa.mm >@@ -28,7 +28,6 @@ > > #if HAVE(NSURLSESSION_WEBSOCKET) > >-#import "DataReference.h" > #import "NetworkSessionCocoa.h" > #import "NetworkSocketChannel.h" > #import <Foundation/NSURLSession.h> >diff --git a/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp b/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp >index 45fc669d766a761c5d773dc95f0541a38e36f8e3..a3e7014b5d8ec09738ffa7d5664545010f05340b 100644 >--- a/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp >+++ b/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.cpp >@@ -26,7 +26,6 @@ > #include "config.h" > #include "WebSocketTaskSoup.h" > >-#include "DataReference.h" > #include "NetworkProcess.h" > #include "NetworkSocketChannel.h" > #include <WebCore/HTTPParsers.h> >diff --git a/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.h b/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.h >index e421b9e1c71318434f6487f5fcb5a6a87bd73919..088923959fe460ff2bba4c8c0839980657bf348f 100644 >--- a/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.h >+++ b/Source/WebKit/NetworkProcess/soup/WebSocketTaskSoup.h >@@ -25,14 +25,11 @@ > > #pragma once > >+#include "DataReference.h" > #include <libsoup/soup.h> > #include <wtf/RunLoop.h> > #include <wtf/glib/GRefPtr.h> > >-namespace IPC { >-class DataReference; >-} >- > namespace WebKit { > class NetworkSocketChannel; > >diff --git a/Source/WebKit/Platform/IPC/ArgumentCoders.h b/Source/WebKit/Platform/IPC/ArgumentCoders.h >index e00a0ccdfa5875c028c505231141728ee95b4392..e38bc1c60af6dcf036965aa78aadbd6d8d4b6262 100644 >--- a/Source/WebKit/Platform/IPC/ArgumentCoders.h >+++ b/Source/WebKit/Platform/IPC/ArgumentCoders.h >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "ArrayReference.h" > #include "Decoder.h" > #include "Encoder.h" > #include <utility> >@@ -53,6 +54,48 @@ template<typename T> struct SimpleArgumentCoder { > } > }; > >+template<typename T, size_t Extent> struct ArgumentCoder<ArrayReference<T, Extent>> { >+ using ArrayReferenceType = ArrayReference<T, Extent>; >+ static void encode(Encoder& encoder, const ArrayReferenceType& arrayReference) >+ { >+ if (!Extent) >+ return; >+ encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(arrayReference.data()), arrayReference.size() * sizeof(T), alignof(T)); >+ } >+ static Optional<ArrayReferenceType> decode(Decoder& decoder) >+ { >+ if (!Extent) >+ return ArrayReferenceType(); >+ const uint8_t* data = decoder.decodeFixedLengthReference(Extent * sizeof(T), alignof(T)); >+ if (!data) >+ return WTF::nullopt; >+ return ArrayReferenceType(reinterpret_cast<const T*>(data), Extent); >+ } >+}; >+ >+template<typename T> struct ArgumentCoder<ArrayReference<T, arrayReferenceDynamicExtent>> { >+ using ArrayReferenceType = ArrayReference<T, arrayReferenceDynamicExtent>; >+ static void encode(Encoder& encoder, const ArrayReferenceType& arrayReference) >+ { >+ encoder.encode(static_cast<uint64_t>(arrayReference.size())); >+ if (!arrayReference.size()) >+ return; >+ encoder.encodeFixedLengthData(reinterpret_cast<const uint8_t*>(arrayReference.data()), arrayReference.size() * sizeof(T), alignof(T)); >+ } >+ static Optional<ArrayReferenceType> decode(Decoder& decoder) >+ { >+ uint64_t size; >+ if (!decoder.decode(size)) >+ return WTF::nullopt; >+ if (!size) >+ return ArrayReferenceType(); >+ const uint8_t* data = decoder.decodeFixedLengthReference(size * sizeof(T), alignof(T)); >+ if (!data) >+ return WTF::nullopt; >+ return ArrayReferenceType(reinterpret_cast<const T*>(data), static_cast<size_t>(size)); >+ } >+}; >+ > template<typename T> struct ArgumentCoder<OptionSet<T>> { > static void encode(Encoder& encoder, const OptionSet<T>& optionSet) > { >diff --git a/Source/WebKit/Platform/IPC/ArrayReference.h b/Source/WebKit/Platform/IPC/ArrayReference.h >new file mode 100644 >index 0000000000000000000000000000000000000000..3d32bb457a5b885f3d56687e79f15c3a2671be64 >--- /dev/null >+++ b/Source/WebKit/Platform/IPC/ArrayReference.h >@@ -0,0 +1,123 @@ >+/* >+ * Copyright (C) 2010 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#include <limits> >+#include <wtf/Vector.h> >+ >+namespace IPC { >+ >+inline constexpr size_t arrayReferenceDynamicExtent = std::numeric_limits<size_t>::max(); >+ >+template <typename T, size_t Extent = arrayReferenceDynamicExtent> >+class ArrayReference; >+ >+template <typename T> >+class ArrayReference<T, arrayReferenceDynamicExtent> { >+public: >+ ArrayReference() = default; >+ >+ ArrayReference(const T* data, size_t size) >+ : m_data(data) >+ , m_size(size) >+ { >+ } >+ >+ template <size_t inlineCapacity> >+ ArrayReference(const Vector<T, inlineCapacity>& vector) >+ : m_data(vector.data()) >+ , m_size(vector.size()) >+ { >+ } >+ >+ bool isEmpty() const { return !m_size; } >+ >+ size_t size() const { return m_size; } >+ const T* data() const >+ { >+ if (isEmpty()) >+ return nullptr; >+ return m_data; >+ } >+ >+ Vector<T> vector() const >+ { >+ Vector<T> result; >+ result.append(m_data, m_size); >+ >+ return result; >+ } >+ >+private: >+ const T* m_data { }; >+ size_t m_size { }; >+}; >+ >+template <typename T, size_t Extent> >+class ArrayReference { >+public: >+ ArrayReference() = default; >+ >+ ArrayReference(const T* data, size_t size) >+ : m_data(data) >+ { >+ ASSERT_UNUSED(size, size == Extent); >+ } >+ >+ template <size_t inlineCapacity> >+ ArrayReference(const Vector<T, inlineCapacity>& vector) >+ : m_data(vector.data()) >+ { >+ ASSERT(vector.size() == Extent); >+ } >+ >+ constexpr bool isEmpty() const { return !Extent; } >+ >+ constexpr size_t size() const { return Extent; } >+ >+ const T* data() const >+ { >+ if (isEmpty()) >+ return nullptr; >+ return m_data; >+ } >+ >+ Vector<T> vector() const >+ { >+ Vector<T> result; >+ if (!isEmpty()) >+ result.append(m_data, Extent); >+ return result; >+ } >+ >+private: >+ const T* m_data { }; >+}; >+ >+template<typename T, size_t inlineCapacity> >+ArrayReference(const WTF::Vector<T, inlineCapacity>&) -> ArrayReference<T>; >+ >+} // namespace IPC >diff --git a/Source/WebKit/Platform/IPC/Connection.h b/Source/WebKit/Platform/IPC/Connection.h >index ec3d14ae8f3ec247054763caee909cc2c875f5d8..bbd7abcb4cdc604382b1065e33238449c6ac5970 100644 >--- a/Source/WebKit/Platform/IPC/Connection.h >+++ b/Source/WebKit/Platform/IPC/Connection.h >@@ -227,10 +227,12 @@ public: > void markCurrentlyDispatchedMessageAsInvalid(); > > void postConnectionDidCloseOnConnectionWorkQueue(); >- > template<typename T, typename C> void sendWithAsyncReply(T&& message, C&& completionHandler, uint64_t destinationID = 0, OptionSet<SendOption> = { }); // Thread-safe. > template<typename T> bool send(T&& message, uint64_t destinationID, OptionSet<SendOption> sendOptions = { }); // Thread-safe. >- template<typename T> bool sendSync(T&& message, typename T::Reply&& reply, uint64_t destinationID, Seconds timeout = Seconds::infinity(), OptionSet<SendSyncOption> sendSyncOptions = { }); // Main thread only. >+ // Sync senders should check the SendSyncResult for true/false in case they need to know if the result was really received. >+ // Sync senders should hold on to the SendSyncResult in case they reference the contents of the reply via DataRefererence / ArrayReference. >+ using SendSyncResult = std::unique_ptr<Decoder>; >+ template<typename T> SendSyncResult sendSync(T&& message, typename T::Reply&& reply, uint64_t destinationID, Seconds timeout = Seconds::infinity(), OptionSet<SendSyncOption> sendSyncOptions = { }); // Main thread only. > template<typename T> bool waitForAndDispatchImmediately(uint64_t destinationID, Seconds timeout, OptionSet<WaitForOption> waitForOptions = { }); // Main thread only. > > // Thread-safe. >@@ -249,7 +251,7 @@ public: > > // Main thread only. > template<typename T, typename U> >- bool sendSync(T&& message, typename T::Reply&& reply, ObjectIdentifier<U> destinationID, Seconds timeout = Seconds::infinity(), OptionSet<SendSyncOption> sendSyncOptions = { }) >+ SendSyncResult sendSync(T&& message, typename T::Reply&& reply, ObjectIdentifier<U> destinationID, Seconds timeout = Seconds::infinity(), OptionSet<SendSyncOption> sendSyncOptions = { }) > { > return sendSync<T>(WTFMove(message), WTFMove(reply), destinationID.toUInt64(), timeout, sendSyncOptions); > } >@@ -551,7 +553,7 @@ void moveTuple(std::tuple<A...>&& a, std::tuple<B...>& b) > TupleMover<sizeof...(A), std::tuple<A...>, std::tuple<B...>>::move(WTFMove(a), b); > } > >-template<typename T> bool Connection::sendSync(T&& message, typename T::Reply&& reply, uint64_t destinationID, Seconds timeout, OptionSet<SendSyncOption> sendSyncOptions) >+template<typename T> Connection::SendSyncResult Connection::sendSync(T&& message, typename T::Reply&& reply, uint64_t destinationID, Seconds timeout, OptionSet<SendSyncOption> sendSyncOptions) > { > COMPILE_ASSERT(T::isSync, SyncMessageExpected); > RELEASE_ASSERT(RunLoop::isMain()); >@@ -570,15 +572,15 @@ template<typename T> bool Connection::sendSync(T&& message, typename T::Reply&& > // Now send the message and wait for a reply. > std::unique_ptr<Decoder> replyDecoder = sendSyncMessage(syncRequestID, WTFMove(encoder), timeout, sendSyncOptions); > if (!replyDecoder) >- return false; >+ return { }; > > // Decode the reply. > Optional<typename T::ReplyArguments> replyArguments; > *replyDecoder >> replyArguments; > if (!replyArguments) >- return false; >+ return { }; > moveTuple(WTFMove(*replyArguments), reply); >- return true; >+ return replyDecoder; > } > > template<typename T> bool Connection::waitForAndDispatchImmediately(uint64_t destinationID, Seconds timeout, OptionSet<WaitForOption> waitForOptions) >diff --git a/Source/WebKit/Platform/IPC/DataReference.cpp b/Source/WebKit/Platform/IPC/DataReference.cpp >deleted file mode 100644 >index 225fda7bed2fe8c4049b5587079fd1e16354f4fa..0000000000000000000000000000000000000000 >--- a/Source/WebKit/Platform/IPC/DataReference.cpp >+++ /dev/null >@@ -1,44 +0,0 @@ >-/* >- * Copyright (C) 2010 Apple Inc. All rights reserved. >- * >- * Redistribution and use in source and binary forms, with or without >- * modification, are permitted provided that the following conditions >- * are met: >- * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >- * 2. Redistributions in binary form must reproduce the above copyright >- * notice, this list of conditions and the following disclaimer in the >- * documentation and/or other materials provided with the distribution. >- * >- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >- * THE POSSIBILITY OF SUCH DAMAGE. >- */ >- >-#include "config.h" >-#include "DataReference.h" >- >-#include "Decoder.h" >-#include "Encoder.h" >- >-namespace IPC { >- >-void DataReference::encode(Encoder& encoder) const >-{ >- encoder.encodeVariableLengthByteArray(*this); >-} >- >-bool DataReference::decode(Decoder& decoder, DataReference& dataReference) >-{ >- return decoder.decodeVariableLengthByteArray(dataReference); >-} >- >-} // namespace IPC >diff --git a/Source/WebKit/Platform/IPC/DataReference.h b/Source/WebKit/Platform/IPC/DataReference.h >index 3450c31b73ddb6aa5edce2af80029887c798e205..dbb3d6927f341c5aa93fc1073cb0756e3cba37d5 100644 >--- a/Source/WebKit/Platform/IPC/DataReference.h >+++ b/Source/WebKit/Platform/IPC/DataReference.h >@@ -25,54 +25,10 @@ > > #pragma once > >-#include <wtf/Vector.h> >+#include "ArrayReference.h" > > namespace IPC { > >-class Decoder; >-class Encoder; >- >-class DataReference { >-public: >- DataReference() = default; >- >- DataReference(const uint8_t* data, size_t size) >- : m_data(data) >- , m_size(size) >- { >- } >- >- template<size_t inlineCapacity> >- DataReference(const Vector<uint8_t, inlineCapacity>& vector) >- : m_data(vector.data()) >- , m_size(vector.size()) >- { >- } >- >- bool isEmpty() const { return !m_size; } >- >- size_t size() const { return m_size; } >- const uint8_t* data() const >- { >- if (isEmpty()) >- return nullptr; >- return m_data; >- } >- >- Vector<uint8_t> vector() const >- { >- Vector<uint8_t> result; >- result.append(m_data, m_size); >- >- return result; >- } >- >- void encode(Encoder&) const; >- static WARN_UNUSED_RETURN bool decode(Decoder&, DataReference&); >- >-private: >- const uint8_t* m_data { nullptr }; >- size_t m_size { 0 }; >-}; >+using DataReference = ArrayReference<uint8_t, arrayReferenceDynamicExtent>; > > } // namespace IPC >diff --git a/Source/WebKit/Platform/IPC/Decoder.cpp b/Source/WebKit/Platform/IPC/Decoder.cpp >index 78a4638eb7305bfd191087068d30bcdb8dfe82ae..2cb79b731c8d351a2d05946362c5ab8bbadbdc5e 100644 >--- a/Source/WebKit/Platform/IPC/Decoder.cpp >+++ b/Source/WebKit/Platform/IPC/Decoder.cpp >@@ -186,20 +186,15 @@ bool Decoder::decodeFixedLengthData(uint8_t* data, size_t size, size_t alignment > return true; > } > >-bool Decoder::decodeVariableLengthByteArray(DataReference& dataReference) >+const uint8_t* Decoder::decodeFixedLengthReference(size_t size, size_t alignment) > { >- uint64_t size; >- if (!decode(size)) >- return false; >- >- if (!alignBufferPosition(1, size)) >- return false; >+ if (!alignBufferPosition(alignment, size)) >+ return nullptr; > > const uint8_t* data = m_bufferPos; > m_bufferPos += size; > >- dataReference = DataReference(data, size); >- return true; >+ return data; > } > > bool Decoder::removeAttachment(Attachment& attachment) >diff --git a/Source/WebKit/Platform/IPC/Decoder.h b/Source/WebKit/Platform/IPC/Decoder.h >index b72dd8ace2773db3559e366dd9524f2341e55e06..344ce6882fc90984b2fa57bf9c48b9650e0ff74e 100644 >--- a/Source/WebKit/Platform/IPC/Decoder.h >+++ b/Source/WebKit/Platform/IPC/Decoder.h >@@ -40,7 +40,6 @@ > > namespace IPC { > >-class DataReference; > class ImportanceAssertion; > enum class MessageFlags : uint8_t; > enum class ShouldDispatchWhenWaitingForSyncReply : uint8_t; >@@ -78,8 +77,9 @@ public: > > WARN_UNUSED_RETURN bool decodeFixedLengthData(uint8_t* data, size_t, size_t alignment); > >- // The data in the data reference here will only be valid for the lifetime of the ArgumentDecoder object. >- WARN_UNUSED_RETURN bool decodeVariableLengthByteArray(DataReference&); >+ // The data in the returned pointer here will only be valid for the lifetime of the ArgumentDecoder object. >+ // Returns nullptr on failure. >+ WARN_UNUSED_RETURN const uint8_t* decodeFixedLengthReference(size_t, size_t alignment); > > template<typename T, std::enable_if_t<std::is_arithmetic<T>::value>* = nullptr> > WARN_UNUSED_RETURN bool decode(T& value) >diff --git a/Source/WebKit/Platform/IPC/Encoder.cpp b/Source/WebKit/Platform/IPC/Encoder.cpp >index fd4090774b2bc2a7629b9c02dc554c4cdc98f5cb..e83a3e4aff42a575505dc8f07317a1c1ac19deae 100644 >--- a/Source/WebKit/Platform/IPC/Encoder.cpp >+++ b/Source/WebKit/Platform/IPC/Encoder.cpp >@@ -26,6 +26,7 @@ > #include "config.h" > #include "Encoder.h" > >+#include "ArgumentCoders.h" > #include "DataReference.h" > #include "MessageFlags.h" > #include <algorithm> >@@ -141,7 +142,7 @@ void Encoder::wrapForTesting(std::unique_ptr<Encoder> original) > > original->setShouldDispatchMessageWhenWaitingForSyncReply(ShouldDispatchWhenWaitingForSyncReply::Yes); > >- encodeVariableLengthByteArray(DataReference(original->buffer(), original->bufferSize())); >+ *this << DataReference(original->buffer(), original->bufferSize()); > > Vector<Attachment> attachments = original->releaseAttachments(); > reserve(attachments.size()); >@@ -216,12 +217,6 @@ void Encoder::encodeFixedLengthData(const uint8_t* data, size_t size, size_t ali > memcpy(buffer, data, size); > } > >-void Encoder::encodeVariableLengthByteArray(const DataReference& dataReference) >-{ >- encode(static_cast<uint64_t>(dataReference.size())); >- encodeFixedLengthData(dataReference.data(), dataReference.size(), 1); >-} >- > void Encoder::addAttachment(Attachment&& attachment) > { > m_attachments.append(WTFMove(attachment)); >diff --git a/Source/WebKit/Platform/IPC/Encoder.h b/Source/WebKit/Platform/IPC/Encoder.h >index 0ecf541f77858536f1fcfa836b76f2482e4c9a11..ea61967be1ebcbd8b6fbbaa8b85af418e8d50cca 100644 >--- a/Source/WebKit/Platform/IPC/Encoder.h >+++ b/Source/WebKit/Platform/IPC/Encoder.h >@@ -36,7 +36,6 @@ > > namespace IPC { > >-class DataReference; > enum class MessageFlags : uint8_t; > enum class MessageName : uint16_t; > enum class ShouldDispatchWhenWaitingForSyncReply : uint8_t; >@@ -62,7 +61,6 @@ public: > void wrapForTesting(std::unique_ptr<Encoder>); > > void encodeFixedLengthData(const uint8_t* data, size_t, size_t alignment); >- void encodeVariableLengthByteArray(const DataReference&); > > template<typename T, std::enable_if_t<!std::is_enum<typename std::remove_const_t<std::remove_reference_t<T>>>::value && !std::is_arithmetic<typename std::remove_const_t<std::remove_reference_t<T>>>::value>* = nullptr> > void encode(T&& t) >diff --git a/Source/WebKit/Platform/IPC/HandleMessage.h b/Source/WebKit/Platform/IPC/HandleMessage.h >index 7fd183a56ae98b06645ff75148ac2983c52e4aeb..4129d4e2b49d5c8fc41a2d654adcd89e86c637f6 100644 >--- a/Source/WebKit/Platform/IPC/HandleMessage.h >+++ b/Source/WebKit/Platform/IPC/HandleMessage.h >@@ -26,6 +26,7 @@ > #pragma once > > #include "ArgumentCoders.h" >+#include "DataReference.h" > #include <wtf/CompletionHandler.h> > #include <wtf/StdLibExtras.h> > >@@ -96,7 +97,6 @@ struct CodingType { > typedef std::remove_const_t<std::remove_reference_t<T>> Type; > }; > >-class DataReference; > class SharedBufferDataReference; > template<> struct CodingType<const SharedBufferDataReference&> { > using Type = DataReference; >diff --git a/Source/WebKit/Platform/IPC/MessageSender.h b/Source/WebKit/Platform/IPC/MessageSender.h >index 46e21d8d936f2d8b5167b249f881116ffeb7d4b9..77461d555b7292c20ebf514a302d1dc6e777011f 100644 >--- a/Source/WebKit/Platform/IPC/MessageSender.h >+++ b/Source/WebKit/Platform/IPC/MessageSender.h >@@ -54,9 +54,10 @@ public: > { > return send<U>(message, destinationID.toUInt64(), sendOptions); > } >+ using SendSyncResult = Connection::SendSyncResult; > > template<typename T> >- bool sendSync(T&& message, typename T::Reply&& reply, Seconds timeout = Seconds::infinity(), OptionSet<SendSyncOption> sendSyncOptions = { }) >+ SendSyncResult sendSync(T&& message, typename T::Reply&& reply, Seconds timeout = Seconds::infinity(), OptionSet<SendSyncOption> sendSyncOptions = { }) > { > static_assert(T::isSync, "Message is not sync!"); > >@@ -64,7 +65,7 @@ public: > } > > template<typename T> >- bool sendSync(T&& message, typename T::Reply&& reply, uint64_t destinationID, Seconds timeout = Seconds::infinity(), OptionSet<SendSyncOption> sendSyncOptions = { }) >+ SendSyncResult sendSync(T&& message, typename T::Reply&& reply, uint64_t destinationID, Seconds timeout = Seconds::infinity(), OptionSet<SendSyncOption> sendSyncOptions = { }) > { > ASSERT(messageSenderConnection()); > >@@ -72,7 +73,7 @@ public: > } > > template<typename U, typename T> >- bool sendSync(U&& message, typename U::Reply&& reply, ObjectIdentifier<T> destinationID, Seconds timeout = Seconds::infinity(), OptionSet<SendSyncOption> sendSyncOptions = { }) >+ SendSyncResult sendSync(U&& message, typename U::Reply&& reply, ObjectIdentifier<T> destinationID, Seconds timeout = Seconds::infinity(), OptionSet<SendSyncOption> sendSyncOptions = { }) > { > return sendSync<U>(std::forward<U>(message), WTFMove(reply), destinationID.toUInt64(), timeout, sendSyncOptions); > } >diff --git a/Source/WebKit/Platform/IPC/SharedBufferCopy.cpp b/Source/WebKit/Platform/IPC/SharedBufferCopy.cpp >index 7a3cb3387636dcafceacead91b8639b7ba7636c6..500f839dfaae9297f4dc63dc66305877b22df2f8 100644 >--- a/Source/WebKit/Platform/IPC/SharedBufferCopy.cpp >+++ b/Source/WebKit/Platform/IPC/SharedBufferCopy.cpp >@@ -26,6 +26,7 @@ > #include "config.h" > #include "SharedBufferCopy.h" > >+#include "ArgumentCoders.h" > #include "DataReference.h" > #include "Decoder.h" > #include "Encoder.h" >@@ -48,7 +49,7 @@ void SharedBufferCopy::encode(Encoder& encoder) const > Optional<SharedBufferCopy> SharedBufferCopy::decode(Decoder& decoder) > { > IPC::DataReference data; >- if (!decoder.decodeVariableLengthByteArray(data)) >+ if (!decoder.decode(data)) > return WTF::nullopt; > RefPtr<SharedBuffer> buffer; > if (data.size()) >diff --git a/Source/WebKit/Platform/IPC/SharedBufferDataReference.cpp b/Source/WebKit/Platform/IPC/SharedBufferDataReference.cpp >index 2f7285ac0b4bd6de11dfeb9fe328f01c999950a0..e96dfb1fbf891cd4a0c774e85c9078758a6fe825 100644 >--- a/Source/WebKit/Platform/IPC/SharedBufferDataReference.cpp >+++ b/Source/WebKit/Platform/IPC/SharedBufferDataReference.cpp >@@ -26,6 +26,7 @@ > #include "config.h" > #include "SharedBufferDataReference.h" > >+#include "ArgumentCoders.h" > #include "Encoder.h" > > namespace IPC { >diff --git a/Source/WebKit/Platform/IPC/StringReference.cpp b/Source/WebKit/Platform/IPC/StringReference.cpp >index 852ef43e008631c9fafa8230c919c17a9d4a29b6..2161139c3014f0eafb3dc47c85da4190a2ba0666 100644 >--- a/Source/WebKit/Platform/IPC/StringReference.cpp >+++ b/Source/WebKit/Platform/IPC/StringReference.cpp >@@ -26,6 +26,7 @@ > #include "config.h" > #include "StringReference.h" > >+#include "ArgumentCoders.h" > #include "DataReference.h" > #include "Decoder.h" > #include "Encoder.h" >diff --git a/Source/WebKit/PluginProcess/PluginControllerProxy.cpp b/Source/WebKit/PluginProcess/PluginControllerProxy.cpp >index 8b3740f4b101ad90f50ed57c850b9030fcc430c2..4b20c85ac536236403a83ea973cdccd10fdf72f6 100644 >--- a/Source/WebKit/PluginProcess/PluginControllerProxy.cpp >+++ b/Source/WebKit/PluginProcess/PluginControllerProxy.cpp >@@ -28,7 +28,6 @@ > > #if ENABLE(NETSCAPE_PLUGIN_API) > >-#include "DataReference.h" > #include "NPObjectProxy.h" > #include "NPRemoteObjectMap.h" > #include "NPRuntimeUtilities.h" >diff --git a/Source/WebKit/PluginProcess/PluginControllerProxy.h b/Source/WebKit/PluginProcess/PluginControllerProxy.h >index ad4fcd9d8ccf42f12ee488e01346c619a701b8d2..c7a7053cbd26d20454c042c6ace16cb52530f43d 100644 >--- a/Source/WebKit/PluginProcess/PluginControllerProxy.h >+++ b/Source/WebKit/PluginProcess/PluginControllerProxy.h >@@ -28,6 +28,7 @@ > #if ENABLE(NETSCAPE_PLUGIN_API) > > #include "Connection.h" >+#include "DataReference.h" > #include "Plugin.h" > #include "PluginController.h" > #include "ShareableBitmap.h" >@@ -37,10 +38,6 @@ > #include <wtf/Noncopyable.h> > #include <wtf/RunLoop.h> > >-namespace IPC { >- class DataReference; >-} >- > namespace WebKit { > > class LayerHostingContext; >diff --git a/Source/WebKit/Scripts/webkit/messages.py b/Source/WebKit/Scripts/webkit/messages.py >index 573ed3d8ee9bbf4103168e79a057f9dbdb9b8695..673244a67e099ffb71807d5550c454f3631db12b 100644 >--- a/Source/WebKit/Scripts/webkit/messages.py >+++ b/Source/WebKit/Scripts/webkit/messages.py >@@ -203,6 +203,7 @@ def forward_declarations_for_namespace(namespace, kind_and_types): > > def types_that_cannot_be_forward_declared(): > return frozenset([ >+ 'IPC::DataReference', > 'MachSendRight', > 'MediaTime', > 'String', >@@ -214,6 +215,7 @@ def types_that_cannot_be_forward_declared(): > 'WebCore::DocumentOrWorkerIdentifier', > 'WebCore::FetchIdentifier', > 'WebCore::FrameIdentifier', >+ 'WebCore::GraphicsContextGLAttributes', > 'WebCore::LibWebRTCSocketIdentifier', > 'WebCore::PlaybackTargetClientContextIdentifier', > 'WebCore::MediaPlayerIdentifier', >@@ -243,6 +245,7 @@ def types_that_cannot_be_forward_declared(): > 'WebCore::DisplayList::FlushIdentifier', > 'WebKit::DownloadID', > 'WebKit::GeolocationIdentifier', >+ 'WebKit::GraphicsContextGLIdentifier', > 'WebKit::ImageBufferBackendHandle', > 'WebKit::LayerHostingContextID', > 'WebKit::LegacyCustomProtocolID', >@@ -530,6 +533,7 @@ def class_template_headers(template_string): > 'OptionSet': {'headers': ['<wtf/OptionSet.h>'], 'argument_coder_headers': ['"ArgumentCoders.h"']}, > 'Vector': {'headers': ['<wtf/Vector.h>'], 'argument_coder_headers': ['"ArgumentCoders.h"']}, > 'std::pair': {'headers': ['<utility>'], 'argument_coder_headers': ['"ArgumentCoders.h"']}, >+ 'IPC::ArrayReference': {'headers': ['"ArrayReference.h"'], 'argument_coder_headers': ['"ArgumentCoders.h"']}, > } > > match = re.match('(?P<template_name>.+?)<(?P<parameter_string>.+)>', template_string) >diff --git a/Source/WebKit/Shared/API/APIData.cpp b/Source/WebKit/Shared/API/APIData.cpp >index 61343bd94106b6e789f83bc25de79f7a604093cc..c782316f3057a3caf9d3e2077c8132553e69756a 100644 >--- a/Source/WebKit/Shared/API/APIData.cpp >+++ b/Source/WebKit/Shared/API/APIData.cpp >@@ -26,6 +26,7 @@ > #include "config.h" > #include "APIData.h" > >+#include "ArgumentCoders.h" > #include "Decoder.h" > #include "Encoder.h" > >diff --git a/Source/WebKit/Shared/AuxiliaryProcess.h b/Source/WebKit/Shared/AuxiliaryProcess.h >index 7ba207abb0accc8a570f5c663f46caa24a826d91..31fd7d03fafe039587952a6378d1a9c8ff2f7916 100644 >--- a/Source/WebKit/Shared/AuxiliaryProcess.h >+++ b/Source/WebKit/Shared/AuxiliaryProcess.h >@@ -84,7 +84,6 @@ public: > void setProcessSuppressionEnabled(bool); > > #if PLATFORM(COCOA) >- void setApplicationIsDaemon(); > void launchServicesCheckIn(); > void setQOS(int latencyQOS, int throughputQOS); > #endif >@@ -184,4 +183,3 @@ struct AuxiliaryProcessInitializationParameters { > }; > > } // namespace WebKit >- >diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.cpp b/Source/WebKit/Shared/WebCoreArgumentCoders.cpp >index 9c26db4e9a9f6ba72e4820bb406c2cfbde113e9b..da3734c84d654d8d03ca7925f7bd759913bc34ab 100644 >--- a/Source/WebKit/Shared/WebCoreArgumentCoders.cpp >+++ b/Source/WebKit/Shared/WebCoreArgumentCoders.cpp >@@ -3221,4 +3221,82 @@ Optional<RefPtr<WebCore::ImageData>> ArgumentCoder<RefPtr<WebCore::ImageData>>:: > return { WTFMove(*result) }; > } > >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+void ArgumentCoder<WebCore::GraphicsContextGLAttributes>::encode(Encoder& encoder, const WebCore::GraphicsContextGLAttributes& attributes) >+{ >+ encoder << attributes.alpha; >+ encoder << attributes.depth; >+ encoder << attributes.stencil; >+ encoder << attributes.antialias; >+ encoder << attributes.premultipliedAlpha; >+ encoder << attributes.preserveDrawingBuffer; >+ encoder << attributes.failIfMajorPerformanceCaveat; >+ encoder << attributes.powerPreference; >+ encoder << attributes.shareResources; >+ encoder << attributes.isWebGL2; >+ encoder << attributes.noExtensions; >+ encoder << attributes.devicePixelRatio; >+ encoder << attributes.initialPowerPreference; >+#if ENABLE(WEBXR) >+ encoder << attributes.xrCompatible; >+#endif >+} >+ >+Optional<WebCore::GraphicsContextGLAttributes> ArgumentCoder<WebCore::GraphicsContextGLAttributes>::decode(Decoder& decoder) >+{ >+ GraphicsContextGLAttributes attributes; >+ if (!decoder.decode(attributes.alpha)) >+ return WTF::nullopt; >+ if (!decoder.decode(attributes.depth)) >+ return WTF::nullopt; >+ if (!decoder.decode(attributes.stencil)) >+ return WTF::nullopt; >+ if (!decoder.decode(attributes.antialias)) >+ return WTF::nullopt; >+ if (!decoder.decode(attributes.premultipliedAlpha)) >+ return WTF::nullopt; >+ if (!decoder.decode(attributes.preserveDrawingBuffer)) >+ return WTF::nullopt; >+ if (!decoder.decode(attributes.failIfMajorPerformanceCaveat)) >+ return WTF::nullopt; >+ if (!decoder.decode(attributes.powerPreference)) >+ return WTF::nullopt; >+ if (!decoder.decode(attributes.shareResources)) >+ return WTF::nullopt; >+ if (!decoder.decode(attributes.isWebGL2)) >+ return WTF::nullopt; >+ if (!decoder.decode(attributes.noExtensions)) >+ return WTF::nullopt; >+ if (!decoder.decode(attributes.devicePixelRatio)) >+ return WTF::nullopt; >+ if (!decoder.decode(attributes.initialPowerPreference)) >+ return WTF::nullopt; >+#if ENABLE(WEBXR) >+ if (!decoder.decode(attributes.xrCompatible)) >+ return WTF::nullopt; >+#endif >+ return attributes; >+} >+ >+void ArgumentCoder<WebCore::GraphicsContextGL::ActiveInfo>::encode(Encoder& encoder, const WebCore::GraphicsContextGL::ActiveInfo& activeInfo) >+{ >+ encoder << activeInfo.name; >+ encoder << activeInfo.type; >+ encoder << activeInfo.size; >+} >+ >+Optional<WebCore::GraphicsContextGL::ActiveInfo> ArgumentCoder<WebCore::GraphicsContextGL::ActiveInfo>::decode(Decoder& decoder) >+{ >+ WebCore::GraphicsContextGL::ActiveInfo activeInfo; >+ if (!decoder.decode(activeInfo.name)) >+ return WTF::nullopt; >+ if (!decoder.decode(activeInfo.type)) >+ return WTF::nullopt; >+ if (!decoder.decode(activeInfo.size)) >+ return WTF::nullopt; >+ return activeInfo; >+} >+ >+#endif >+ > } // namespace IPC >diff --git a/Source/WebKit/Shared/WebCoreArgumentCoders.h b/Source/WebKit/Shared/WebCoreArgumentCoders.h >index 4a932159130cb7bcde55e211e17c4bedef1705d6..1dae9695f33c09dcd7c5803608e2d6ac16e9fc60 100644 >--- a/Source/WebKit/Shared/WebCoreArgumentCoders.h >+++ b/Source/WebKit/Shared/WebCoreArgumentCoders.h >@@ -71,6 +71,13 @@ > #include "ArgumentCodersGtk.h" > #endif > >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+#include "ArrayReference.h" >+#include <WebCore/GraphicsContextGL.h> >+#include <WebCore/GraphicsContextGLAttributes.h> >+#include <WebCore/GraphicsTypesGL.h> >+#endif >+ > #if PLATFORM(COCOA) > namespace WTF { > class MachSendRight; >@@ -203,6 +210,10 @@ struct SerializedAttachmentData; > using IDBKeyPath = Variant<String, Vector<String>>; > #endif > >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+struct GraphicsContextGLAttributes; >+#endif >+ > namespace DOMCacheEngine { > struct CacheInfo; > struct Record; >@@ -873,6 +884,19 @@ template<> struct ArgumentCoder<WebCore::PaymentInstallmentConfiguration> { > }; > #endif > >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+ >+template<> struct ArgumentCoder<WebCore::GraphicsContextGLAttributes> { >+ static void encode(Encoder&, const WebCore::GraphicsContextGLAttributes&); >+ static Optional<WebCore::GraphicsContextGLAttributes> decode(Decoder&); >+}; >+ >+template<> struct ArgumentCoder<WebCore::GraphicsContextGL::ActiveInfo> { >+ static void encode(Encoder&, const WebCore::GraphicsContextGL::ActiveInfo&); >+ static Optional<WebCore::GraphicsContextGL::ActiveInfo> decode(Decoder&); >+}; >+#endif >+ > } // namespace IPC > > namespace WTF { >@@ -1041,4 +1065,16 @@ template <> struct EnumTraits<WebCore::CDMInstance::HDCPStatus> { > > #endif > >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+ >+template <> struct EnumTraits<WebCore::GraphicsContextGLPowerPreference> { >+ using values = EnumValues < >+ WebCore::GraphicsContextGLPowerPreference, >+ WebCore::GraphicsContextGLPowerPreference::Default, >+ WebCore::GraphicsContextGLPowerPreference::LowPower, >+ WebCore::GraphicsContextGLPowerPreference::HighPerformance >+ >; >+}; >+#endif >+ > } // namespace WTF >diff --git a/Source/WebKit/Shared/WebPageCreationParameters.cpp b/Source/WebKit/Shared/WebPageCreationParameters.cpp >index cf131a921e086365dbf77fa98e41c1c74a3e7e25..add949ba508d8e814087fede7b048a3dec6cf85d 100644 >--- a/Source/WebKit/Shared/WebPageCreationParameters.cpp >+++ b/Source/WebKit/Shared/WebPageCreationParameters.cpp >@@ -158,6 +158,9 @@ void WebPageCreationParameters::encode(IPC::Encoder& encoder) const > encoder << shouldRenderCanvasInGPUProcess; > encoder << shouldRenderDOMInGPUProcess; > encoder << shouldPlayMediaInGPUProcess; >+#if ENABLE(WEBGL) >+ encoder << shouldRenderWebGLInGPUProcess; >+#endif > encoder << shouldEnableVP9Decoder; > encoder << shouldEnableVP9SWDecoder; > #if ENABLE(APP_BOUND_DOMAINS) >@@ -510,6 +513,10 @@ Optional<WebPageCreationParameters> WebPageCreationParameters::decode(IPC::Decod > > if (!decoder.decode(parameters.shouldPlayMediaInGPUProcess)) > return WTF::nullopt; >+#if ENABLE(WEBGL) >+ if (!decoder.decode(parameters.shouldRenderWebGLInGPUProcess)) >+ return WTF::nullopt; >+#endif > > if (!decoder.decode(parameters.shouldEnableVP9Decoder)) > return WTF::nullopt; >diff --git a/Source/WebKit/Shared/WebPageCreationParameters.h b/Source/WebKit/Shared/WebPageCreationParameters.h >index d91e46038f309b5130bfde58dff4a9f181951dfd..c20612311435bf4f92cf06fe5e11205a4b5112bb 100644 >--- a/Source/WebKit/Shared/WebPageCreationParameters.h >+++ b/Source/WebKit/Shared/WebPageCreationParameters.h >@@ -229,6 +229,9 @@ struct WebPageCreationParameters { > bool shouldRenderCanvasInGPUProcess { false }; > bool shouldRenderDOMInGPUProcess { false }; > bool shouldPlayMediaInGPUProcess { false }; >+#if ENABLE(WEBGL) >+ bool shouldRenderWebGLInGPUProcess { false }; >+#endif > bool shouldEnableVP9Decoder { false }; > bool shouldEnableVP9SWDecoder { false }; > #if ENABLE(APP_BOUND_DOMAINS) >diff --git a/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp b/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp >index 9bd8a817549f58fe383d725da663f3bc54ca0d74..77e9b4d5cc752fbcdb6b65f9adc2601956ca147a 100644 >--- a/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp >+++ b/Source/WebKit/Shared/cf/ArgumentCodersCF.cpp >@@ -28,6 +28,7 @@ > #include "config.h" > #include "ArgumentCodersCF.h" > >+#include "ArgumentCoders.h" > #include "DataReference.h" > #include "Decoder.h" > #include "Encoder.h" >diff --git a/Source/WebKit/Shared/soup/WebCoreArgumentCodersSoup.cpp b/Source/WebKit/Shared/soup/WebCoreArgumentCodersSoup.cpp >index 1d84e2fe268f3460eb2975c42ba95d14f1d235cf..fa268d584a0fc8df87a21fa456077b8c5d42b859 100644 >--- a/Source/WebKit/Shared/soup/WebCoreArgumentCodersSoup.cpp >+++ b/Source/WebKit/Shared/soup/WebCoreArgumentCodersSoup.cpp >@@ -81,7 +81,7 @@ void ArgumentCoder<CertificateInfo>::encode(Encoder& encoder, const CertificateI > // Encode starting from the root certificate. > for (size_t i = certificatesDataList.size(); i > 0; --i) { > GByteArray* certificate = certificatesDataList[i - 1].get(); >- encoder.encodeVariableLengthByteArray(IPC::DataReference(certificate->data, certificate->len)); >+ encoder << IPC::DataReference(certificate->data, certificate->len); > } > > encoder << static_cast<uint32_t>(certificateInfo.tlsErrors()); >@@ -100,7 +100,7 @@ bool ArgumentCoder<CertificateInfo>::decode(Decoder& decoder, CertificateInfo& c > GRefPtr<GTlsCertificate> certificate; > for (uint32_t i = 0; i < chainLength; i++) { > IPC::DataReference certificateDataReference; >- if (!decoder.decodeVariableLengthByteArray(certificateDataReference)) >+ if (!decoder.decode(certificateDataReference)) > return false; > > GByteArray* certificateData = g_byte_array_sized_new(certificateDataReference.size()); >@@ -277,4 +277,3 @@ Optional<SerializedPlatformDataCueValue> ArgumentCoder<SerializedPlatformDataCu > #endif > > } >- >diff --git a/Source/WebKit/Sources.txt b/Source/WebKit/Sources.txt >index 0917f01be1c9f8caa2abf7f0f890f895a3f2ef86..50cde12afa3aa7f78c279ec8fb819744b6fb1ea4 100644 >--- a/Source/WebKit/Sources.txt >+++ b/Source/WebKit/Sources.txt >@@ -26,6 +26,7 @@ GPUProcess/GPUConnectionToWebProcess.cpp > GPUProcess/GPUProcessCreationParameters.cpp > GPUProcess/graphics/DisplayListReaderHandle.cpp > GPUProcess/graphics/RemoteRenderingBackend.cpp >+GPUProcess/graphics/RemoteGraphicsContextGL.cpp > GPUProcess/graphics/RemoteResourceCache.cpp > GPUProcess/media/RemoteAudioSessionProxy.cpp > GPUProcess/media/RemoteAudioSessionProxyManager.cpp >@@ -137,7 +138,6 @@ Platform/SharedMemory.cpp @no-unify > Platform/IPC/ArgumentCoders.cpp @no-unify > Platform/IPC/Attachment.cpp @no-unify > Platform/IPC/Connection.cpp @no-unify >-Platform/IPC/DataReference.cpp @no-unify > Platform/IPC/Decoder.cpp @no-unify > Platform/IPC/Encoder.cpp @no-unify > Platform/IPC/JSIPCBinding.cpp @no-unify >@@ -693,3 +693,5 @@ WebProcess/WebStorage/StorageAreaImpl.cpp > WebProcess/WebStorage/StorageAreaMap.cpp > WebProcess/WebStorage/StorageNamespaceImpl.cpp > WebProcess/WebStorage/WebStorageNamespaceProvider.cpp >+ >+RemoteGraphicsContextGLMessageReceiver.cpp >diff --git a/Source/WebKit/SourcesCocoa.txt b/Source/WebKit/SourcesCocoa.txt >index 99518073280e9c95a2b25f00bc8bfb3887621241..13fa715e796fc8592314b3fe7f0d4ea9aed8988b 100644 >--- a/Source/WebKit/SourcesCocoa.txt >+++ b/Source/WebKit/SourcesCocoa.txt >@@ -63,6 +63,7 @@ GPUProcess/media/cocoa/RemoteMediaPlayerProxyCocoa.mm > GPUProcess/media/ios/RemoteMediaSessionHelperProxy.cpp > GPUProcess/webrtc/LibWebRTCCodecsProxy.mm > >+ > Platform/cf/ModuleCF.cpp > > Platform/classifier/cocoa/ResourceLoadStatisticsClassifierCocoa.cpp >@@ -573,6 +574,8 @@ WebProcess/cocoa/WebProcessCocoa.mm > WebProcess/EntryPoint/Cocoa/XPCService/WebContentServiceEntryPoint.mm > > WebProcess/GPU/graphics/cocoa/ImageBufferShareableIOSurfaceBackend.cpp >+WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp >+WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp > WebProcess/GPU/media/RemoteAudioSourceProvider.cpp > WebProcess/GPU/media/RemoteAudioSourceProviderManager.cpp > WebProcess/GPU/media/cocoa/MediaPlayerPrivateRemoteCocoa.mm >@@ -685,6 +688,7 @@ RemoteMediaSessionHelperMessageReceiver.cpp > RemoteMediaSessionHelperProxyMessageReceiver.cpp > RemoteRenderingBackendMessageReceiver.cpp > RemoteRenderingBackendProxyMessageReceiver.cpp >+RemoteGraphicsContextGLProxyMessageReceiver.cpp > RemoteSampleBufferDisplayLayerManagerMessageReceiver.cpp > RemoteSampleBufferDisplayLayerMessageReceiver.cpp > SampleBufferDisplayLayerMessageReceiver.cpp >diff --git a/Source/WebKit/UIProcess/API/APIIconLoadingClient.h b/Source/WebKit/UIProcess/API/APIIconLoadingClient.h >index 2fe386259463bfb3623ebbdb4fef5f83936b0d3d..737b625819866a0ecb599a2130b32913eaf396d9 100644 >--- a/Source/WebKit/UIProcess/API/APIIconLoadingClient.h >+++ b/Source/WebKit/UIProcess/API/APIIconLoadingClient.h >@@ -30,10 +30,6 @@ > #include <wtf/CompletionHandler.h> > #include <wtf/Function.h> > >-namespace IPC { >-class DataReference; >-} >- > namespace API { > > class IconLoadingClient { >diff --git a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h >index 4f398b530f608575c967b83c74fa2f4328f6ce3b..8ca97e6e597bd7110a0d738e0c4a7c85603a8a7d 100644 >--- a/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h >+++ b/Source/WebKit/UIProcess/AuxiliaryProcessProxy.h >@@ -53,7 +53,8 @@ public: > virtual ProcessThrottler& throttler() = 0; > > template<typename T> bool send(T&& message, uint64_t destinationID, OptionSet<IPC::SendOption> sendOptions = { }); >- template<typename T> bool sendSync(T&& message, typename T::Reply&&, uint64_t destinationID, Seconds timeout = 1_s, OptionSet<IPC::SendSyncOption> sendSyncOptions = { }); >+ using SendSyncResult = IPC::Connection::SendSyncResult; >+ template<typename T> SendSyncResult sendSync(T&& message, typename T::Reply&&, uint64_t destinationID, Seconds timeout = 1_s, OptionSet<IPC::SendSyncOption> sendSyncOptions = { }); > > enum class ShouldStartProcessThrottlerActivity : bool { No, Yes }; > template<typename T, typename C> void sendWithAsyncReply(T&&, C&&, uint64_t destinationID = 0, OptionSet<IPC::SendOption> = { }, ShouldStartProcessThrottlerActivity = ShouldStartProcessThrottlerActivity::Yes); >@@ -65,7 +66,7 @@ public: > } > > template<typename T, typename U> >- bool sendSync(T&& message, typename T::Reply&& reply, ObjectIdentifier<U> destinationID, Seconds timeout = 1_s, OptionSet<IPC::SendSyncOption> sendSyncOptions = { }) >+ SendSyncResult sendSync(T&& message, typename T::Reply&& reply, ObjectIdentifier<U> destinationID, Seconds timeout = 1_s, OptionSet<IPC::SendSyncOption> sendSyncOptions = { }) > { > return sendSync<T>(WTFMove(message), WTFMove(reply), destinationID.toUInt64(), timeout, sendSyncOptions); > } >@@ -163,12 +164,12 @@ bool AuxiliaryProcessProxy::send(T&& message, uint64_t destinationID, OptionSet< > } > > template<typename U> >-bool AuxiliaryProcessProxy::sendSync(U&& message, typename U::Reply&& reply, uint64_t destinationID, Seconds timeout, OptionSet<IPC::SendSyncOption> sendSyncOptions) >+AuxiliaryProcessProxy::SendSyncResult AuxiliaryProcessProxy::sendSync(U&& message, typename U::Reply&& reply, uint64_t destinationID, Seconds timeout, OptionSet<IPC::SendSyncOption> sendSyncOptions) > { > COMPILE_ASSERT(U::isSync, SyncMessageExpected); > > if (!m_connection) >- return false; >+ return { }; > > TraceScope scope(SyncMessageStart, SyncMessageEnd); > >diff --git a/Source/WebKit/UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h b/Source/WebKit/UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h >index 823c202a856a0136dd9ea759f0ecdeba47f4f362..b577cbdf8e078f4fb4f8734d7bfd608d20388063 100644 >--- a/Source/WebKit/UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h >+++ b/Source/WebKit/UIProcess/Cocoa/SOAuthorization/SubFrameSOAuthorizationSession.h >@@ -32,10 +32,6 @@ > #include <WebCore/FrameIdentifier.h> > #include <wtf/Deque.h> > >-namespace IPC { >-class DataReference; >-} >- > namespace WebKit { > > class SubFrameSOAuthorizationSession final : public NavigationSOAuthorizationSession, public FrameLoadState::Observer { >diff --git a/Source/WebKit/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h b/Source/WebKit/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h >index ff98b84fa89dbefdd64666bbba42fc90cec3577f..128a3977e63ee4f4ef1f20eaaec86d08ecbf58d3 100644 >--- a/Source/WebKit/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h >+++ b/Source/WebKit/UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.h >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "DataReference.h" > #include "LegacyCustomProtocolID.h" > #include "MessageReceiver.h" > #include <wtf/WeakPtr.h> >@@ -35,10 +36,6 @@ > OBJC_CLASS WKCustomProtocolLoader; > #endif > >-namespace IPC { >-class DataReference; >-} >- > namespace WebCore { > class ResourceError; > class ResourceRequest; >diff --git a/Source/WebKit/UIProcess/PageClient.h b/Source/WebKit/UIProcess/PageClient.h >index c4c71874a10da9b541fee2820808c1e50d3fa92b..9db3a509b914c093caf169a05d65b57ed0c8013c 100644 >--- a/Source/WebKit/UIProcess/PageClient.h >+++ b/Source/WebKit/UIProcess/PageClient.h >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "DataReference.h" > #include "LayerTreeContext.h" > #include "PDFPluginIdentifier.h" > #include "SameDocumentNavigationType.h" >@@ -80,10 +81,6 @@ class OpenPanelParameters; > class SecurityOrigin; > } > >-namespace IPC { >-class DataReference; >-} >- > namespace WebCore { > class Color; > class Cursor; >diff --git a/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp b/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp >index 24b633e484d2a35ba74d45f12ede34a0f78ca0a6..248e53a083d19a0ef4d83c23b8cce00345daab04 100644 >--- a/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp >+++ b/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.cpp >@@ -31,7 +31,6 @@ > #include "APISerializedScriptValue.h" > #include "APIUserScript.h" > #include "APIUserStyleSheet.h" >-#include "DataReference.h" > #include "InjectUserScriptImmediately.h" > #include "NetworkContentRuleListManagerMessages.h" > #include "NetworkProcessProxy.h" >diff --git a/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.h b/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.h >index 129a340f08964d0ffa23a37101a09a856d3cccb2..a4d8d7cd804e6560dabfde6114ff06211bad47c0 100644 >--- a/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.h >+++ b/Source/WebKit/UIProcess/UserContent/WebUserContentControllerProxy.h >@@ -27,6 +27,7 @@ > > #include "APIObject.h" > #include "ContentWorldShared.h" >+#include "DataReference.h" > #include "MessageReceiver.h" > #include "UserContentControllerIdentifier.h" > #include "WebPageProxyIdentifier.h" >@@ -48,10 +49,6 @@ class UserScript; > class UserStyleSheet; > } > >-namespace IPC { >-class DataReference; >-} >- > namespace WebCore { > struct SecurityOriginData; > } >diff --git a/Source/WebKit/UIProcess/WebPageProxy.cpp b/Source/WebKit/UIProcess/WebPageProxy.cpp >index 6ed1c69c08fc559fe2a3f3b93950ea828d60d4bf..cec73d13d098d7131848afb593ef072410218e59 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.cpp >+++ b/Source/WebKit/UIProcess/WebPageProxy.cpp >@@ -58,7 +58,6 @@ > #include "AuthenticationDecisionListener.h" > #include "AuthenticationManager.h" > #include "AuthenticatorManager.h" >-#include "DataReference.h" > #include "DownloadProxy.h" > #include "DrawingAreaMessages.h" > #include "DrawingAreaProxy.h" >@@ -7927,6 +7926,10 @@ WebPageCreationParameters WebPageProxy::creationParameters(WebProcessProxy& proc > parameters.shouldRenderCanvasInGPUProcess = preferences().useGPUProcessForCanvasRenderingEnabled(); > parameters.shouldRenderDOMInGPUProcess = preferences().useGPUProcessForDOMRenderingEnabled(); > parameters.shouldPlayMediaInGPUProcess = preferences().useGPUProcessForMediaEnabled(); >+#if ENABLE(WEBGL) >+ parameters.shouldRenderWebGLInGPUProcess = preferences().useGPUProcessForWebGLEnabled(); >+#endif >+ > parameters.shouldEnableVP9Decoder = preferences().vp9DecoderEnabled(); > #if ENABLE(VP9) && PLATFORM(COCOA) > parameters.shouldEnableVP9SWDecoder = preferences().vp9DecoderEnabled() && (!WebCore::systemHasBattery() || preferences().vp9SWDecoderEnabledOnBattery()); >diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h >index 642446f9e9aa4b521114903b6f0b5f711f91b2e5..437ab750b35ab163b2a580ae8672ed4601647409 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.h >+++ b/Source/WebKit/UIProcess/WebPageProxy.h >@@ -29,6 +29,7 @@ > #include "Connection.h" > #include "ContentAsStringIncludesChildFrames.h" > #include "ContextMenuContextData.h" >+#include "DataReference.h" > #include "DownloadID.h" > #include "DragControllerAction.h" > #include "EditingRange.h" >@@ -203,7 +204,6 @@ enum class InspectorTargetType : uint8_t; > } > > namespace IPC { >-class DataReference; > class Decoder; > class FormDataReference; > class SharedBufferCopy; >diff --git a/Source/WebKit/UIProcess/WebURLSchemeHandler.h b/Source/WebKit/UIProcess/WebURLSchemeHandler.h >index f4245ce65e9d2d565b3f125f3457a256fb39c9d4..d238c2a1a608dc5a4632e6a19977db61bab61333 100644 >--- a/Source/WebKit/UIProcess/WebURLSchemeHandler.h >+++ b/Source/WebKit/UIProcess/WebURLSchemeHandler.h >@@ -31,10 +31,6 @@ > #include <wtf/RefCounted.h> > #include <wtf/RefPtr.h> > >-namespace IPC { >-class DataReference; >-} >- > namespace WebCore { > class ResourceRequest; > } >diff --git a/Source/WebKit/UIProcess/WebURLSchemeTask.h b/Source/WebKit/UIProcess/WebURLSchemeTask.h >index d442b62b522587f90fa689d56b206276deb4482b..825cd02688a26821941ff7a418f4df5a975ba17c 100644 >--- a/Source/WebKit/UIProcess/WebURLSchemeTask.h >+++ b/Source/WebKit/UIProcess/WebURLSchemeTask.h >@@ -38,10 +38,6 @@ namespace API { > class FrameInfo; > } > >-namespace IPC { >-class DataReference; >-} >- > namespace WebCore { > class ResourceError; > class ResourceResponse; >diff --git a/Source/WebKit/WebKit.xcodeproj/project.pbxproj b/Source/WebKit/WebKit.xcodeproj/project.pbxproj >index 24611bd1d3f32c52631551f396e1f84040e488bd..98b8d1a470fd2f4c57750f33f6242800a9449681 100644 >--- a/Source/WebKit/WebKit.xcodeproj/project.pbxproj >+++ b/Source/WebKit/WebKit.xcodeproj/project.pbxproj >@@ -698,7 +698,6 @@ > 2D92A77B212B6A7100F493FD /* ArgumentCoders.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3D610413A7F03A00F95D4E /* ArgumentCoders.cpp */; }; > 2D92A77C212B6A7100F493FD /* Attachment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCEE966A112FAF57006BCC24 /* Attachment.cpp */; }; > 2D92A77D212B6A7100F493FD /* Connection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC032DA210F437D10058C15A /* Connection.cpp */; }; >- 2D92A77E212B6A7100F493FD /* DataReference.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1AC7537D183BE50F0072CB15 /* DataReference.cpp */; }; > 2D92A77F212B6A7100F493FD /* Decoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC032D9D10F437D10058C15A /* Decoder.cpp */; }; > 2D92A780212B6A7100F493FD /* Encoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC032D9F10F437D10058C15A /* Encoder.cpp */; }; > 2D92A781212B6A7100F493FD /* MessageReceiverMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A3EED0C161A535300AEB4F5 /* MessageReceiverMap.cpp */; }; >@@ -1303,6 +1302,7 @@ > 7AFBD36321E50F39005DBACB /* WebResourceLoadStatisticsStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AFBD36221E50F39005DBACB /* WebResourceLoadStatisticsStore.h */; }; > 7AFBD36721E51BAB005DBACB /* ResourceLoadStatisticsMemoryStore.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AFBD36521E51BAB005DBACB /* ResourceLoadStatisticsMemoryStore.h */; }; > 7AFBD36F21E546F8005DBACB /* PersistencyUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AFBD36D21E546E3005DBACB /* PersistencyUtils.h */; }; >+ 7B1DB26625668CE1000E26BC /* ArrayReference.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B1DB26525668CE0000E26BC /* ArrayReference.h */; }; > 7C065F2C1C8CD95F00C2D950 /* WebUserContentControllerDataTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C065F2A1C8CD95F00C2D950 /* WebUserContentControllerDataTypes.h */; }; > 7C135AA9173B0BCA00586AE2 /* WKPluginInformation.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C135AA7173B0BCA00586AE2 /* WKPluginInformation.h */; settings = {ATTRIBUTES = (Private, ); }; }; > 7C1BA33E1A4A0E600043E249 /* APIDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C1BA33C1A4A0E600043E249 /* APIDictionary.h */; }; >@@ -2719,7 +2719,6 @@ > 1AC5FFC1174BFD1B0001483D /* PluginProcessAttributes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginProcessAttributes.h; sourceTree = "<group>"; }; > 1AC75379183A9FDA0072CB15 /* PageLoadState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PageLoadState.cpp; sourceTree = "<group>"; }; > 1AC7537A183A9FDB0072CB15 /* PageLoadState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PageLoadState.h; sourceTree = "<group>"; }; >- 1AC7537D183BE50F0072CB15 /* DataReference.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = DataReference.cpp; sourceTree = "<group>"; }; > 1AC7537E183BE50F0072CB15 /* DataReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataReference.h; sourceTree = "<group>"; }; > 1AC75A1A1B3368270056745B /* HangDetectionDisabler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HangDetectionDisabler.h; sourceTree = "<group>"; }; > 1AC75A1C1B33695E0056745B /* HangDetectionDisablerMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = HangDetectionDisablerMac.mm; sourceTree = "<group>"; }; >@@ -4368,6 +4367,16 @@ > 7AFBD36521E51BAB005DBACB /* ResourceLoadStatisticsMemoryStore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ResourceLoadStatisticsMemoryStore.h; path = Classifier/ResourceLoadStatisticsMemoryStore.h; sourceTree = "<group>"; }; > 7AFBD36D21E546E3005DBACB /* PersistencyUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = PersistencyUtils.h; sourceTree = "<group>"; }; > 7AFBD36E21E546E3005DBACB /* PersistencyUtils.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = PersistencyUtils.cpp; sourceTree = "<group>"; }; >+ 7B1DB26525668CE0000E26BC /* ArrayReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArrayReference.h; sourceTree = "<group>"; }; >+ 7B64C0B6254C5C250006B4AF /* GraphicsContextGLIdentifier.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GraphicsContextGLIdentifier.h; sourceTree = "<group>"; }; >+ 7B904165254AFDEA006EEB8C /* RemoteGraphicsContextGLProxy.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteGraphicsContextGLProxy.cpp; sourceTree = "<group>"; }; >+ 7B904166254AFDEB006EEB8C /* RemoteGraphicsContextGLProxy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteGraphicsContextGLProxy.h; sourceTree = "<group>"; }; >+ 7B904167254AFE17006EEB8C /* RemoteGraphicsContextGLProxy.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = RemoteGraphicsContextGLProxy.messages.in; sourceTree = "<group>"; }; >+ 7B904168254AFEA7006EEB8C /* RemoteGraphicsContextGL.messages.in */ = {isa = PBXFileReference; lastKnownFileType = text; path = RemoteGraphicsContextGL.messages.in; sourceTree = "<group>"; }; >+ 7B904169254AFEA7006EEB8C /* RemoteGraphicsContextGL.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteGraphicsContextGL.cpp; sourceTree = "<group>"; }; >+ 7B90416A254AFEA7006EEB8C /* RemoteGraphicsContextGL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteGraphicsContextGL.h; sourceTree = "<group>"; }; >+ 7B90416D2550108C006EEB8C /* RemoteGraphicsContextGLFunctionsGenerated.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteGraphicsContextGLFunctionsGenerated.h; sourceTree = "<group>"; }; >+ 7BE726572574F67200E85D98 /* RemoteGraphicsContextGLProxyFunctionsGenerated.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = RemoteGraphicsContextGLProxyFunctionsGenerated.cpp; sourceTree = "<group>"; }; > 7C065F291C8CD95F00C2D950 /* WebUserContentControllerDataTypes.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebUserContentControllerDataTypes.cpp; sourceTree = "<group>"; }; > 7C065F2A1C8CD95F00C2D950 /* WebUserContentControllerDataTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebUserContentControllerDataTypes.h; sourceTree = "<group>"; }; > 7C135AA6173B0BCA00586AE2 /* WKPluginInformation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKPluginInformation.cpp; sourceTree = "<group>"; }; >@@ -6651,11 +6660,11 @@ > 1AEFD27811D16C81008219D3 /* ArgumentCoder.h */, > 1A3D610413A7F03A00F95D4E /* ArgumentCoders.cpp */, > 1AEFD2F611D1807B008219D3 /* ArgumentCoders.h */, >+ 7B1DB26525668CE0000E26BC /* ArrayReference.h */, > BCEE966A112FAF57006BCC24 /* Attachment.cpp */, > BCEE966B112FAF57006BCC24 /* Attachment.h */, > BC032DA210F437D10058C15A /* Connection.cpp */, > BC032DA310F437D10058C15A /* Connection.h */, >- 1AC7537D183BE50F0072CB15 /* DataReference.cpp */, > 1AC7537E183BE50F0072CB15 /* DataReference.h */, > BC032D9D10F437D10058C15A /* Decoder.cpp */, > BC032D9E10F437D10058C15A /* Decoder.h */, >@@ -8325,11 +8334,16 @@ > 727A7F3324078527004D2931 /* cocoa */, > F4094CBA2553047E003D73E3 /* DisplayListWriterHandle.cpp */, > F4094CB92553047E003D73E3 /* DisplayListWriterHandle.h */, >+ 7B64C0B6254C5C250006B4AF /* GraphicsContextGLIdentifier.h */, > 727A7F39240788F1004D2931 /* ImageBufferBackendHandle.h */, > 727A7F37240788F0004D2931 /* ImageBufferShareableBitmapBackend.cpp */, > 727A7F36240788F0004D2931 /* ImageBufferShareableBitmapBackend.h */, > 727A7F38240788F0004D2931 /* PlatformImageBufferShareableBackend.h */, > 7227800B2408BD7D007D376B /* PlatformRemoteImageBufferProxy.h */, >+ 7B904165254AFDEA006EEB8C /* RemoteGraphicsContextGLProxy.cpp */, >+ 7B904166254AFDEB006EEB8C /* RemoteGraphicsContextGLProxy.h */, >+ 7B904167254AFE17006EEB8C /* RemoteGraphicsContextGLProxy.messages.in */, >+ 7BE726572574F67200E85D98 /* RemoteGraphicsContextGLProxyFunctionsGenerated.cpp */, > 727A7F492408AEE6004D2931 /* RemoteImageBufferProxy.h */, > 5506409D2407160900AAE045 /* RemoteRenderingBackendProxy.cpp */, > 5506409E2407160900AAE045 /* RemoteRenderingBackendProxy.h */, >@@ -8347,6 +8361,10 @@ > F4094CBC255304AF003D73E3 /* DisplayListReaderHandle.cpp */, > F4094CBB255304AF003D73E3 /* DisplayListReaderHandle.h */, > 55AD09432408A0E600DE4D2F /* PlatformRemoteImageBuffer.h */, >+ 7B904169254AFEA7006EEB8C /* RemoteGraphicsContextGL.cpp */, >+ 7B90416A254AFEA7006EEB8C /* RemoteGraphicsContextGL.h */, >+ 7B904168254AFEA7006EEB8C /* RemoteGraphicsContextGL.messages.in */, >+ 7B90416D2550108C006EEB8C /* RemoteGraphicsContextGLFunctionsGenerated.h */, > 55AD09422408A02E00DE4D2F /* RemoteImageBuffer.h */, > 550640A224071A6100AAE045 /* RemoteRenderingBackend.cpp */, > 550640A324071A6100AAE045 /* RemoteRenderingBackend.h */, >@@ -11163,6 +11181,7 @@ > 1AEFD2F711D1807B008219D3 /* ArgumentCoders.h in Headers */, > 1AAF0C4A12B16334008E49E2 /* ArgumentCodersCF.h in Headers */, > A175C44A21AA3171000037D0 /* ArgumentCodersCocoa.h in Headers */, >+ 7B1DB26625668CE1000E26BC /* ArrayReference.h in Headers */, > 515E7728183DD6F60007203F /* AsyncRequest.h in Headers */, > AAFA634F234F7C6400FFA864 /* AsyncRevalidation.h in Headers */, > BCEE966D112FAF57006BCC24 /* Attachment.h in Headers */, >@@ -13231,7 +13250,6 @@ > 2D92A785212B6AB100F493FD /* BlobDataFileReferenceWithSandboxExtension.cpp in Sources */, > 517CF0E3163A486C00C2950F /* CacheStorageEngineConnectionMessageReceiver.cpp in Sources */, > 2D92A77D212B6A7100F493FD /* Connection.cpp in Sources */, >- 2D92A77E212B6A7100F493FD /* DataReference.cpp in Sources */, > 2D92A77F212B6A7100F493FD /* Decoder.cpp in Sources */, > 49DAA38C24CBA1A800793D75 /* DefaultWebBrowserChecks.mm in Sources */, > 2D0C56FE229F1DEA00BD33E7 /* DeviceManagementSoftLink.mm in Sources */, >diff --git a/Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.h b/Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.h >index f92da6a47f7e24f38399aa3698a21290d361d4a6..c9dc682b87549b8250db22b2a1ce21555000cec8 100644 >--- a/Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.h >+++ b/Source/WebKit/WebProcess/ApplePay/WebPaymentCoordinator.h >@@ -36,10 +36,6 @@ > #include <wtf/HashSet.h> > #include <wtf/text/StringHash.h> > >-namespace IPC { >-class DataReference; >-} >- > namespace WebCore { > class PaymentCoordinator; > class PaymentContact; >diff --git a/Source/WebKit/WebProcess/GPU/GPUProcessConnection.h b/Source/WebKit/WebProcess/GPU/GPUProcessConnection.h >index 2c0df5b9f5496847ed66910bf2f39b2cdc60ca02..5be8b997520c4ad7f1b4407ae7204c84a998874e 100644 >--- a/Source/WebKit/WebProcess/GPU/GPUProcessConnection.h >+++ b/Source/WebKit/WebProcess/GPU/GPUProcessConnection.h >@@ -35,10 +35,6 @@ > #include <wtf/WeakHashSet.h> > #include <wtf/text/WTFString.h> > >-namespace IPC { >-class DataReference; >-} >- > namespace WebKit { > > class RemoteAudioSourceProviderManager; >diff --git a/Source/WebKit/WebProcess/GPU/graphics/GraphicsContextGLIdentifier.h b/Source/WebKit/WebProcess/GPU/graphics/GraphicsContextGLIdentifier.h >new file mode 100644 >index 0000000000000000000000000000000000000000..aa7918e4b50c9b7cf5b2e79b077d035212c61265 >--- /dev/null >+++ b/Source/WebKit/WebProcess/GPU/graphics/GraphicsContextGLIdentifier.h >@@ -0,0 +1,39 @@ >+/* >+ * Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+ >+#include <wtf/ObjectIdentifier.h> >+ >+namespace WebKit { >+ >+enum GraphicsContextGLIdentifierType { }; >+using GraphicsContextGLIdentifier = ObjectIdentifier<GraphicsContextGLIdentifierType>; >+ >+} // namespace WebKit >+ >+#endif >diff --git a/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp b/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..34a06fb0076acd3fd32b3a4b6b09d68d027bb588 >--- /dev/null >+++ b/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.cpp >@@ -0,0 +1,167 @@ >+/* >+ * Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+ * THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#include "config.h" >+#include "RemoteGraphicsContextGLProxy.h" >+ >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+ >+#include "GPUConnectionToWebProcess.h" >+#include "GPUProcessConnection.h" >+#include "RemoteGraphicsContextGLMessages.h" >+#include "RemoteGraphicsContextGLProxyMessages.h" >+#include "WebProcess.h" >+ >+#if PLATFORM(COCOA) >+#include <WebCore/GraphicsContextCG.h> >+#include <WebCore/GraphicsContextGLIOSurfaceSwapChain.h> >+#endif >+ >+namespace WebKit { >+ >+using namespace WebCore; >+ >+RefPtr<RemoteGraphicsContextGLProxy> RemoteGraphicsContextGLProxy::create(const GraphicsContextGLAttributes& attributes) >+{ >+ return adoptRef(new RemoteGraphicsContextGLProxy(attributes)); >+} >+ >+RemoteGraphicsContextGLProxy::RemoteGraphicsContextGLProxy(const GraphicsContextGLAttributes& attrs) >+ : RemoteGraphicsContextGLProxyBase(attrs) >+{ >+ IPC::MessageReceiverMap& messageReceiverMap = WebProcess::singleton().ensureGPUProcessConnection().messageReceiverMap(); >+ messageReceiverMap.addMessageReceiver(Messages::RemoteGraphicsContextGLProxy::messageReceiverName(), m_graphicsContextGLIdentifier.toUInt64(), *this); >+ send(Messages::GPUConnectionToWebProcess::CreateGraphicsContextGL(attrs, m_graphicsContextGLIdentifier), 0); >+} >+ >+RemoteGraphicsContextGLProxy::~RemoteGraphicsContextGLProxy() >+{ >+ IPC::MessageReceiverMap& messageReceiverMap = WebProcess::singleton().ensureGPUProcessConnection().messageReceiverMap(); >+ messageReceiverMap.removeMessageReceiver(*this); >+ send(Messages::GPUConnectionToWebProcess::ReleaseGraphicsContextGL(m_graphicsContextGLIdentifier), 0); >+#if PLATFORM(COCOA) >+ platformSwapChain().recycleBuffer(); >+#endif >+} >+ >+IPC::Connection* RemoteGraphicsContextGLProxy::messageSenderConnection() const >+{ >+ return &WebProcess::singleton().ensureGPUProcessConnection().connection(); >+} >+ >+uint64_t RemoteGraphicsContextGLProxy::messageSenderDestinationID() const >+{ >+ return m_graphicsContextGLIdentifier.toUInt64(); >+} >+ >+void RemoteGraphicsContextGLProxy::reshape(int width, int height) >+{ >+ m_currentWidth = width; >+ m_currentHeight = height; >+ send(Messages::RemoteGraphicsContextGL::Reshape(width, height), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::prepareForDisplay() >+{ >+#if PLATFORM(COCOA) >+ MachSendRight displayBufferSendRight; >+ sendSync(Messages::RemoteGraphicsContextGL::PrepareForDisplay(), Messages::RemoteGraphicsContextGL::PrepareForDisplay::Reply(displayBufferSendRight), m_graphicsContextGLIdentifier, 10_s); >+ auto displayBuffer = IOSurface::createFromSendRight(WTFMove(displayBufferSendRight), sRGBColorSpaceRef()); >+ if (displayBuffer) { >+ auto& sc = platformSwapChain(); >+ sc.recycleBuffer(); >+ sc.present({ WTFMove(displayBuffer), nullptr }); >+ } >+#else >+ sendSync(Messages::RemoteGraphicsContextGL::PrepareForDisplay(), Messages::RemoteGraphicsContextGL::PrepareForDisplay::Reply(), m_graphicsContextGLIdentifier, 10_s); >+#endif >+ markLayerComposited(); >+} >+ >+void RemoteGraphicsContextGLProxy::ensureExtensionEnabled(const String& extension) >+{ >+ send(Messages::RemoteGraphicsContextGL::EnsureExtensionEnabled(extension), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::notifyMarkContextChanged() >+{ >+ send(Messages::RemoteGraphicsContextGL::NotifyMarkContextChanged(), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::simulateContextChanged() >+{ >+ // FIXME: Currently not implemented because it's not clear this is the right way. https://bugs.webkit.org/show_bug.cgi?id=219349 >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::paintRenderingResultsToCanvas(ImageBuffer*) >+{ >+ notImplemented(); >+} >+ >+RefPtr<ImageData> RemoteGraphicsContextGLProxy::paintRenderingResultsToImageData() >+{ >+ notImplemented(); >+ return nullptr; >+} >+ >+void RemoteGraphicsContextGLProxy::wasCreated(String&& availableExtensions, String&& requestedExtensions) >+{ >+ if (m_didInitialize) { >+ // Initialization timed out before, so lose the context now. >+ wasLost(); >+ return; >+ } >+ initialize(availableExtensions, requestedExtensions); >+ m_didInitialize = true; >+} >+ >+void RemoteGraphicsContextGLProxy::wasLost() >+{ >+ for (auto* client : copyToVector(m_clients)) >+ client->forceContextLost(); >+} >+ >+void RemoteGraphicsContextGLProxy::wasChanged() >+{ >+ for (auto* client : copyToVector(m_clients)) >+ client->dispatchContextChangedNotification(); >+} >+ >+void RemoteGraphicsContextGLProxy::waitUntilInitialized() >+{ >+ if (m_didInitialize) >+ return; >+ Ref<IPC::Connection> connection = WebProcess::singleton().ensureGPUProcessConnection().connection(); >+ if (connection->waitForAndDispatchImmediately<Messages::RemoteGraphicsContextGLProxy::WasCreated>(m_graphicsContextGLIdentifier, 10_s, IPC::WaitForOption::InterruptWaitingIfSyncMessageArrives)) >+ return; >+ // Timed out, so report initialized with dummy data. We should lose the context. >+ wasCreated("", ""); >+ // FIXME: Need to mark the context as lost, but it's not safe to force lost in this call stack. >+} >+ >+} // namespace WebKit >+ >+#endif >diff --git a/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h b/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h >new file mode 100644 >index 0000000000000000000000000000000000000000..e482746a32c4983444f8bd1dfced697173049b57 >--- /dev/null >+++ b/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h >@@ -0,0 +1,410 @@ >+/* >+ * Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+#pragma once >+ >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+ >+#include "GraphicsContextGLIdentifier.h" >+#include "MessageReceiver.h" >+#include "MessageSender.h" >+#include "RemoteGraphicsContextGLMessages.h" >+#include "RemoteResourceCacheProxy.h" >+#include "WebCoreArgumentCoders.h" >+ >+#include <WebCore/NotImplemented.h> >+#include <WebCore/RemoteGraphicsContextGLProxyBase.h> >+#include <wtf/HashMap.h> >+#include <wtf/WeakPtr.h> >+ >+ >+namespace WebKit { >+ >+// Web process side implementation of GraphicsContextGL interface. The implementation >+// converts the interface to a sequence of IPC messages and sends the messages to >+// RemoteGraphicsContextGL in GPU process. >+// The implementation is largely generated by running Tools/Scripts/generate-gpup-webgl. >+class RemoteGraphicsContextGLProxy final >+ : public IPC::MessageSender >+ , private IPC::MessageReceiver >+ , public CanMakeWeakPtr<RemoteGraphicsContextGLProxy> >+ , public WebCore::RemoteGraphicsContextGLProxyBase { >+public: >+ static RefPtr<RemoteGraphicsContextGLProxy> create(const WebCore::GraphicsContextGLAttributes&); >+ ~RemoteGraphicsContextGLProxy() final; >+ >+ // IPC::MessageSender overrides. >+ IPC::Connection* messageSenderConnection() const final; >+ uint64_t messageSenderDestinationID() const final; >+ >+ // IPC::MessageReceiver overrides. >+ void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final; >+ >+ // RemoteGraphicsContextGLProxyBase overrides. >+ void reshape(int width, int height) final; >+ void prepareForDisplay() final; >+ using WebCore::RemoteGraphicsContextGLProxyBase::isEnabled; >+ void ensureExtensionEnabled(const String& extension) final; >+ void notifyMarkContextChanged() final; >+ void simulateContextChanged() final; >+ void paintRenderingResultsToCanvas(WebCore::ImageBuffer*) final; >+ RefPtr<WebCore::ImageData> paintRenderingResultsToImageData() final; >+ >+ // Functions with a generated implementation. This list is used by generate-gpup-webgl script. >+ void setFailNextGPUStatusCheck() final; >+ void synthesizeGLError(GCGLenum error) final; >+ bool moveErrorsToSyntheticErrorList() final; >+ void activeTexture(GCGLenum texture) final; >+ void attachShader(PlatformGLObject program, PlatformGLObject shader) final; >+ void bindAttribLocation(PlatformGLObject arg0, GCGLuint index, const String& name) final; >+ void bindBuffer(GCGLenum target, PlatformGLObject arg1) final; >+ void bindFramebuffer(GCGLenum target, PlatformGLObject arg1) final; >+ void bindRenderbuffer(GCGLenum target, PlatformGLObject arg1) final; >+ void bindTexture(GCGLenum target, PlatformGLObject arg1) final; >+ void blendColor(GCGLclampf red, GCGLclampf green, GCGLclampf blue, GCGLclampf alpha) final; >+ void blendEquation(GCGLenum mode) final; >+ void blendEquationSeparate(GCGLenum modeRGB, GCGLenum modeAlpha) final; >+ void blendFunc(GCGLenum sfactor, GCGLenum dfactor) final; >+ void blendFuncSeparate(GCGLenum srcRGB, GCGLenum dstRGB, GCGLenum srcAlpha, GCGLenum dstAlpha) final; >+ GCGLenum checkFramebufferStatus(GCGLenum target) final; >+ void clear(GCGLbitfield mask) final; >+ void clearColor(GCGLclampf red, GCGLclampf green, GCGLclampf blue, GCGLclampf alpha) final; >+ void clearDepth(GCGLclampf depth) final; >+ void clearStencil(GCGLint s) final; >+ void colorMask(GCGLboolean red, GCGLboolean green, GCGLboolean blue, GCGLboolean alpha) final; >+ void compileShader(PlatformGLObject arg0) final; >+ void copyTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLint border) final; >+ void copyTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height) final; >+ PlatformGLObject createBuffer() final; >+ PlatformGLObject createFramebuffer() final; >+ PlatformGLObject createProgram() final; >+ PlatformGLObject createRenderbuffer() final; >+ PlatformGLObject createShader(GCGLenum arg0) final; >+ PlatformGLObject createTexture() final; >+ void cullFace(GCGLenum mode) final; >+ void deleteBuffer(PlatformGLObject arg0) final; >+ void deleteFramebuffer(PlatformGLObject arg0) final; >+ void deleteProgram(PlatformGLObject arg0) final; >+ void deleteRenderbuffer(PlatformGLObject arg0) final; >+ void deleteShader(PlatformGLObject arg0) final; >+ void deleteTexture(PlatformGLObject arg0) final; >+ void depthFunc(GCGLenum func) final; >+ void depthMask(GCGLboolean flag) final; >+ void depthRange(GCGLclampf zNear, GCGLclampf zFar) final; >+ void detachShader(PlatformGLObject arg0, PlatformGLObject arg1) final; >+ void disable(GCGLenum cap) final; >+ void disableVertexAttribArray(GCGLuint index) final; >+ void drawArrays(GCGLenum mode, GCGLint first, GCGLsizei count) final; >+ void drawElements(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLintptr offset) final; >+ void enable(GCGLenum cap) final; >+ void enableVertexAttribArray(GCGLuint index) final; >+ void finish() final; >+ void flush() final; >+ void framebufferRenderbuffer(GCGLenum target, GCGLenum attachment, GCGLenum renderbuffertarget, PlatformGLObject arg3) final; >+ void framebufferTexture2D(GCGLenum target, GCGLenum attachment, GCGLenum textarget, PlatformGLObject arg3, GCGLint level) final; >+ void frontFace(GCGLenum mode) final; >+ void generateMipmap(GCGLenum target) final; >+ bool getActiveAttrib(PlatformGLObject program, GCGLuint index, ActiveInfo& arg2) final; >+ bool getActiveUniform(PlatformGLObject program, GCGLuint index, ActiveInfo& arg2) final; >+ GCGLint getAttribLocation(PlatformGLObject arg0, const String& name) final; >+ GCGLint getBufferParameteri(GCGLenum target, GCGLenum pname) final; >+ String getString(GCGLenum name) final; >+ void getFloatv(GCGLenum pname, GCGLSpan<GCGLfloat> value) final; >+ void getIntegerv(GCGLenum pname, GCGLSpan<GCGLint> value) final; >+ GCGLint64 getInteger64(GCGLenum pname) final; >+ GCGLint64 getInteger64i(GCGLenum pname, GCGLuint index) final; >+ GCGLint getProgrami(PlatformGLObject program, GCGLenum pname) final; >+ void getBooleanv(GCGLenum pname, GCGLSpan<GCGLboolean> value) final; >+ GCGLenum getError() final; >+ GCGLint getFramebufferAttachmentParameteri(GCGLenum target, GCGLenum attachment, GCGLenum pname) final; >+ String getProgramInfoLog(PlatformGLObject arg0) final; >+ GCGLint getRenderbufferParameteri(GCGLenum target, GCGLenum pname) final; >+ GCGLint getShaderi(PlatformGLObject arg0, GCGLenum pname) final; >+ String getShaderInfoLog(PlatformGLObject arg0) final; >+ void getShaderPrecisionFormat(GCGLenum shaderType, GCGLenum precisionType, GCGLSpan<GCGLint, 2> range, GCGLint* precision) final; >+ String getShaderSource(PlatformGLObject arg0) final; >+ GCGLfloat getTexParameterf(GCGLenum target, GCGLenum pname) final; >+ GCGLint getTexParameteri(GCGLenum target, GCGLenum pname) final; >+ void getUniformfv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLfloat> value) final; >+ void getUniformiv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLint> value) final; >+ void getUniformuiv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLuint> value) final; >+ GCGLint getUniformLocation(PlatformGLObject arg0, const String& name) final; >+ GCGLsizeiptr getVertexAttribOffset(GCGLuint index, GCGLenum pname) final; >+ void hint(GCGLenum target, GCGLenum mode) final; >+ GCGLboolean isBuffer(PlatformGLObject arg0) final; >+ GCGLboolean isEnabled(GCGLenum cap) final; >+ GCGLboolean isFramebuffer(PlatformGLObject arg0) final; >+ GCGLboolean isProgram(PlatformGLObject arg0) final; >+ GCGLboolean isRenderbuffer(PlatformGLObject arg0) final; >+ GCGLboolean isShader(PlatformGLObject arg0) final; >+ GCGLboolean isTexture(PlatformGLObject arg0) final; >+ void lineWidth(GCGLfloat arg0) final; >+ void linkProgram(PlatformGLObject arg0) final; >+ void pixelStorei(GCGLenum pname, GCGLint param) final; >+ void polygonOffset(GCGLfloat factor, GCGLfloat units) final; >+ void renderbufferStorage(GCGLenum target, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) final; >+ void sampleCoverage(GCGLclampf value, GCGLboolean invert) final; >+ void scissor(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height) final; >+ void shaderSource(PlatformGLObject arg0, const String&) final; >+ void stencilFunc(GCGLenum func, GCGLint ref, GCGLuint mask) final; >+ void stencilFuncSeparate(GCGLenum face, GCGLenum func, GCGLint ref, GCGLuint mask) final; >+ void stencilMask(GCGLuint mask) final; >+ void stencilMaskSeparate(GCGLenum face, GCGLuint mask) final; >+ void stencilOp(GCGLenum fail, GCGLenum zfail, GCGLenum zpass) final; >+ void stencilOpSeparate(GCGLenum face, GCGLenum fail, GCGLenum zfail, GCGLenum zpass) final; >+ void texParameterf(GCGLenum target, GCGLenum pname, GCGLfloat param) final; >+ void texParameteri(GCGLenum target, GCGLenum pname, GCGLint param) final; >+ void uniform1f(GCGLint location, GCGLfloat x) final; >+ void uniform1fv(GCGLint location, GCGLSpan<const GCGLfloat> v) final; >+ void uniform1i(GCGLint location, GCGLint x) final; >+ void uniform1iv(GCGLint location, GCGLSpan<const GCGLint> v) final; >+ void uniform2f(GCGLint location, GCGLfloat x, GCGLfloat y) final; >+ void uniform2fv(GCGLint location, GCGLSpan<const GCGLfloat> v) final; >+ void uniform2i(GCGLint location, GCGLint x, GCGLint y) final; >+ void uniform2iv(GCGLint location, GCGLSpan<const GCGLint> v) final; >+ void uniform3f(GCGLint location, GCGLfloat x, GCGLfloat y, GCGLfloat z) final; >+ void uniform3fv(GCGLint location, GCGLSpan<const GCGLfloat> v) final; >+ void uniform3i(GCGLint location, GCGLint x, GCGLint y, GCGLint z) final; >+ void uniform3iv(GCGLint location, GCGLSpan<const GCGLint> v) final; >+ void uniform4f(GCGLint location, GCGLfloat x, GCGLfloat y, GCGLfloat z, GCGLfloat w) final; >+ void uniform4fv(GCGLint location, GCGLSpan<const GCGLfloat> v) final; >+ void uniform4i(GCGLint location, GCGLint x, GCGLint y, GCGLint z, GCGLint w) final; >+ void uniform4iv(GCGLint location, GCGLSpan<const GCGLint> v) final; >+ void uniformMatrix2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> value) final; >+ void uniformMatrix3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> value) final; >+ void uniformMatrix4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> value) final; >+ void useProgram(PlatformGLObject arg0) final; >+ void validateProgram(PlatformGLObject arg0) final; >+ void vertexAttrib1f(GCGLuint index, GCGLfloat x) final; >+ void vertexAttrib1fv(GCGLuint index, GCGLSpan<const GCGLfloat, 1> values) final; >+ void vertexAttrib2f(GCGLuint index, GCGLfloat x, GCGLfloat y) final; >+ void vertexAttrib2fv(GCGLuint index, GCGLSpan<const GCGLfloat, 2> values) final; >+ void vertexAttrib3f(GCGLuint index, GCGLfloat x, GCGLfloat y, GCGLfloat z) final; >+ void vertexAttrib3fv(GCGLuint index, GCGLSpan<const GCGLfloat, 3> values) final; >+ void vertexAttrib4f(GCGLuint index, GCGLfloat x, GCGLfloat y, GCGLfloat z, GCGLfloat w) final; >+ void vertexAttrib4fv(GCGLuint index, GCGLSpan<const GCGLfloat, 4> values) final; >+ void vertexAttribPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLboolean normalized, GCGLsizei stride, GCGLintptr offset) final; >+ void viewport(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height) final; >+ void bufferData(GCGLenum target, GCGLsizeiptr arg1, GCGLenum usage) final; >+ void bufferData(GCGLenum target, GCGLSpan<const GCGLvoid> data, GCGLenum usage) final; >+ void bufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<const GCGLvoid> data) final; >+ void readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<GCGLvoid> data) final; >+ void readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset) final; >+ void texImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels) final; >+ void texImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr offset) final; >+ void texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels) final; >+ void texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset) final; >+ void compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) final; >+ void compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLsizei imageSize, GCGLintptr offset) final; >+ void compressedTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) final; >+ void compressedTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLintptr offset) final; >+ void drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) final; >+ void drawElementsInstanced(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLintptr offset, GCGLsizei primcount) final; >+ void vertexAttribDivisor(GCGLuint index, GCGLuint divisor) final; >+ PlatformGLObject createVertexArray() final; >+ void deleteVertexArray(PlatformGLObject arg0) final; >+ GCGLboolean isVertexArray(PlatformGLObject arg0) final; >+ void bindVertexArray(PlatformGLObject arg0) final; >+ void copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLintptr readOffset, GCGLintptr writeOffset, GCGLsizeiptr) final; >+ void getBufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<GCGLvoid> data) final; >+ void blitFramebuffer(GCGLint srcX0, GCGLint srcY0, GCGLint srcX1, GCGLint srcY1, GCGLint dstX0, GCGLint dstY0, GCGLint dstX1, GCGLint dstY1, GCGLbitfield mask, GCGLenum filter) final; >+ void framebufferTextureLayer(GCGLenum target, GCGLenum attachment, PlatformGLObject texture, GCGLint level, GCGLint layer) final; >+ void invalidateFramebuffer(GCGLenum target, GCGLSpan<const GCGLenum> attachments) final; >+ void invalidateSubFramebuffer(GCGLenum target, GCGLSpan<const GCGLenum> attachments, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height) final; >+ void readBuffer(GCGLenum src) final; >+ void renderbufferStorageMultisample(GCGLenum target, GCGLsizei samples, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) final; >+ void texStorage2D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) final; >+ void texStorage3D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth) final; >+ void texImage3D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels) final; >+ void texImage3D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr offset) final; >+ void texSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels) final; >+ void texSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLenum type, GCGLintptr offset) final; >+ void copyTexSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height) final; >+ void compressedTexImage3D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) final; >+ void compressedTexImage3D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLsizei imageSize, GCGLintptr offset) final; >+ void compressedTexSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) final; >+ void compressedTexSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLsizei imageSize, GCGLintptr offset) final; >+ GCGLint getFragDataLocation(PlatformGLObject program, const String& name) final; >+ void uniform1ui(GCGLint location, GCGLuint v0) final; >+ void uniform2ui(GCGLint location, GCGLuint v0, GCGLuint v1) final; >+ void uniform3ui(GCGLint location, GCGLuint v0, GCGLuint v1, GCGLuint v2) final; >+ void uniform4ui(GCGLint location, GCGLuint v0, GCGLuint v1, GCGLuint v2, GCGLuint v3) final; >+ void uniform1uiv(GCGLint location, GCGLSpan<const GCGLuint> data) final; >+ void uniform2uiv(GCGLint location, GCGLSpan<const GCGLuint> data) final; >+ void uniform3uiv(GCGLint location, GCGLSpan<const GCGLuint> data) final; >+ void uniform4uiv(GCGLint location, GCGLSpan<const GCGLuint> data) final; >+ void uniformMatrix2x3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) final; >+ void uniformMatrix3x2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) final; >+ void uniformMatrix2x4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) final; >+ void uniformMatrix4x2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) final; >+ void uniformMatrix3x4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) final; >+ void uniformMatrix4x3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) final; >+ void vertexAttribI4i(GCGLuint index, GCGLint x, GCGLint y, GCGLint z, GCGLint w) final; >+ void vertexAttribI4iv(GCGLuint index, GCGLSpan<const GCGLint, 4> values) final; >+ void vertexAttribI4ui(GCGLuint index, GCGLuint x, GCGLuint y, GCGLuint z, GCGLuint w) final; >+ void vertexAttribI4uiv(GCGLuint index, GCGLSpan<const GCGLuint, 4> values) final; >+ void vertexAttribIPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLsizei stride, GCGLintptr offset) final; >+ void drawRangeElements(GCGLenum mode, GCGLuint start, GCGLuint end, GCGLsizei count, GCGLenum type, GCGLintptr offset) final; >+ void drawBuffers(GCGLSpan<const GCGLenum> bufs) final; >+ void clearBufferiv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLint> values) final; >+ void clearBufferuiv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLuint> values) final; >+ void clearBufferfv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLfloat> values) final; >+ void clearBufferfi(GCGLenum buffer, GCGLint drawbuffer, GCGLfloat depth, GCGLint stencil) final; >+ PlatformGLObject createQuery() final; >+ void deleteQuery(PlatformGLObject query) final; >+ GCGLboolean isQuery(PlatformGLObject query) final; >+ void beginQuery(GCGLenum target, PlatformGLObject query) final; >+ void endQuery(GCGLenum target) final; >+ PlatformGLObject getQuery(GCGLenum target, GCGLenum pname) final; >+ GCGLuint getQueryObjectui(PlatformGLObject query, GCGLenum pname) final; >+ PlatformGLObject createSampler() final; >+ void deleteSampler(PlatformGLObject sampler) final; >+ GCGLboolean isSampler(PlatformGLObject sampler) final; >+ void bindSampler(GCGLuint unit, PlatformGLObject sampler) final; >+ void samplerParameteri(PlatformGLObject sampler, GCGLenum pname, GCGLint param) final; >+ void samplerParameterf(PlatformGLObject sampler, GCGLenum pname, GCGLfloat param) final; >+ GCGLfloat getSamplerParameterf(PlatformGLObject sampler, GCGLenum pname) final; >+ GCGLint getSamplerParameteri(PlatformGLObject sampler, GCGLenum pname) final; >+ GCGLsync fenceSync(GCGLenum condition, GCGLbitfield flags) final; >+ GCGLboolean isSync(GCGLsync arg0) final; >+ void deleteSync(GCGLsync arg0) final; >+ GCGLenum clientWaitSync(GCGLsync arg0, GCGLbitfield flags, GCGLuint64 timeout) final; >+ void waitSync(GCGLsync arg0, GCGLbitfield flags, GCGLint64 timeout) final; >+ GCGLint getSynci(GCGLsync arg0, GCGLenum pname) final; >+ PlatformGLObject createTransformFeedback() final; >+ void deleteTransformFeedback(PlatformGLObject id) final; >+ GCGLboolean isTransformFeedback(PlatformGLObject id) final; >+ void bindTransformFeedback(GCGLenum target, PlatformGLObject id) final; >+ void beginTransformFeedback(GCGLenum primitiveMode) final; >+ void endTransformFeedback() final; >+ void transformFeedbackVaryings(PlatformGLObject program, const Vector<String>& varyings, GCGLenum bufferMode) final; >+ void getTransformFeedbackVarying(PlatformGLObject program, GCGLuint index, ActiveInfo& arg2) final; >+ void pauseTransformFeedback() final; >+ void resumeTransformFeedback() final; >+ void bindBufferBase(GCGLenum target, GCGLuint index, PlatformGLObject buffer) final; >+ void bindBufferRange(GCGLenum target, GCGLuint index, PlatformGLObject buffer, GCGLintptr offset, GCGLsizeiptr) final; >+ Vector<GCGLuint> getUniformIndices(PlatformGLObject program, const Vector<String>& uniformNames) final; >+ Vector<GCGLint> getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname) final; >+ GCGLuint getUniformBlockIndex(PlatformGLObject program, const String& uniformBlockName) final; >+ String getActiveUniformBlockName(PlatformGLObject program, GCGLuint uniformBlockIndex) final; >+ void uniformBlockBinding(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLuint uniformBlockBinding) final; >+ void getActiveUniformBlockiv(GCGLuint program, GCGLuint uniformBlockIndex, GCGLenum pname, GCGLSpan<GCGLint> params) final; >+ GCGLint getGraphicsResetStatusARB() final; >+ void blitFramebufferANGLE(GCGLint srcX0, GCGLint srcY0, GCGLint srcX1, GCGLint srcY1, GCGLint dstX0, GCGLint dstY0, GCGLint dstX1, GCGLint dstY1, GCGLbitfield mask, GCGLenum filter) final; >+ void renderbufferStorageMultisampleANGLE(GCGLenum target, GCGLsizei samples, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) final; >+ PlatformGLObject createVertexArrayOES() final; >+ void deleteVertexArrayOES(PlatformGLObject arg0) final; >+ GCGLboolean isVertexArrayOES(PlatformGLObject arg0) final; >+ void bindVertexArrayOES(PlatformGLObject arg0) final; >+ String getTranslatedShaderSourceANGLE(PlatformGLObject arg0) final; >+ void insertEventMarkerEXT(const String& arg0) final; >+ void pushGroupMarkerEXT(const String& arg0) final; >+ void popGroupMarkerEXT() final; >+ void drawBuffersEXT(GCGLSpan<const GCGLenum> bufs) final; >+ void drawArraysInstancedANGLE(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) final; >+ void drawElementsInstancedANGLE(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLvoidptr offset, GCGLsizei primcount) final; >+ void vertexAttribDivisorANGLE(GCGLuint index, GCGLuint divisor) final; >+ void getInternalformativ(GCGLenum target, GCGLenum internalformat, GCGLenum pname, GCGLsizei bufSize, GCGLint* params) final; >+ void readPixelsRobustANGLE(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLsizei* length, GCGLsizei* columns, GCGLsizei* rows, GCGLvoid* pixels) final; >+ void texParameterfvRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, const GCGLfloat* params) final; >+ void texParameterivRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, const GCGLint* params) final; >+ void getQueryivRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) final; >+ void getQueryObjectuivRobustANGLE(GCGLuint id, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLuint* params) final; >+ void getBufferPointervRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLvoid** params) final; >+ void getInternalformativRobustANGLE(GCGLenum target, GCGLenum internalformat, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) final; >+ void getVertexAttribIivRobustANGLE(GCGLuint index, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) final; >+ void getVertexAttribIuivRobustANGLE(GCGLuint index, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLuint* params) final; >+ void getUniformuivRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei* length, GCGLuint* params) final; >+ void getBufferParameteri64vRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint64* params) final; >+ void samplerParameterivRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, const GCGLint* param) final; >+ void samplerParameterfvRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, const GCGLfloat* param) final; >+ void getSamplerParameterivRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) final; >+ void getSamplerParameterfvRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLfloat* params) final; >+ void getFramebufferParameterivRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) final; >+ void getProgramInterfaceivRobustANGLE(GCGLuint program, GCGLenum programInterface, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) final; >+ void getBooleani_vRobustANGLE(GCGLenum target, GCGLuint index, GCGLsizei bufSize, GCGLsizei* length, GCGLboolean* data) final; // NOLINT >+ void getMultisamplefvRobustANGLE(GCGLenum pname, GCGLuint index, GCGLsizei bufSize, GCGLsizei* length, GCGLfloat* val) final; >+ void getTexLevelParameterivRobustANGLE(GCGLenum target, GCGLint level, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) final; >+ void getTexLevelParameterfvRobustANGLE(GCGLenum target, GCGLint level, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLfloat* params) final; >+ void getPointervRobustANGLERobustANGLE(GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLvoid** params) final; >+ void getnUniformfvRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei* length, GCGLfloat* params) final; >+ void getnUniformivRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) final; >+ void getnUniformuivRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei* length, GCGLuint* params) final; >+ void texParameterIivRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, const GCGLint* params) final; >+ void texParameterIuivRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, const GCGLuint* params) final; >+ void getTexParameterIivRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) final; >+ void getTexParameterIuivRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLuint* params) final; >+ void samplerParameterIivRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, const GCGLint* param) final; >+ void samplerParameterIuivRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, const GCGLuint* param) final; >+ void getSamplerParameterIivRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) final; >+ void getSamplerParameterIuivRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLuint* params) final; >+ void getQueryObjectivRobustANGLE(GCGLuint id, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) final; >+ void getQueryObjecti64vRobustANGLE(GCGLuint id, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint64* params) final; >+ void getQueryObjectui64vRobustANGLE(GCGLuint id, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLuint64* params) final; >+ // End of list used by generate-gpup-webgl script. >+ >+protected: >+ // RemoteGraphicsContextGLProxyBase overrides. >+ void waitUntilInitialized() final; >+ >+private: >+ // Messages to be received. >+ void wasCreated(String&& availableExtensions, String&& requestedExtensions); >+ void wasLost(); >+ void wasChanged(); >+ >+ RemoteGraphicsContextGLProxy(const WebCore::GraphicsContextGLAttributes&); >+ bool m_didInitialize { false }; >+ GraphicsContextGLIdentifier m_graphicsContextGLIdentifier { GraphicsContextGLIdentifier::generate() }; >+}; >+ >+// The GCGL types map to following WebKit IPC types. The list is used by generate-gpup-webgl script. >+static_assert(std::is_same_v<GCGLenum, uint32_t>); >+static_assert(sizeof(GCGLboolean) == sizeof(bool)); >+static_assert(std::is_same_v<GCGLbitfield, uint32_t>); >+static_assert(std::is_same_v<GCGLbyte, int8_t>); >+static_assert(std::is_same_v<GCGLubyte, uint8_t>); >+static_assert(std::is_same_v<GCGLshort, int16_t>); >+static_assert(std::is_same_v<GCGLushort, uint16_t>); >+static_assert(std::is_same_v<GCGLint, int32_t>); >+static_assert(std::is_same_v<GCGLsizei, int32_t>); >+static_assert(std::is_same_v<GCGLuint, uint32_t>); >+static_assert(std::is_same_v<GCGLfloat, float>); >+static_assert(std::is_same_v<GCGLhalffloat, uint16_t>); >+static_assert(std::is_same_v<GCGLclampf, float>); >+static_assert(std::is_same_v<GCGLvoid, void>); >+static_assert(std::is_same_v<PlatformGLObject, uint32_t>); >+static_assert(sizeof(GCGLintptr) == sizeof(uint64_t)); >+static_assert(sizeof(GCGLsizeiptr) == sizeof(uint64_t)); >+static_assert(sizeof(GCGLvoidptr) == sizeof(uint64_t)); >+static_assert(sizeof(GCGLchar) == sizeof(uint8_t)); >+static_assert(sizeof(GCGLint64) == sizeof(int64_t)); >+static_assert(sizeof(GCGLuint64) == sizeof(uint64_t)); >+static_assert(sizeof(GCGLsync) == sizeof(uint64_t) && sizeof(GCGLsync) == sizeof(intptr_t)); >+// End of list used by generate-gpup-webgl script. >+ >+} // namespace WebKit >+ >+#endif >diff --git a/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in b/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in >new file mode 100644 >index 0000000000000000000000000000000000000000..5f2b32b2bc1010ef8ecd0af5777abd4fa08a3c90 >--- /dev/null >+++ b/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.messages.in >@@ -0,0 +1,31 @@ >+# Copyright (C) 2020 Apple Inc. All rights reserved. >+# >+# Redistribution and use in source and binary forms, with or without >+# modification, are permitted provided that the following conditions >+# are met: >+# 1. Redistributions of source code must retain the above copyright >+# notice, this list of conditions and the following disclaimer. >+# 2. Redistributions in binary form must reproduce the above copyright >+# notice, this list of conditions and the following disclaimer in the >+# documentation and/or other materials provided with the distribution. >+# >+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND >+# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >+# DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR >+# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR >+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER >+# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, >+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+ >+messages -> RemoteGraphicsContextGLProxy NotRefCounted { >+ void WasCreated(String availableExtensions, String requestableExtensions) >+ void WasLost() >+ void WasChanged(); >+} >+ >+#endif >diff --git a/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp b/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp >new file mode 100644 >index 0000000000000000000000000000000000000000..314a443156211cc7185137338cacc7ce5035795c >--- /dev/null >+++ b/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp >@@ -0,0 +1,1647 @@ >+/* Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND >+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR >+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR >+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER >+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, >+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+// This file is generated by generate-gpup-webgl. Do not edit. >+ >+#include "config.h" >+#include "RemoteGraphicsContextGLProxy.h" >+ >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+ >+namespace WebKit { >+ >+void RemoteGraphicsContextGLProxy::setFailNextGPUStatusCheck() >+{ >+ send(Messages::RemoteGraphicsContextGL::SetFailNextGPUStatusCheck(), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::synthesizeGLError(GCGLenum error) >+{ >+ send(Messages::RemoteGraphicsContextGL::SynthesizeGLError(error), m_graphicsContextGLIdentifier); >+} >+ >+bool RemoteGraphicsContextGLProxy::moveErrorsToSyntheticErrorList() >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::MoveErrorsToSyntheticErrorList(), Messages::RemoteGraphicsContextGL::MoveErrorsToSyntheticErrorList::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::activeTexture(GCGLenum texture) >+{ >+ send(Messages::RemoteGraphicsContextGL::ActiveTexture(texture), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::attachShader(PlatformGLObject program, PlatformGLObject shader) >+{ >+ send(Messages::RemoteGraphicsContextGL::AttachShader(program, shader), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::bindAttribLocation(PlatformGLObject arg0, GCGLuint index, const String& name) >+{ >+ send(Messages::RemoteGraphicsContextGL::BindAttribLocation(arg0, index, name), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::bindBuffer(GCGLenum target, PlatformGLObject arg1) >+{ >+ send(Messages::RemoteGraphicsContextGL::BindBuffer(target, arg1), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::bindFramebuffer(GCGLenum target, PlatformGLObject arg1) >+{ >+ send(Messages::RemoteGraphicsContextGL::BindFramebuffer(target, arg1), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::bindRenderbuffer(GCGLenum target, PlatformGLObject arg1) >+{ >+ send(Messages::RemoteGraphicsContextGL::BindRenderbuffer(target, arg1), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::bindTexture(GCGLenum target, PlatformGLObject arg1) >+{ >+ send(Messages::RemoteGraphicsContextGL::BindTexture(target, arg1), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::blendColor(GCGLclampf red, GCGLclampf green, GCGLclampf blue, GCGLclampf alpha) >+{ >+ send(Messages::RemoteGraphicsContextGL::BlendColor(red, green, blue, alpha), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::blendEquation(GCGLenum mode) >+{ >+ send(Messages::RemoteGraphicsContextGL::BlendEquation(mode), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::blendEquationSeparate(GCGLenum modeRGB, GCGLenum modeAlpha) >+{ >+ send(Messages::RemoteGraphicsContextGL::BlendEquationSeparate(modeRGB, modeAlpha), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::blendFunc(GCGLenum sfactor, GCGLenum dfactor) >+{ >+ send(Messages::RemoteGraphicsContextGL::BlendFunc(sfactor, dfactor), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::blendFuncSeparate(GCGLenum srcRGB, GCGLenum dstRGB, GCGLenum srcAlpha, GCGLenum dstAlpha) >+{ >+ send(Messages::RemoteGraphicsContextGL::BlendFuncSeparate(srcRGB, dstRGB, srcAlpha, dstAlpha), m_graphicsContextGLIdentifier); >+} >+ >+GCGLenum RemoteGraphicsContextGLProxy::checkFramebufferStatus(GCGLenum target) >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::CheckFramebufferStatus(target), Messages::RemoteGraphicsContextGL::CheckFramebufferStatus::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::clear(GCGLbitfield mask) >+{ >+ send(Messages::RemoteGraphicsContextGL::Clear(mask), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::clearColor(GCGLclampf red, GCGLclampf green, GCGLclampf blue, GCGLclampf alpha) >+{ >+ send(Messages::RemoteGraphicsContextGL::ClearColor(red, green, blue, alpha), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::clearDepth(GCGLclampf depth) >+{ >+ send(Messages::RemoteGraphicsContextGL::ClearDepth(depth), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::clearStencil(GCGLint s) >+{ >+ send(Messages::RemoteGraphicsContextGL::ClearStencil(s), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::colorMask(GCGLboolean red, GCGLboolean green, GCGLboolean blue, GCGLboolean alpha) >+{ >+ send(Messages::RemoteGraphicsContextGL::ColorMask(static_cast<bool>(red), static_cast<bool>(green), static_cast<bool>(blue), static_cast<bool>(alpha)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::compileShader(PlatformGLObject arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::CompileShader(arg0), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::copyTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLint border) >+{ >+ send(Messages::RemoteGraphicsContextGL::CopyTexImage2D(target, level, internalformat, x, y, width, height, border), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::copyTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height) >+{ >+ send(Messages::RemoteGraphicsContextGL::CopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height), m_graphicsContextGLIdentifier); >+} >+ >+PlatformGLObject RemoteGraphicsContextGLProxy::createBuffer() >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::CreateBuffer(), Messages::RemoteGraphicsContextGL::CreateBuffer::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+PlatformGLObject RemoteGraphicsContextGLProxy::createFramebuffer() >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::CreateFramebuffer(), Messages::RemoteGraphicsContextGL::CreateFramebuffer::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+PlatformGLObject RemoteGraphicsContextGLProxy::createProgram() >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::CreateProgram(), Messages::RemoteGraphicsContextGL::CreateProgram::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+PlatformGLObject RemoteGraphicsContextGLProxy::createRenderbuffer() >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::CreateRenderbuffer(), Messages::RemoteGraphicsContextGL::CreateRenderbuffer::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+PlatformGLObject RemoteGraphicsContextGLProxy::createShader(GCGLenum arg0) >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::CreateShader(arg0), Messages::RemoteGraphicsContextGL::CreateShader::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+PlatformGLObject RemoteGraphicsContextGLProxy::createTexture() >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::CreateTexture(), Messages::RemoteGraphicsContextGL::CreateTexture::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::cullFace(GCGLenum mode) >+{ >+ send(Messages::RemoteGraphicsContextGL::CullFace(mode), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::deleteBuffer(PlatformGLObject arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::DeleteBuffer(arg0), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::deleteFramebuffer(PlatformGLObject arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::DeleteFramebuffer(arg0), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::deleteProgram(PlatformGLObject arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::DeleteProgram(arg0), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::deleteRenderbuffer(PlatformGLObject arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::DeleteRenderbuffer(arg0), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::deleteShader(PlatformGLObject arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::DeleteShader(arg0), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::deleteTexture(PlatformGLObject arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::DeleteTexture(arg0), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::depthFunc(GCGLenum func) >+{ >+ send(Messages::RemoteGraphicsContextGL::DepthFunc(func), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::depthMask(GCGLboolean flag) >+{ >+ send(Messages::RemoteGraphicsContextGL::DepthMask(static_cast<bool>(flag)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::depthRange(GCGLclampf zNear, GCGLclampf zFar) >+{ >+ send(Messages::RemoteGraphicsContextGL::DepthRange(zNear, zFar), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::detachShader(PlatformGLObject arg0, PlatformGLObject arg1) >+{ >+ send(Messages::RemoteGraphicsContextGL::DetachShader(arg0, arg1), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::disable(GCGLenum cap) >+{ >+ send(Messages::RemoteGraphicsContextGL::Disable(cap), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::disableVertexAttribArray(GCGLuint index) >+{ >+ send(Messages::RemoteGraphicsContextGL::DisableVertexAttribArray(index), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::drawArrays(GCGLenum mode, GCGLint first, GCGLsizei count) >+{ >+ send(Messages::RemoteGraphicsContextGL::DrawArrays(mode, first, count), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::drawElements(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLintptr offset) >+{ >+ send(Messages::RemoteGraphicsContextGL::DrawElements(mode, count, type, static_cast<uint64_t>(offset)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::enable(GCGLenum cap) >+{ >+ send(Messages::RemoteGraphicsContextGL::Enable(cap), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::enableVertexAttribArray(GCGLuint index) >+{ >+ send(Messages::RemoteGraphicsContextGL::EnableVertexAttribArray(index), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::finish() >+{ >+ send(Messages::RemoteGraphicsContextGL::Finish(), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::flush() >+{ >+ send(Messages::RemoteGraphicsContextGL::Flush(), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::framebufferRenderbuffer(GCGLenum target, GCGLenum attachment, GCGLenum renderbuffertarget, PlatformGLObject arg3) >+{ >+ send(Messages::RemoteGraphicsContextGL::FramebufferRenderbuffer(target, attachment, renderbuffertarget, arg3), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::framebufferTexture2D(GCGLenum target, GCGLenum attachment, GCGLenum textarget, PlatformGLObject arg3, GCGLint level) >+{ >+ send(Messages::RemoteGraphicsContextGL::FramebufferTexture2D(target, attachment, textarget, arg3, level), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::frontFace(GCGLenum mode) >+{ >+ send(Messages::RemoteGraphicsContextGL::FrontFace(mode), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::generateMipmap(GCGLenum target) >+{ >+ send(Messages::RemoteGraphicsContextGL::GenerateMipmap(target), m_graphicsContextGLIdentifier); >+} >+ >+bool RemoteGraphicsContextGLProxy::getActiveAttrib(PlatformGLObject program, GCGLuint index, ActiveInfo& arg2) >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetActiveAttrib(program, index), Messages::RemoteGraphicsContextGL::GetActiveAttrib::Reply(returnValue, arg2), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+bool RemoteGraphicsContextGLProxy::getActiveUniform(PlatformGLObject program, GCGLuint index, ActiveInfo& arg2) >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetActiveUniform(program, index), Messages::RemoteGraphicsContextGL::GetActiveUniform::Reply(returnValue, arg2), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+GCGLint RemoteGraphicsContextGLProxy::getAttribLocation(PlatformGLObject arg0, const String& name) >+{ >+ int32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetAttribLocation(arg0, name), Messages::RemoteGraphicsContextGL::GetAttribLocation::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+GCGLint RemoteGraphicsContextGLProxy::getBufferParameteri(GCGLenum target, GCGLenum pname) >+{ >+ int32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetBufferParameteri(target, pname), Messages::RemoteGraphicsContextGL::GetBufferParameteri::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+String RemoteGraphicsContextGLProxy::getString(GCGLenum name) >+{ >+ String returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetString(name), Messages::RemoteGraphicsContextGL::GetString::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::getFloatv(GCGLenum pname, GCGLSpan<GCGLfloat> value) >+{ >+ IPC::ArrayReference<float> valueReply; >+ auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::GetFloatv(pname, value.bufSize), Messages::RemoteGraphicsContextGL::GetFloatv::Reply(valueReply), m_graphicsContextGLIdentifier, 10_s); >+ if (sendResult) >+ memcpy(value.data, valueReply.data(), value.bufSize * sizeof(float)); >+ >+} >+ >+void RemoteGraphicsContextGLProxy::getIntegerv(GCGLenum pname, GCGLSpan<GCGLint> value) >+{ >+ IPC::ArrayReference<int32_t> valueReply; >+ auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::GetIntegerv(pname, value.bufSize), Messages::RemoteGraphicsContextGL::GetIntegerv::Reply(valueReply), m_graphicsContextGLIdentifier, 10_s); >+ if (sendResult) >+ memcpy(value.data, valueReply.data(), value.bufSize * sizeof(int32_t)); >+ >+} >+ >+GCGLint64 RemoteGraphicsContextGLProxy::getInteger64(GCGLenum pname) >+{ >+ int64_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetInteger64(pname), Messages::RemoteGraphicsContextGL::GetInteger64::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLint64>(returnValue); >+} >+ >+GCGLint64 RemoteGraphicsContextGLProxy::getInteger64i(GCGLenum pname, GCGLuint index) >+{ >+ int64_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetInteger64i(pname, index), Messages::RemoteGraphicsContextGL::GetInteger64i::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLint64>(returnValue); >+} >+ >+GCGLint RemoteGraphicsContextGLProxy::getProgrami(PlatformGLObject program, GCGLenum pname) >+{ >+ int32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetProgrami(program, pname), Messages::RemoteGraphicsContextGL::GetProgrami::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::getBooleanv(GCGLenum pname, GCGLSpan<GCGLboolean> value) >+{ >+ IPC::ArrayReference<bool> valueReply; >+ auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::GetBooleanv(pname, value.bufSize), Messages::RemoteGraphicsContextGL::GetBooleanv::Reply(valueReply), m_graphicsContextGLIdentifier, 10_s); >+ if (sendResult) >+ memcpy(value.data, valueReply.data(), value.bufSize * sizeof(bool)); >+ >+} >+ >+GCGLenum RemoteGraphicsContextGLProxy::getError() >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetError(), Messages::RemoteGraphicsContextGL::GetError::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+GCGLint RemoteGraphicsContextGLProxy::getFramebufferAttachmentParameteri(GCGLenum target, GCGLenum attachment, GCGLenum pname) >+{ >+ int32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetFramebufferAttachmentParameteri(target, attachment, pname), Messages::RemoteGraphicsContextGL::GetFramebufferAttachmentParameteri::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+String RemoteGraphicsContextGLProxy::getProgramInfoLog(PlatformGLObject arg0) >+{ >+ String returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetProgramInfoLog(arg0), Messages::RemoteGraphicsContextGL::GetProgramInfoLog::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+GCGLint RemoteGraphicsContextGLProxy::getRenderbufferParameteri(GCGLenum target, GCGLenum pname) >+{ >+ int32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetRenderbufferParameteri(target, pname), Messages::RemoteGraphicsContextGL::GetRenderbufferParameteri::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+GCGLint RemoteGraphicsContextGLProxy::getShaderi(PlatformGLObject arg0, GCGLenum pname) >+{ >+ int32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetShaderi(arg0, pname), Messages::RemoteGraphicsContextGL::GetShaderi::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+String RemoteGraphicsContextGLProxy::getShaderInfoLog(PlatformGLObject arg0) >+{ >+ String returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetShaderInfoLog(arg0), Messages::RemoteGraphicsContextGL::GetShaderInfoLog::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::getShaderPrecisionFormat(GCGLenum shaderType, GCGLenum precisionType, GCGLSpan<GCGLint, 2> range, GCGLint* precision) >+{ >+ IPC::ArrayReference<int32_t, 2> rangeReply; >+ int32_t precisionReply = { }; >+ auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::GetShaderPrecisionFormat(shaderType, precisionType), Messages::RemoteGraphicsContextGL::GetShaderPrecisionFormat::Reply(rangeReply, precisionReply), m_graphicsContextGLIdentifier, 10_s); >+ if (sendResult) { >+ memcpy(range.data, rangeReply.data(), range.bufSize * sizeof(int32_t)); >+ if (precision) >+ *precision = precisionReply; >+ } >+} >+ >+String RemoteGraphicsContextGLProxy::getShaderSource(PlatformGLObject arg0) >+{ >+ String returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetShaderSource(arg0), Messages::RemoteGraphicsContextGL::GetShaderSource::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+GCGLfloat RemoteGraphicsContextGLProxy::getTexParameterf(GCGLenum target, GCGLenum pname) >+{ >+ float returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetTexParameterf(target, pname), Messages::RemoteGraphicsContextGL::GetTexParameterf::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+GCGLint RemoteGraphicsContextGLProxy::getTexParameteri(GCGLenum target, GCGLenum pname) >+{ >+ int32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetTexParameteri(target, pname), Messages::RemoteGraphicsContextGL::GetTexParameteri::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::getUniformfv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLfloat> value) >+{ >+ IPC::ArrayReference<float> valueReply; >+ auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::GetUniformfv(program, location, value.bufSize), Messages::RemoteGraphicsContextGL::GetUniformfv::Reply(valueReply), m_graphicsContextGLIdentifier, 10_s); >+ if (sendResult) >+ memcpy(value.data, valueReply.data(), value.bufSize * sizeof(float)); >+ >+} >+ >+void RemoteGraphicsContextGLProxy::getUniformiv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLint> value) >+{ >+ IPC::ArrayReference<int32_t> valueReply; >+ auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::GetUniformiv(program, location, value.bufSize), Messages::RemoteGraphicsContextGL::GetUniformiv::Reply(valueReply), m_graphicsContextGLIdentifier, 10_s); >+ if (sendResult) >+ memcpy(value.data, valueReply.data(), value.bufSize * sizeof(int32_t)); >+ >+} >+ >+void RemoteGraphicsContextGLProxy::getUniformuiv(PlatformGLObject program, GCGLint location, GCGLSpan<GCGLuint> value) >+{ >+ IPC::ArrayReference<uint32_t> valueReply; >+ auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::GetUniformuiv(program, location, value.bufSize), Messages::RemoteGraphicsContextGL::GetUniformuiv::Reply(valueReply), m_graphicsContextGLIdentifier, 10_s); >+ if (sendResult) >+ memcpy(value.data, valueReply.data(), value.bufSize * sizeof(uint32_t)); >+ >+} >+ >+GCGLint RemoteGraphicsContextGLProxy::getUniformLocation(PlatformGLObject arg0, const String& name) >+{ >+ int32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetUniformLocation(arg0, name), Messages::RemoteGraphicsContextGL::GetUniformLocation::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+GCGLsizeiptr RemoteGraphicsContextGLProxy::getVertexAttribOffset(GCGLuint index, GCGLenum pname) >+{ >+ uint64_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetVertexAttribOffset(index, pname), Messages::RemoteGraphicsContextGL::GetVertexAttribOffset::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLsizeiptr>(returnValue); >+} >+ >+void RemoteGraphicsContextGLProxy::hint(GCGLenum target, GCGLenum mode) >+{ >+ send(Messages::RemoteGraphicsContextGL::Hint(target, mode), m_graphicsContextGLIdentifier); >+} >+ >+GCGLboolean RemoteGraphicsContextGLProxy::isBuffer(PlatformGLObject arg0) >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::IsBuffer(arg0), Messages::RemoteGraphicsContextGL::IsBuffer::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLboolean>(returnValue); >+} >+ >+GCGLboolean RemoteGraphicsContextGLProxy::isEnabled(GCGLenum cap) >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::IsEnabled(cap), Messages::RemoteGraphicsContextGL::IsEnabled::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLboolean>(returnValue); >+} >+ >+GCGLboolean RemoteGraphicsContextGLProxy::isFramebuffer(PlatformGLObject arg0) >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::IsFramebuffer(arg0), Messages::RemoteGraphicsContextGL::IsFramebuffer::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLboolean>(returnValue); >+} >+ >+GCGLboolean RemoteGraphicsContextGLProxy::isProgram(PlatformGLObject arg0) >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::IsProgram(arg0), Messages::RemoteGraphicsContextGL::IsProgram::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLboolean>(returnValue); >+} >+ >+GCGLboolean RemoteGraphicsContextGLProxy::isRenderbuffer(PlatformGLObject arg0) >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::IsRenderbuffer(arg0), Messages::RemoteGraphicsContextGL::IsRenderbuffer::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLboolean>(returnValue); >+} >+ >+GCGLboolean RemoteGraphicsContextGLProxy::isShader(PlatformGLObject arg0) >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::IsShader(arg0), Messages::RemoteGraphicsContextGL::IsShader::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLboolean>(returnValue); >+} >+ >+GCGLboolean RemoteGraphicsContextGLProxy::isTexture(PlatformGLObject arg0) >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::IsTexture(arg0), Messages::RemoteGraphicsContextGL::IsTexture::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLboolean>(returnValue); >+} >+ >+void RemoteGraphicsContextGLProxy::lineWidth(GCGLfloat arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::LineWidth(arg0), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::linkProgram(PlatformGLObject arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::LinkProgram(arg0), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::pixelStorei(GCGLenum pname, GCGLint param) >+{ >+ send(Messages::RemoteGraphicsContextGL::PixelStorei(pname, param), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::polygonOffset(GCGLfloat factor, GCGLfloat units) >+{ >+ send(Messages::RemoteGraphicsContextGL::PolygonOffset(factor, units), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::renderbufferStorage(GCGLenum target, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) >+{ >+ send(Messages::RemoteGraphicsContextGL::RenderbufferStorage(target, internalformat, width, height), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::sampleCoverage(GCGLclampf value, GCGLboolean invert) >+{ >+ send(Messages::RemoteGraphicsContextGL::SampleCoverage(value, static_cast<bool>(invert)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::scissor(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height) >+{ >+ send(Messages::RemoteGraphicsContextGL::Scissor(x, y, width, height), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::shaderSource(PlatformGLObject arg0, const String& arg1) >+{ >+ send(Messages::RemoteGraphicsContextGL::ShaderSource(arg0, arg1), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::stencilFunc(GCGLenum func, GCGLint ref, GCGLuint mask) >+{ >+ send(Messages::RemoteGraphicsContextGL::StencilFunc(func, ref, mask), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::stencilFuncSeparate(GCGLenum face, GCGLenum func, GCGLint ref, GCGLuint mask) >+{ >+ send(Messages::RemoteGraphicsContextGL::StencilFuncSeparate(face, func, ref, mask), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::stencilMask(GCGLuint mask) >+{ >+ send(Messages::RemoteGraphicsContextGL::StencilMask(mask), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::stencilMaskSeparate(GCGLenum face, GCGLuint mask) >+{ >+ send(Messages::RemoteGraphicsContextGL::StencilMaskSeparate(face, mask), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::stencilOp(GCGLenum fail, GCGLenum zfail, GCGLenum zpass) >+{ >+ send(Messages::RemoteGraphicsContextGL::StencilOp(fail, zfail, zpass), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::stencilOpSeparate(GCGLenum face, GCGLenum fail, GCGLenum zfail, GCGLenum zpass) >+{ >+ send(Messages::RemoteGraphicsContextGL::StencilOpSeparate(face, fail, zfail, zpass), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::texParameterf(GCGLenum target, GCGLenum pname, GCGLfloat param) >+{ >+ send(Messages::RemoteGraphicsContextGL::TexParameterf(target, pname, param), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::texParameteri(GCGLenum target, GCGLenum pname, GCGLint param) >+{ >+ send(Messages::RemoteGraphicsContextGL::TexParameteri(target, pname, param), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform1f(GCGLint location, GCGLfloat x) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform1f(location, x), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform1fv(GCGLint location, GCGLSpan<const GCGLfloat> v) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform1fv(location, IPC::ArrayReference<float>(reinterpret_cast<const float*>(v.data), v.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform1i(GCGLint location, GCGLint x) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform1i(location, x), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform1iv(GCGLint location, GCGLSpan<const GCGLint> v) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform1iv(location, IPC::ArrayReference<int32_t>(reinterpret_cast<const int32_t*>(v.data), v.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform2f(GCGLint location, GCGLfloat x, GCGLfloat y) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform2f(location, x, y), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform2fv(GCGLint location, GCGLSpan<const GCGLfloat> v) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform2fv(location, IPC::ArrayReference<float>(reinterpret_cast<const float*>(v.data), v.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform2i(GCGLint location, GCGLint x, GCGLint y) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform2i(location, x, y), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform2iv(GCGLint location, GCGLSpan<const GCGLint> v) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform2iv(location, IPC::ArrayReference<int32_t>(reinterpret_cast<const int32_t*>(v.data), v.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform3f(GCGLint location, GCGLfloat x, GCGLfloat y, GCGLfloat z) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform3f(location, x, y, z), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform3fv(GCGLint location, GCGLSpan<const GCGLfloat> v) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform3fv(location, IPC::ArrayReference<float>(reinterpret_cast<const float*>(v.data), v.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform3i(GCGLint location, GCGLint x, GCGLint y, GCGLint z) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform3i(location, x, y, z), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform3iv(GCGLint location, GCGLSpan<const GCGLint> v) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform3iv(location, IPC::ArrayReference<int32_t>(reinterpret_cast<const int32_t*>(v.data), v.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform4f(GCGLint location, GCGLfloat x, GCGLfloat y, GCGLfloat z, GCGLfloat w) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform4f(location, x, y, z, w), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform4fv(GCGLint location, GCGLSpan<const GCGLfloat> v) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform4fv(location, IPC::ArrayReference<float>(reinterpret_cast<const float*>(v.data), v.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform4i(GCGLint location, GCGLint x, GCGLint y, GCGLint z, GCGLint w) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform4i(location, x, y, z, w), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform4iv(GCGLint location, GCGLSpan<const GCGLint> v) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform4iv(location, IPC::ArrayReference<int32_t>(reinterpret_cast<const int32_t*>(v.data), v.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniformMatrix2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> value) >+{ >+ send(Messages::RemoteGraphicsContextGL::UniformMatrix2fv(location, static_cast<bool>(transpose), IPC::ArrayReference<float>(reinterpret_cast<const float*>(value.data), value.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniformMatrix3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> value) >+{ >+ send(Messages::RemoteGraphicsContextGL::UniformMatrix3fv(location, static_cast<bool>(transpose), IPC::ArrayReference<float>(reinterpret_cast<const float*>(value.data), value.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniformMatrix4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> value) >+{ >+ send(Messages::RemoteGraphicsContextGL::UniformMatrix4fv(location, static_cast<bool>(transpose), IPC::ArrayReference<float>(reinterpret_cast<const float*>(value.data), value.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::useProgram(PlatformGLObject arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::UseProgram(arg0), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::validateProgram(PlatformGLObject arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::ValidateProgram(arg0), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttrib1f(GCGLuint index, GCGLfloat x) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttrib1f(index, x), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttrib1fv(GCGLuint index, GCGLSpan<const GCGLfloat, 1> values) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttrib1fv(index, IPC::ArrayReference<float, 1>(reinterpret_cast<const float*>(values.data), values.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttrib2f(GCGLuint index, GCGLfloat x, GCGLfloat y) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttrib2f(index, x, y), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttrib2fv(GCGLuint index, GCGLSpan<const GCGLfloat, 2> values) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttrib2fv(index, IPC::ArrayReference<float, 2>(reinterpret_cast<const float*>(values.data), values.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttrib3f(GCGLuint index, GCGLfloat x, GCGLfloat y, GCGLfloat z) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttrib3f(index, x, y, z), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttrib3fv(GCGLuint index, GCGLSpan<const GCGLfloat, 3> values) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttrib3fv(index, IPC::ArrayReference<float, 3>(reinterpret_cast<const float*>(values.data), values.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttrib4f(GCGLuint index, GCGLfloat x, GCGLfloat y, GCGLfloat z, GCGLfloat w) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttrib4f(index, x, y, z, w), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttrib4fv(GCGLuint index, GCGLSpan<const GCGLfloat, 4> values) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttrib4fv(index, IPC::ArrayReference<float, 4>(reinterpret_cast<const float*>(values.data), values.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttribPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLboolean normalized, GCGLsizei stride, GCGLintptr offset) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttribPointer(index, size, type, static_cast<bool>(normalized), stride, static_cast<uint64_t>(offset)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::viewport(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height) >+{ >+ send(Messages::RemoteGraphicsContextGL::Viewport(x, y, width, height), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::bufferData(GCGLenum target, GCGLsizeiptr arg1, GCGLenum usage) >+{ >+ send(Messages::RemoteGraphicsContextGL::BufferData0(target, static_cast<uint64_t>(arg1), usage), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::bufferData(GCGLenum target, GCGLSpan<const GCGLvoid> data, GCGLenum usage) >+{ >+ send(Messages::RemoteGraphicsContextGL::BufferData1(target, IPC::ArrayReference<uint8_t>(reinterpret_cast<const uint8_t*>(data.data), data.bufSize), usage), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::bufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<const GCGLvoid> data) >+{ >+ send(Messages::RemoteGraphicsContextGL::BufferSubData(target, static_cast<uint64_t>(offset), IPC::ArrayReference<uint8_t>(reinterpret_cast<const uint8_t*>(data.data), data.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<GCGLvoid> data) >+{ >+ IPC::ArrayReference<uint8_t> dataReply; >+ auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::ReadnPixels0(x, y, width, height, format, type, data.bufSize), Messages::RemoteGraphicsContextGL::ReadnPixels0::Reply(dataReply), m_graphicsContextGLIdentifier, 10_s); >+ if (sendResult) >+ memcpy(data.data, dataReply.data(), data.bufSize * sizeof(uint8_t)); >+ >+} >+ >+void RemoteGraphicsContextGLProxy::readnPixels(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset) >+{ >+ send(Messages::RemoteGraphicsContextGL::ReadnPixels1(x, y, width, height, format, type, static_cast<uint64_t>(offset)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::texImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels) >+{ >+ send(Messages::RemoteGraphicsContextGL::TexImage2D0(target, level, internalformat, width, height, border, format, type, IPC::ArrayReference<uint8_t>(reinterpret_cast<const uint8_t*>(pixels.data), pixels.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::texImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr offset) >+{ >+ send(Messages::RemoteGraphicsContextGL::TexImage2D1(target, level, internalformat, width, height, border, format, type, static_cast<uint64_t>(offset)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels) >+{ >+ send(Messages::RemoteGraphicsContextGL::TexSubImage2D0(target, level, xoffset, yoffset, width, height, format, type, IPC::ArrayReference<uint8_t>(reinterpret_cast<const uint8_t*>(pixels.data), pixels.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::texSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLintptr offset) >+{ >+ send(Messages::RemoteGraphicsContextGL::TexSubImage2D1(target, level, xoffset, yoffset, width, height, format, type, static_cast<uint64_t>(offset)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) >+{ >+ send(Messages::RemoteGraphicsContextGL::CompressedTexImage2D0(target, level, internalformat, width, height, border, imageSize, IPC::ArrayReference<uint8_t>(reinterpret_cast<const uint8_t*>(data.data), data.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::compressedTexImage2D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLint border, GCGLsizei imageSize, GCGLintptr offset) >+{ >+ send(Messages::RemoteGraphicsContextGL::CompressedTexImage2D1(target, level, internalformat, width, height, border, imageSize, static_cast<uint64_t>(offset)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::compressedTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) >+{ >+ send(Messages::RemoteGraphicsContextGL::CompressedTexSubImage2D0(target, level, xoffset, yoffset, width, height, format, imageSize, IPC::ArrayReference<uint8_t>(reinterpret_cast<const uint8_t*>(data.data), data.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::compressedTexSubImage2D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLsizei imageSize, GCGLintptr offset) >+{ >+ send(Messages::RemoteGraphicsContextGL::CompressedTexSubImage2D1(target, level, xoffset, yoffset, width, height, format, imageSize, static_cast<uint64_t>(offset)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::drawArraysInstanced(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) >+{ >+ send(Messages::RemoteGraphicsContextGL::DrawArraysInstanced(mode, first, count, primcount), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::drawElementsInstanced(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLintptr offset, GCGLsizei primcount) >+{ >+ send(Messages::RemoteGraphicsContextGL::DrawElementsInstanced(mode, count, type, static_cast<uint64_t>(offset), primcount), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttribDivisor(GCGLuint index, GCGLuint divisor) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttribDivisor(index, divisor), m_graphicsContextGLIdentifier); >+} >+ >+PlatformGLObject RemoteGraphicsContextGLProxy::createVertexArray() >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::CreateVertexArray(), Messages::RemoteGraphicsContextGL::CreateVertexArray::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::deleteVertexArray(PlatformGLObject arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::DeleteVertexArray(arg0), m_graphicsContextGLIdentifier); >+} >+ >+GCGLboolean RemoteGraphicsContextGLProxy::isVertexArray(PlatformGLObject arg0) >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::IsVertexArray(arg0), Messages::RemoteGraphicsContextGL::IsVertexArray::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLboolean>(returnValue); >+} >+ >+void RemoteGraphicsContextGLProxy::bindVertexArray(PlatformGLObject arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::BindVertexArray(arg0), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLintptr readOffset, GCGLintptr writeOffset, GCGLsizeiptr arg4) >+{ >+ send(Messages::RemoteGraphicsContextGL::CopyBufferSubData(readTarget, writeTarget, static_cast<uint64_t>(readOffset), static_cast<uint64_t>(writeOffset), static_cast<uint64_t>(arg4)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::getBufferSubData(GCGLenum target, GCGLintptr offset, GCGLSpan<GCGLvoid> data) >+{ >+ IPC::ArrayReference<uint8_t> dataReply; >+ auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::GetBufferSubData(target, static_cast<uint64_t>(offset), data.bufSize), Messages::RemoteGraphicsContextGL::GetBufferSubData::Reply(dataReply), m_graphicsContextGLIdentifier, 10_s); >+ if (sendResult) >+ memcpy(data.data, dataReply.data(), data.bufSize * sizeof(uint8_t)); >+ >+} >+ >+void RemoteGraphicsContextGLProxy::blitFramebuffer(GCGLint srcX0, GCGLint srcY0, GCGLint srcX1, GCGLint srcY1, GCGLint dstX0, GCGLint dstY0, GCGLint dstX1, GCGLint dstY1, GCGLbitfield mask, GCGLenum filter) >+{ >+ send(Messages::RemoteGraphicsContextGL::BlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::framebufferTextureLayer(GCGLenum target, GCGLenum attachment, PlatformGLObject texture, GCGLint level, GCGLint layer) >+{ >+ send(Messages::RemoteGraphicsContextGL::FramebufferTextureLayer(target, attachment, texture, level, layer), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::invalidateFramebuffer(GCGLenum target, GCGLSpan<const GCGLenum> attachments) >+{ >+ send(Messages::RemoteGraphicsContextGL::InvalidateFramebuffer(target, IPC::ArrayReference<uint32_t>(reinterpret_cast<const uint32_t*>(attachments.data), attachments.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::invalidateSubFramebuffer(GCGLenum target, GCGLSpan<const GCGLenum> attachments, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height) >+{ >+ send(Messages::RemoteGraphicsContextGL::InvalidateSubFramebuffer(target, IPC::ArrayReference<uint32_t>(reinterpret_cast<const uint32_t*>(attachments.data), attachments.bufSize), x, y, width, height), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::readBuffer(GCGLenum src) >+{ >+ send(Messages::RemoteGraphicsContextGL::ReadBuffer(src), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::renderbufferStorageMultisample(GCGLenum target, GCGLsizei samples, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) >+{ >+ send(Messages::RemoteGraphicsContextGL::RenderbufferStorageMultisample(target, samples, internalformat, width, height), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::texStorage2D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) >+{ >+ send(Messages::RemoteGraphicsContextGL::TexStorage2D(target, levels, internalformat, width, height), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::texStorage3D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth) >+{ >+ send(Messages::RemoteGraphicsContextGL::TexStorage3D(target, levels, internalformat, width, height, depth), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::texImage3D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels) >+{ >+ send(Messages::RemoteGraphicsContextGL::TexImage3D0(target, level, internalformat, width, height, depth, border, format, type, IPC::ArrayReference<uint8_t>(reinterpret_cast<const uint8_t*>(pixels.data), pixels.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::texImage3D(GCGLenum target, GCGLint level, GCGLint internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLenum format, GCGLenum type, GCGLintptr offset) >+{ >+ send(Messages::RemoteGraphicsContextGL::TexImage3D1(target, level, internalformat, width, height, depth, border, format, type, static_cast<uint64_t>(offset)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::texSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLenum type, GCGLSpan<const GCGLvoid> pixels) >+{ >+ send(Messages::RemoteGraphicsContextGL::TexSubImage3D0(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, IPC::ArrayReference<uint8_t>(reinterpret_cast<const uint8_t*>(pixels.data), pixels.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::texSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLenum type, GCGLintptr offset) >+{ >+ send(Messages::RemoteGraphicsContextGL::TexSubImage3D1(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, static_cast<uint64_t>(offset)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::copyTexSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height) >+{ >+ send(Messages::RemoteGraphicsContextGL::CopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::compressedTexImage3D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) >+{ >+ send(Messages::RemoteGraphicsContextGL::CompressedTexImage3D0(target, level, internalformat, width, height, depth, border, imageSize, IPC::ArrayReference<uint8_t>(reinterpret_cast<const uint8_t*>(data.data), data.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::compressedTexImage3D(GCGLenum target, GCGLint level, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLint border, GCGLsizei imageSize, GCGLintptr offset) >+{ >+ send(Messages::RemoteGraphicsContextGL::CompressedTexImage3D1(target, level, internalformat, width, height, depth, border, imageSize, static_cast<uint64_t>(offset)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::compressedTexSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLsizei imageSize, GCGLSpan<const GCGLvoid> data) >+{ >+ send(Messages::RemoteGraphicsContextGL::CompressedTexSubImage3D0(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, IPC::ArrayReference<uint8_t>(reinterpret_cast<const uint8_t*>(data.data), data.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::compressedTexSubImage3D(GCGLenum target, GCGLint level, GCGLint xoffset, GCGLint yoffset, GCGLint zoffset, GCGLsizei width, GCGLsizei height, GCGLsizei depth, GCGLenum format, GCGLsizei imageSize, GCGLintptr offset) >+{ >+ send(Messages::RemoteGraphicsContextGL::CompressedTexSubImage3D1(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, static_cast<uint64_t>(offset)), m_graphicsContextGLIdentifier); >+} >+ >+GCGLint RemoteGraphicsContextGLProxy::getFragDataLocation(PlatformGLObject program, const String& name) >+{ >+ int32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetFragDataLocation(program, name), Messages::RemoteGraphicsContextGL::GetFragDataLocation::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::uniform1ui(GCGLint location, GCGLuint v0) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform1ui(location, v0), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform2ui(GCGLint location, GCGLuint v0, GCGLuint v1) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform2ui(location, v0, v1), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform3ui(GCGLint location, GCGLuint v0, GCGLuint v1, GCGLuint v2) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform3ui(location, v0, v1, v2), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform4ui(GCGLint location, GCGLuint v0, GCGLuint v1, GCGLuint v2, GCGLuint v3) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform4ui(location, v0, v1, v2, v3), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform1uiv(GCGLint location, GCGLSpan<const GCGLuint> data) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform1uiv(location, IPC::ArrayReference<uint32_t>(reinterpret_cast<const uint32_t*>(data.data), data.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform2uiv(GCGLint location, GCGLSpan<const GCGLuint> data) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform2uiv(location, IPC::ArrayReference<uint32_t>(reinterpret_cast<const uint32_t*>(data.data), data.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform3uiv(GCGLint location, GCGLSpan<const GCGLuint> data) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform3uiv(location, IPC::ArrayReference<uint32_t>(reinterpret_cast<const uint32_t*>(data.data), data.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniform4uiv(GCGLint location, GCGLSpan<const GCGLuint> data) >+{ >+ send(Messages::RemoteGraphicsContextGL::Uniform4uiv(location, IPC::ArrayReference<uint32_t>(reinterpret_cast<const uint32_t*>(data.data), data.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniformMatrix2x3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) >+{ >+ send(Messages::RemoteGraphicsContextGL::UniformMatrix2x3fv(location, static_cast<bool>(transpose), IPC::ArrayReference<float>(reinterpret_cast<const float*>(data.data), data.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniformMatrix3x2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) >+{ >+ send(Messages::RemoteGraphicsContextGL::UniformMatrix3x2fv(location, static_cast<bool>(transpose), IPC::ArrayReference<float>(reinterpret_cast<const float*>(data.data), data.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniformMatrix2x4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) >+{ >+ send(Messages::RemoteGraphicsContextGL::UniformMatrix2x4fv(location, static_cast<bool>(transpose), IPC::ArrayReference<float>(reinterpret_cast<const float*>(data.data), data.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniformMatrix4x2fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) >+{ >+ send(Messages::RemoteGraphicsContextGL::UniformMatrix4x2fv(location, static_cast<bool>(transpose), IPC::ArrayReference<float>(reinterpret_cast<const float*>(data.data), data.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniformMatrix3x4fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) >+{ >+ send(Messages::RemoteGraphicsContextGL::UniformMatrix3x4fv(location, static_cast<bool>(transpose), IPC::ArrayReference<float>(reinterpret_cast<const float*>(data.data), data.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::uniformMatrix4x3fv(GCGLint location, GCGLboolean transpose, GCGLSpan<const GCGLfloat> data) >+{ >+ send(Messages::RemoteGraphicsContextGL::UniformMatrix4x3fv(location, static_cast<bool>(transpose), IPC::ArrayReference<float>(reinterpret_cast<const float*>(data.data), data.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttribI4i(GCGLuint index, GCGLint x, GCGLint y, GCGLint z, GCGLint w) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttribI4i(index, x, y, z, w), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttribI4iv(GCGLuint index, GCGLSpan<const GCGLint, 4> values) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttribI4iv(index, IPC::ArrayReference<int32_t, 4>(reinterpret_cast<const int32_t*>(values.data), values.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttribI4ui(GCGLuint index, GCGLuint x, GCGLuint y, GCGLuint z, GCGLuint w) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttribI4ui(index, x, y, z, w), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttribI4uiv(GCGLuint index, GCGLSpan<const GCGLuint, 4> values) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttribI4uiv(index, IPC::ArrayReference<uint32_t, 4>(reinterpret_cast<const uint32_t*>(values.data), values.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttribIPointer(GCGLuint index, GCGLint size, GCGLenum type, GCGLsizei stride, GCGLintptr offset) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttribIPointer(index, size, type, stride, static_cast<uint64_t>(offset)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::drawRangeElements(GCGLenum mode, GCGLuint start, GCGLuint end, GCGLsizei count, GCGLenum type, GCGLintptr offset) >+{ >+ send(Messages::RemoteGraphicsContextGL::DrawRangeElements(mode, start, end, count, type, static_cast<uint64_t>(offset)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::drawBuffers(GCGLSpan<const GCGLenum> bufs) >+{ >+ send(Messages::RemoteGraphicsContextGL::DrawBuffers(IPC::ArrayReference<uint32_t>(reinterpret_cast<const uint32_t*>(bufs.data), bufs.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::clearBufferiv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLint> values) >+{ >+ send(Messages::RemoteGraphicsContextGL::ClearBufferiv(buffer, drawbuffer, IPC::ArrayReference<int32_t>(reinterpret_cast<const int32_t*>(values.data), values.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::clearBufferuiv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLuint> values) >+{ >+ send(Messages::RemoteGraphicsContextGL::ClearBufferuiv(buffer, drawbuffer, IPC::ArrayReference<uint32_t>(reinterpret_cast<const uint32_t*>(values.data), values.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::clearBufferfv(GCGLenum buffer, GCGLint drawbuffer, GCGLSpan<const GCGLfloat> values) >+{ >+ send(Messages::RemoteGraphicsContextGL::ClearBufferfv(buffer, drawbuffer, IPC::ArrayReference<float>(reinterpret_cast<const float*>(values.data), values.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::clearBufferfi(GCGLenum buffer, GCGLint drawbuffer, GCGLfloat depth, GCGLint stencil) >+{ >+ send(Messages::RemoteGraphicsContextGL::ClearBufferfi(buffer, drawbuffer, depth, stencil), m_graphicsContextGLIdentifier); >+} >+ >+PlatformGLObject RemoteGraphicsContextGLProxy::createQuery() >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::CreateQuery(), Messages::RemoteGraphicsContextGL::CreateQuery::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::deleteQuery(PlatformGLObject query) >+{ >+ send(Messages::RemoteGraphicsContextGL::DeleteQuery(query), m_graphicsContextGLIdentifier); >+} >+ >+GCGLboolean RemoteGraphicsContextGLProxy::isQuery(PlatformGLObject query) >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::IsQuery(query), Messages::RemoteGraphicsContextGL::IsQuery::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLboolean>(returnValue); >+} >+ >+void RemoteGraphicsContextGLProxy::beginQuery(GCGLenum target, PlatformGLObject query) >+{ >+ send(Messages::RemoteGraphicsContextGL::BeginQuery(target, query), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::endQuery(GCGLenum target) >+{ >+ send(Messages::RemoteGraphicsContextGL::EndQuery(target), m_graphicsContextGLIdentifier); >+} >+ >+PlatformGLObject RemoteGraphicsContextGLProxy::getQuery(GCGLenum target, GCGLenum pname) >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetQuery(target, pname), Messages::RemoteGraphicsContextGL::GetQuery::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+GCGLuint RemoteGraphicsContextGLProxy::getQueryObjectui(PlatformGLObject query, GCGLenum pname) >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetQueryObjectui(query, pname), Messages::RemoteGraphicsContextGL::GetQueryObjectui::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+PlatformGLObject RemoteGraphicsContextGLProxy::createSampler() >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::CreateSampler(), Messages::RemoteGraphicsContextGL::CreateSampler::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::deleteSampler(PlatformGLObject sampler) >+{ >+ send(Messages::RemoteGraphicsContextGL::DeleteSampler(sampler), m_graphicsContextGLIdentifier); >+} >+ >+GCGLboolean RemoteGraphicsContextGLProxy::isSampler(PlatformGLObject sampler) >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::IsSampler(sampler), Messages::RemoteGraphicsContextGL::IsSampler::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLboolean>(returnValue); >+} >+ >+void RemoteGraphicsContextGLProxy::bindSampler(GCGLuint unit, PlatformGLObject sampler) >+{ >+ send(Messages::RemoteGraphicsContextGL::BindSampler(unit, sampler), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::samplerParameteri(PlatformGLObject sampler, GCGLenum pname, GCGLint param) >+{ >+ send(Messages::RemoteGraphicsContextGL::SamplerParameteri(sampler, pname, param), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::samplerParameterf(PlatformGLObject sampler, GCGLenum pname, GCGLfloat param) >+{ >+ send(Messages::RemoteGraphicsContextGL::SamplerParameterf(sampler, pname, param), m_graphicsContextGLIdentifier); >+} >+ >+GCGLfloat RemoteGraphicsContextGLProxy::getSamplerParameterf(PlatformGLObject sampler, GCGLenum pname) >+{ >+ float returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetSamplerParameterf(sampler, pname), Messages::RemoteGraphicsContextGL::GetSamplerParameterf::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+GCGLint RemoteGraphicsContextGLProxy::getSamplerParameteri(PlatformGLObject sampler, GCGLenum pname) >+{ >+ int32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetSamplerParameteri(sampler, pname), Messages::RemoteGraphicsContextGL::GetSamplerParameteri::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+GCGLsync RemoteGraphicsContextGLProxy::fenceSync(GCGLenum condition, GCGLbitfield flags) >+{ >+ uint64_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::FenceSync(condition, flags), Messages::RemoteGraphicsContextGL::FenceSync::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return reinterpret_cast<GCGLsync>(static_cast<intptr_t>(returnValue)); >+} >+ >+GCGLboolean RemoteGraphicsContextGLProxy::isSync(GCGLsync arg0) >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::IsSync(static_cast<uint64_t>(reinterpret_cast<intptr_t>(arg0))), Messages::RemoteGraphicsContextGL::IsSync::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLboolean>(returnValue); >+} >+ >+void RemoteGraphicsContextGLProxy::deleteSync(GCGLsync arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::DeleteSync(static_cast<uint64_t>(reinterpret_cast<intptr_t>(arg0))), m_graphicsContextGLIdentifier); >+} >+ >+GCGLenum RemoteGraphicsContextGLProxy::clientWaitSync(GCGLsync arg0, GCGLbitfield flags, GCGLuint64 timeout) >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::ClientWaitSync(static_cast<uint64_t>(reinterpret_cast<intptr_t>(arg0)), flags, static_cast<uint64_t>(timeout)), Messages::RemoteGraphicsContextGL::ClientWaitSync::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::waitSync(GCGLsync arg0, GCGLbitfield flags, GCGLint64 timeout) >+{ >+ send(Messages::RemoteGraphicsContextGL::WaitSync(static_cast<uint64_t>(reinterpret_cast<intptr_t>(arg0)), flags, static_cast<int64_t>(timeout)), m_graphicsContextGLIdentifier); >+} >+ >+GCGLint RemoteGraphicsContextGLProxy::getSynci(GCGLsync arg0, GCGLenum pname) >+{ >+ int32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetSynci(static_cast<uint64_t>(reinterpret_cast<intptr_t>(arg0)), pname), Messages::RemoteGraphicsContextGL::GetSynci::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+PlatformGLObject RemoteGraphicsContextGLProxy::createTransformFeedback() >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::CreateTransformFeedback(), Messages::RemoteGraphicsContextGL::CreateTransformFeedback::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::deleteTransformFeedback(PlatformGLObject id) >+{ >+ send(Messages::RemoteGraphicsContextGL::DeleteTransformFeedback(id), m_graphicsContextGLIdentifier); >+} >+ >+GCGLboolean RemoteGraphicsContextGLProxy::isTransformFeedback(PlatformGLObject id) >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::IsTransformFeedback(id), Messages::RemoteGraphicsContextGL::IsTransformFeedback::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLboolean>(returnValue); >+} >+ >+void RemoteGraphicsContextGLProxy::bindTransformFeedback(GCGLenum target, PlatformGLObject id) >+{ >+ send(Messages::RemoteGraphicsContextGL::BindTransformFeedback(target, id), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::beginTransformFeedback(GCGLenum primitiveMode) >+{ >+ send(Messages::RemoteGraphicsContextGL::BeginTransformFeedback(primitiveMode), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::endTransformFeedback() >+{ >+ send(Messages::RemoteGraphicsContextGL::EndTransformFeedback(), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::transformFeedbackVaryings(PlatformGLObject program, const Vector<String>& varyings, GCGLenum bufferMode) >+{ >+ send(Messages::RemoteGraphicsContextGL::TransformFeedbackVaryings(program, varyings, bufferMode), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::getTransformFeedbackVarying(PlatformGLObject program, GCGLuint index, ActiveInfo& arg2) >+{ >+ sendSync(Messages::RemoteGraphicsContextGL::GetTransformFeedbackVarying(program, index), Messages::RemoteGraphicsContextGL::GetTransformFeedbackVarying::Reply(arg2), m_graphicsContextGLIdentifier, 10_s); >+} >+ >+void RemoteGraphicsContextGLProxy::pauseTransformFeedback() >+{ >+ send(Messages::RemoteGraphicsContextGL::PauseTransformFeedback(), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::resumeTransformFeedback() >+{ >+ send(Messages::RemoteGraphicsContextGL::ResumeTransformFeedback(), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::bindBufferBase(GCGLenum target, GCGLuint index, PlatformGLObject buffer) >+{ >+ send(Messages::RemoteGraphicsContextGL::BindBufferBase(target, index, buffer), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::bindBufferRange(GCGLenum target, GCGLuint index, PlatformGLObject buffer, GCGLintptr offset, GCGLsizeiptr arg4) >+{ >+ send(Messages::RemoteGraphicsContextGL::BindBufferRange(target, index, buffer, static_cast<uint64_t>(offset), static_cast<uint64_t>(arg4)), m_graphicsContextGLIdentifier); >+} >+ >+Vector<GCGLuint> RemoteGraphicsContextGLProxy::getUniformIndices(PlatformGLObject program, const Vector<String>& uniformNames) >+{ >+ Vector<uint32_t> returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetUniformIndices(program, uniformNames), Messages::RemoteGraphicsContextGL::GetUniformIndices::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+Vector<GCGLint> RemoteGraphicsContextGLProxy::getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname) >+{ >+ Vector<int32_t> returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetActiveUniforms(program, uniformIndices, pname), Messages::RemoteGraphicsContextGL::GetActiveUniforms::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+GCGLuint RemoteGraphicsContextGLProxy::getUniformBlockIndex(PlatformGLObject program, const String& uniformBlockName) >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetUniformBlockIndex(program, uniformBlockName), Messages::RemoteGraphicsContextGL::GetUniformBlockIndex::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+String RemoteGraphicsContextGLProxy::getActiveUniformBlockName(PlatformGLObject program, GCGLuint uniformBlockIndex) >+{ >+ String returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetActiveUniformBlockName(program, uniformBlockIndex), Messages::RemoteGraphicsContextGL::GetActiveUniformBlockName::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::uniformBlockBinding(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLuint uniformBlockBinding) >+{ >+ send(Messages::RemoteGraphicsContextGL::UniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::getActiveUniformBlockiv(GCGLuint program, GCGLuint uniformBlockIndex, GCGLenum pname, GCGLSpan<GCGLint> params) >+{ >+ IPC::ArrayReference<int32_t> paramsReply; >+ auto sendResult = sendSync(Messages::RemoteGraphicsContextGL::GetActiveUniformBlockiv(program, uniformBlockIndex, pname, params.bufSize), Messages::RemoteGraphicsContextGL::GetActiveUniformBlockiv::Reply(paramsReply), m_graphicsContextGLIdentifier, 10_s); >+ if (sendResult) >+ memcpy(params.data, paramsReply.data(), params.bufSize * sizeof(int32_t)); >+ >+} >+ >+GCGLint RemoteGraphicsContextGLProxy::getGraphicsResetStatusARB() >+{ >+ int32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetGraphicsResetStatusARB(), Messages::RemoteGraphicsContextGL::GetGraphicsResetStatusARB::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::blitFramebufferANGLE(GCGLint srcX0, GCGLint srcY0, GCGLint srcX1, GCGLint srcY1, GCGLint dstX0, GCGLint dstY0, GCGLint dstX1, GCGLint dstY1, GCGLbitfield mask, GCGLenum filter) >+{ >+ send(Messages::RemoteGraphicsContextGL::BlitFramebufferANGLE(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::renderbufferStorageMultisampleANGLE(GCGLenum target, GCGLsizei samples, GCGLenum internalformat, GCGLsizei width, GCGLsizei height) >+{ >+ send(Messages::RemoteGraphicsContextGL::RenderbufferStorageMultisampleANGLE(target, samples, internalformat, width, height), m_graphicsContextGLIdentifier); >+} >+ >+PlatformGLObject RemoteGraphicsContextGLProxy::createVertexArrayOES() >+{ >+ uint32_t returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::CreateVertexArrayOES(), Messages::RemoteGraphicsContextGL::CreateVertexArrayOES::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::deleteVertexArrayOES(PlatformGLObject arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::DeleteVertexArrayOES(arg0), m_graphicsContextGLIdentifier); >+} >+ >+GCGLboolean RemoteGraphicsContextGLProxy::isVertexArrayOES(PlatformGLObject arg0) >+{ >+ bool returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::IsVertexArrayOES(arg0), Messages::RemoteGraphicsContextGL::IsVertexArrayOES::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return static_cast<GCGLboolean>(returnValue); >+} >+ >+void RemoteGraphicsContextGLProxy::bindVertexArrayOES(PlatformGLObject arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::BindVertexArrayOES(arg0), m_graphicsContextGLIdentifier); >+} >+ >+String RemoteGraphicsContextGLProxy::getTranslatedShaderSourceANGLE(PlatformGLObject arg0) >+{ >+ String returnValue = { }; >+ sendSync(Messages::RemoteGraphicsContextGL::GetTranslatedShaderSourceANGLE(arg0), Messages::RemoteGraphicsContextGL::GetTranslatedShaderSourceANGLE::Reply(returnValue), m_graphicsContextGLIdentifier, 10_s); >+ return returnValue; >+} >+ >+void RemoteGraphicsContextGLProxy::insertEventMarkerEXT(const String& arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::InsertEventMarkerEXT(arg0), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::pushGroupMarkerEXT(const String& arg0) >+{ >+ send(Messages::RemoteGraphicsContextGL::PushGroupMarkerEXT(arg0), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::popGroupMarkerEXT() >+{ >+ send(Messages::RemoteGraphicsContextGL::PopGroupMarkerEXT(), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::drawBuffersEXT(GCGLSpan<const GCGLenum> bufs) >+{ >+ send(Messages::RemoteGraphicsContextGL::DrawBuffersEXT(IPC::ArrayReference<uint32_t>(reinterpret_cast<const uint32_t*>(bufs.data), bufs.bufSize)), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::drawArraysInstancedANGLE(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount) >+{ >+ send(Messages::RemoteGraphicsContextGL::DrawArraysInstancedANGLE(mode, first, count, primcount), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::drawElementsInstancedANGLE(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLvoidptr offset, GCGLsizei primcount) >+{ >+ send(Messages::RemoteGraphicsContextGL::DrawElementsInstancedANGLE(mode, count, type, static_cast<uint64_t>(offset), primcount), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::vertexAttribDivisorANGLE(GCGLuint index, GCGLuint divisor) >+{ >+ send(Messages::RemoteGraphicsContextGL::VertexAttribDivisorANGLE(index, divisor), m_graphicsContextGLIdentifier); >+} >+ >+void RemoteGraphicsContextGLProxy::getInternalformativ(GCGLenum target, GCGLenum internalformat, GCGLenum pname, GCGLsizei bufSize, GCGLint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::readPixelsRobustANGLE(GCGLint x, GCGLint y, GCGLsizei width, GCGLsizei height, GCGLenum format, GCGLenum type, GCGLsizei bufSize, GCGLsizei* length, GCGLsizei* columns, GCGLsizei* rows, GCGLvoid* pixels) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::texParameterfvRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, const GCGLfloat* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::texParameterivRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, const GCGLint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getQueryivRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getQueryObjectuivRobustANGLE(GCGLuint id, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLuint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getBufferPointervRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLvoid** params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getInternalformativRobustANGLE(GCGLenum target, GCGLenum internalformat, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getVertexAttribIivRobustANGLE(GCGLuint index, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getVertexAttribIuivRobustANGLE(GCGLuint index, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLuint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getUniformuivRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei* length, GCGLuint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getBufferParameteri64vRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint64* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::samplerParameterivRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, const GCGLint* param) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::samplerParameterfvRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, const GCGLfloat* param) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getSamplerParameterivRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getSamplerParameterfvRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLfloat* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getFramebufferParameterivRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getProgramInterfaceivRobustANGLE(GCGLuint program, GCGLenum programInterface, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getBooleani_vRobustANGLE(GCGLenum target, GCGLuint index, GCGLsizei bufSize, GCGLsizei* length, GCGLboolean* data) // NOLINT >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getMultisamplefvRobustANGLE(GCGLenum pname, GCGLuint index, GCGLsizei bufSize, GCGLsizei* length, GCGLfloat* val) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getTexLevelParameterivRobustANGLE(GCGLenum target, GCGLint level, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getTexLevelParameterfvRobustANGLE(GCGLenum target, GCGLint level, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLfloat* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getPointervRobustANGLERobustANGLE(GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLvoid** params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getnUniformfvRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei* length, GCGLfloat* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getnUniformivRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getnUniformuivRobustANGLE(GCGLuint program, GCGLint location, GCGLsizei bufSize, GCGLsizei* length, GCGLuint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::texParameterIivRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, const GCGLint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::texParameterIuivRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, const GCGLuint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getTexParameterIivRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getTexParameterIuivRobustANGLE(GCGLenum target, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLuint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::samplerParameterIivRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, const GCGLint* param) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::samplerParameterIuivRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, const GCGLuint* param) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getSamplerParameterIivRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getSamplerParameterIuivRobustANGLE(GCGLuint sampler, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLuint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getQueryObjectivRobustANGLE(GCGLuint id, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getQueryObjecti64vRobustANGLE(GCGLuint id, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLint64* params) >+{ >+ notImplemented(); >+} >+ >+void RemoteGraphicsContextGLProxy::getQueryObjectui64vRobustANGLE(GCGLuint id, GCGLenum pname, GCGLsizei bufSize, GCGLsizei* length, GCGLuint64* params) >+{ >+ notImplemented(); >+} >+ >+} >+ >+#endif >+ >diff --git a/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp b/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp >index aef83e258889a5be8267a68b1c69fec5a34e0386..6a4adf5d6d34a7c691bff00eece01fc7aa894024 100644 >--- a/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp >+++ b/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp >@@ -818,7 +818,7 @@ void MediaPlayerPrivateRemote::paintCurrentFrameInContext(GraphicsContext&, cons > notImplemented(); > } > >-bool MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture(GraphicsContextGL*, PlatformGLObject, GCGLenum, GCGLint, GCGLenum, GCGLenum, GCGLenum, bool, bool) >+bool MediaPlayerPrivateRemote::copyVideoTextureToPlatformTexture(WebCore::GraphicsContextGL*, PlatformGLObject, GCGLenum, GCGLint, GCGLenum, GCGLenum, GCGLenum, bool, bool) > { > notImplemented(); > return false; >diff --git a/Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp b/Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp >index 95c836e695041d97d259036fd73dff5c46b8ff91..c8c5829050a5258f9d931976b95f05e597a56b31 100644 >--- a/Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp >+++ b/Source/WebKit/WebProcess/GPU/media/RemoteAudioDestinationProxy.cpp >@@ -82,7 +82,7 @@ void RemoteAudioDestinationProxy::connectToGPUProcess() > > auto& connection = WebProcess::singleton().ensureGPUProcessConnection(); > connection.addClient(*this); >- bool didSucceed = connection.connection().sendSync( >+ auto didSucceed = connection.connection().sendSync( > Messages::RemoteAudioDestinationManager::CreateAudioDestination(m_inputDeviceId, m_numberOfInputChannels, numberOfOutputChannels(), sampleRate(), hardwareSampleRate()), > Messages::RemoteAudioDestinationManager::CreateAudioDestination::Reply(destinationID), 0); > >@@ -100,7 +100,7 @@ void RemoteAudioDestinationProxy::connectToGPUProcess() > AudioStreamBasicDescription streamFormat; > getAudioStreamBasicDescription(streamFormat); > m_ringBuffer->allocate(streamFormat, m_numberOfFrames); >- m_audioBufferList = makeUnique<WebAudioBufferList>(streamFormat); >+ m_audioBufferList = makeUnique<WebCore::WebAudioBufferList>(streamFormat); > #endif > } > >diff --git a/Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.cpp b/Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.cpp >index 9a9182e06359eb6954dcd91bd15004222e364861..70092322833804a54e6a6b0a59cc3a8241cd39c2 100644 >--- a/Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.cpp >+++ b/Source/WebKit/WebProcess/GPU/media/RemoteAudioSession.cpp >@@ -29,9 +29,11 @@ > #if ENABLE(GPU_PROCESS) && USE(AUDIO_SESSION) > > #include "GPUConnectionToWebProcessMessages.h" >+#include "GPUProcessConnection.h" > #include "GPUProcessProxy.h" > #include "RemoteAudioSessionMessages.h" > #include "RemoteAudioSessionProxyMessages.h" >+#include "WebProcess.h" > #include <WebCore/PlatformMediaSessionManager.h> > > namespace WebKit { >diff --git a/Source/WebKit/WebProcess/GPU/media/RemoteAudioSourceProviderManager.cpp b/Source/WebKit/WebProcess/GPU/media/RemoteAudioSourceProviderManager.cpp >index b8f45a6d5bb4db46098801243bb5e9317b1e3e2b..65b8fd0d77347e938b56458226b78da43c978918 100644 >--- a/Source/WebKit/WebProcess/GPU/media/RemoteAudioSourceProviderManager.cpp >+++ b/Source/WebKit/WebProcess/GPU/media/RemoteAudioSourceProviderManager.cpp >@@ -26,7 +26,9 @@ > #include "config.h" > #include "RemoteAudioSourceProviderManager.h" > >+#include "GPUProcessConnection.h" > #include "Logging.h" >+#include "RemoteAudioSourceProvider.h" > #include "RemoteAudioSourceProviderManagerMessages.h" > #include "SharedRingBufferStorage.h" > >diff --git a/Source/WebKit/WebProcess/GPU/media/RemoteAudioSourceProviderManager.h b/Source/WebKit/WebProcess/GPU/media/RemoteAudioSourceProviderManager.h >index e59e1b06b447e5d80ca61052c6c7a32c4ba142e6..8194090c933b2f11a6460ab3c1772d3761637103 100644 >--- a/Source/WebKit/WebProcess/GPU/media/RemoteAudioSourceProviderManager.h >+++ b/Source/WebKit/WebProcess/GPU/media/RemoteAudioSourceProviderManager.h >@@ -27,6 +27,9 @@ > > #if PLATFORM(COCOA) && ENABLE(GPU_PROCESS) > >+#include "Connection.h" >+#include "SharedMemory.h" >+#include "WebProcess.h" > #include <WebCore/CAAudioStreamDescription.h> > #include <WebCore/CARingBuffer.h> > #include <WebCore/MediaPlayerIdentifier.h> >diff --git a/Source/WebKit/WebProcess/GPU/media/RemoteLegacyCDMSession.cpp b/Source/WebKit/WebProcess/GPU/media/RemoteLegacyCDMSession.cpp >index 0db85ae9bd241eba1bda4e622440f6328e1d8a0b..297eebda19189dfe0cfe6c1ed769aacb9d6d9118 100644 >--- a/Source/WebKit/WebProcess/GPU/media/RemoteLegacyCDMSession.cpp >+++ b/Source/WebKit/WebProcess/GPU/media/RemoteLegacyCDMSession.cpp >@@ -28,6 +28,7 @@ > > #if ENABLE(GPU_PROCESS) && ENABLE(LEGACY_ENCRYPTED_MEDIA) > >+#include "GPUProcessConnection.h" > #include "RemoteLegacyCDMFactory.h" > #include "RemoteLegacyCDMSessionProxyMessages.h" > #include "SharedBufferCopy.h" >diff --git a/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h b/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h >index b9a01b0625e3b7c7f01184a83c36e549122f09a8..15172c9f6210bf4f95e0c6aa7936c622ea8d93e9 100644 >--- a/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h >+++ b/Source/WebKit/WebProcess/GPU/media/SourceBufferPrivateRemote.h >@@ -44,7 +44,6 @@ > namespace IPC { > class Connection; > class Decoder; >-class DataReference; > } > > namespace WebKit { >diff --git a/Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.h b/Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.h >index b7cedb7e8394f99ba9cfb0a2ac2a97811b3c418f..7702d1b702d12162e19ab9a6daa4c59751862f26 100644 >--- a/Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.h >+++ b/Source/WebKit/WebProcess/GPU/media/TextTrackPrivateRemote.h >@@ -33,10 +33,6 @@ > #include "TrackPrivateRemoteIdentifier.h" > #include <WebCore/InbandTextTrackPrivate.h> > >-namespace IPC { >-class DataReference; >-} >- > namespace WebCore { > class InbandGenericCue; > class ISOWebVTTCue; >diff --git a/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp b/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp >index 0c6f73d07144b5626769367c9f2a3a4017eade80..168ef435dde5614d30f3be28670a47aed616de05 100644 >--- a/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp >+++ b/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.cpp >@@ -28,7 +28,6 @@ > > #if USE(LIBWEBRTC) && PLATFORM(COCOA) && ENABLE(GPU_PROCESS) > >-#include "DataReference.h" > #include "GPUProcessConnection.h" > #include "LibWebRTCCodecsMessages.h" > #include "LibWebRTCCodecsProxyMessages.h" >diff --git a/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h b/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h >index 739a496ef494cb4a618566ffc64d4a264a74e9d0..4beae062317ba26a60683f1f451233eb1073aa7d 100644 >--- a/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h >+++ b/Source/WebKit/WebProcess/GPU/webrtc/LibWebRTCCodecs.h >@@ -28,6 +28,7 @@ > #if USE(LIBWEBRTC) && PLATFORM(COCOA) && ENABLE(GPU_PROCESS) > > #include "Connection.h" >+#include "DataReference.h" > #include "MessageReceiver.h" > #include "RTCDecoderIdentifier.h" > #include "RTCEncoderIdentifier.h" >@@ -43,7 +44,6 @@ using CVPixelBufferPoolRef = struct __CVPixelBufferPool*; > > namespace IPC { > class Connection; >-class DataReference; > class Decoder; > } > >diff --git a/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.h b/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.h >index 2dad203842f0e553fe3b462441ee94fa26493a11..c28ce7f2e17e89a8e5186a7706a2e8a44f6b7e36 100644 >--- a/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.h >+++ b/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.h >@@ -27,6 +27,7 @@ > > #include "APIInjectedBundleBundleClient.h" > #include "APIObject.h" >+#include "DataReference.h" > #include "SandboxExtension.h" > #include <JavaScriptCore/JavaScript.h> > #include <WebCore/UserContentTypes.h> >@@ -54,7 +55,6 @@ class Data; > namespace IPC { > class Decoder; > class Connection; >-class DataReference; > } > > namespace WebKit { >@@ -161,4 +161,3 @@ private: > }; > > } // namespace WebKit >- >diff --git a/Source/WebKit/WebProcess/Network/NetworkProcessConnection.h b/Source/WebKit/WebProcess/Network/NetworkProcessConnection.h >index 3064e9c4afcc2cff54a325e2531ed0522a001393..b9794659eabd184b389c06d132f8c42f80523cc2 100644 >--- a/Source/WebKit/WebProcess/Network/NetworkProcessConnection.h >+++ b/Source/WebKit/WebProcess/Network/NetworkProcessConnection.h >@@ -34,10 +34,6 @@ > #include <wtf/RefCounted.h> > #include <wtf/text/WTFString.h> > >-namespace IPC { >-class DataReference; >-} >- > namespace WebCore { > class ResourceError; > class ResourceRequest; >diff --git a/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp b/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp >index 865711b366c28df484b4cdc07aa3fcf3dcebf2f6..694896c997a4940dbab2da7657820a278af1dc6a 100644 >--- a/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp >+++ b/Source/WebKit/WebProcess/Network/WebResourceLoader.cpp >@@ -26,7 +26,6 @@ > #include "config.h" > #include "WebResourceLoader.h" > >-#include "DataReference.h" > #include "FormDataReference.h" > #include "Logging.h" > #include "NetworkProcessConnection.h" >diff --git a/Source/WebKit/WebProcess/Network/WebResourceLoader.h b/Source/WebKit/WebProcess/Network/WebResourceLoader.h >index 583e379c89ecfa9530b0abfa1c69fea9d53966fb..7e1d4994715f8849ce8bfe5ec3455d47377800d4 100644 >--- a/Source/WebKit/WebProcess/Network/WebResourceLoader.h >+++ b/Source/WebKit/WebProcess/Network/WebResourceLoader.h >@@ -26,6 +26,7 @@ > #pragma once > > #include "Connection.h" >+#include "DataReference.h" > #include "MessageSender.h" > #include "ShareableResource.h" > #include "WebPageProxyIdentifier.h" >@@ -36,7 +37,6 @@ > #include <wtf/RefPtr.h> > > namespace IPC { >-class DataReference; > class FormDataReference; > } > >diff --git a/Source/WebKit/WebProcess/Network/WebSocketChannel.cpp b/Source/WebKit/WebProcess/Network/WebSocketChannel.cpp >index 94ef0d1fce2e601df449cff8539fbd164793ebe2..ff69f5609e577cac777f04afa74af21074864f86 100644 >--- a/Source/WebKit/WebProcess/Network/WebSocketChannel.cpp >+++ b/Source/WebKit/WebProcess/Network/WebSocketChannel.cpp >@@ -26,7 +26,6 @@ > #include "config.h" > #include "WebSocketChannel.h" > >-#include "DataReference.h" > #include "NetworkConnectionToWebProcessMessages.h" > #include "NetworkProcessConnection.h" > #include "NetworkSocketChannelMessages.h" >diff --git a/Source/WebKit/WebProcess/Network/WebSocketChannel.h b/Source/WebKit/WebProcess/Network/WebSocketChannel.h >index f53478347e775df37ea97634c2330932b4a14d28..ad7ff187dbb4353b9ed3bc57c5ba2c4aa4e8cfef 100644 >--- a/Source/WebKit/WebProcess/Network/WebSocketChannel.h >+++ b/Source/WebKit/WebProcess/Network/WebSocketChannel.h >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "DataReference.h" > #include "MessageReceiver.h" > #include "MessageSender.h" > #include <WebCore/NetworkSendQueue.h> >@@ -38,7 +39,6 @@ > namespace IPC { > class Connection; > class Decoder; >-class DataReference; > } > > namespace WebKit { >diff --git a/Source/WebKit/WebProcess/Network/WebSocketStream.cpp b/Source/WebKit/WebProcess/Network/WebSocketStream.cpp >index af242cd2b595ac4a4484297be5d5cfe18d48f324..7d007369b9cce85b8f05457d666d1e4451b96c52 100644 >--- a/Source/WebKit/WebProcess/Network/WebSocketStream.cpp >+++ b/Source/WebKit/WebProcess/Network/WebSocketStream.cpp >@@ -26,7 +26,6 @@ > #include "config.h" > #include "WebSocketStream.h" > >-#include "DataReference.h" > #include "NetworkConnectionToWebProcessMessages.h" > #include "NetworkProcessConnection.h" > #include "NetworkSocketStreamMessages.h" >diff --git a/Source/WebKit/WebProcess/Network/WebSocketStream.h b/Source/WebKit/WebProcess/Network/WebSocketStream.h >index dd082010712b9f5db9febd88da669b6df61d0f29..b43cb2efad1e101ee265b93dde9b0612736a0978 100644 >--- a/Source/WebKit/WebProcess/Network/WebSocketStream.h >+++ b/Source/WebKit/WebProcess/Network/WebSocketStream.h >@@ -25,6 +25,7 @@ > > #pragma once > >+#include "DataReference.h" > #include "MessageReceiver.h" > #include "MessageSender.h" > #include <WebCore/SocketStreamHandle.h> >@@ -33,7 +34,6 @@ > namespace IPC { > class Connection; > class Decoder; >-class DataReference; > } > > namespace WebCore { >diff --git a/Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocket.h b/Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocket.h >index cb48e057348a2e866b091ff5ac872605ca192dd5..323f25ee8fd81b02630d2f259a1afb884b4cf5e4 100644 >--- a/Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocket.h >+++ b/Source/WebKit/WebProcess/Network/webrtc/LibWebRTCSocket.h >@@ -35,7 +35,6 @@ > > namespace IPC { > class Connection; >-class DataReference; > class Decoder; > } > >diff --git a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h >index ea535960109fee6dc4805cf68912798ee9ab6f03..40b4c8f2129cf1233a1b31b85127e7a7e9e3d7ca 100644 >--- a/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h >+++ b/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.h >@@ -60,10 +60,6 @@ OBJC_CLASS PDFSelection; > OBJC_CLASS WKPDFPluginAccessibilityObject; > OBJC_CLASS WKPDFLayerControllerDelegate; > >-namespace IPC { >-class DataReference; >-} >- > namespace WebCore { > class AXObjectCache; > class Element; >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp >index 334764ace2a8c438588b3198062f365a366e8bda..5b2732f2c4e4c483ebf84087a8c2634e9d549237 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.cpp >@@ -108,6 +108,10 @@ > #include <WebCore/MockWebAuthenticationConfiguration.h> > #endif > >+#if PLATFORM(COCOA) >+#include "RemoteGraphicsContextGLProxy.h" >+#endif >+ > namespace WebKit { > using namespace WebCore; > using namespace HTMLNames; >@@ -912,6 +916,22 @@ RefPtr<ImageBuffer> WebChromeClient::createImageBuffer(const FloatSize& size, Re > return m_page.ensureRemoteRenderingBackendProxy().createImageBuffer(size, renderingMode, resolutionScale, colorSpace, pixelFormat); > } > >+#if ENABLE(WEBGL) >+ >+RefPtr<GraphicsContextGL> WebChromeClient::createGraphicsContextGL(const GraphicsContextGLAttributes& attributes, PlatformDisplayID hostWindowDisplayID) const >+{ >+ if (!WebProcess::singleton().shouldUseRemoteRenderingForWebGL()) >+ return nullptr; >+ UNUSED_VARIABLE(hostWindowDisplayID); >+#if PLATFORM(COCOA) >+ return RemoteGraphicsContextGLProxy::create(attributes); >+#else >+ return nullptr; >+#endif >+} >+ >+#endif >+ > #endif // ENABLE(GPU_PROCESS) > > void WebChromeClient::attachRootGraphicsLayer(Frame&, GraphicsLayer* layer) >diff --git a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h >index ec14fdb16c81cc12706cfcb59e99f2cd33760dc8..1215f92a0319580a0ddd9210513dd2d5d3050519 100644 >--- a/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h >+++ b/Source/WebKit/WebProcess/WebCoreSupport/WebChromeClient.h >@@ -243,7 +243,11 @@ private: > > #if ENABLE(GPU_PROCESS) > RefPtr<WebCore::ImageBuffer> createImageBuffer(const WebCore::FloatSize&, WebCore::RenderingMode, WebCore::RenderingPurpose, float resolutionScale, WebCore::ColorSpace, WebCore::PixelFormat) const final; >+#if ENABLE(WEBGL) >+ RefPtr<WebCore::GraphicsContextGL> createGraphicsContextGL(const WebCore::GraphicsContextGLAttributes&, WebCore::PlatformDisplayID hostWindowDisplayID) const final; > #endif >+#endif >+ > > CompositingTriggerFlags allowedCompositingTriggers() const final > { >@@ -403,6 +407,7 @@ private: > > mutable bool m_cachedMainFrameHasHorizontalScrollbar { false }; > mutable bool m_cachedMainFrameHasVerticalScrollbar { false }; >+ > WebPage& m_page; > }; > >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.cpp b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >index 3c054e8348e092c0947077fde1ee9395446c1f11..8760e8324e85ec9cc5ae889e9979353d20d86711 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.cpp >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.cpp >@@ -422,6 +422,9 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters) > , m_shouldRenderCanvasInGPUProcess { parameters.shouldRenderCanvasInGPUProcess } > , m_shouldRenderDOMInGPUProcess { parameters.shouldRenderDOMInGPUProcess } > , m_shouldPlayMediaInGPUProcess { parameters.shouldPlayMediaInGPUProcess } >+#if ENABLE(WEBGL) >+ , m_shouldRenderWebGLInGPUProcess { parameters.shouldRenderWebGLInGPUProcess} >+#endif > #if ENABLE(APP_BOUND_DOMAINS) > , m_needsInAppBrowserPrivacyQuirks { parameters.needsInAppBrowserPrivacyQuirks } > #endif >@@ -725,7 +728,6 @@ WebPage::WebPage(PageIdentifier pageID, WebPageCreationParameters&& parameters) > if (WebMediaKeyStorageManager* manager = webProcess.supplement<WebMediaKeyStorageManager>()) > m_page->settings().setMediaKeysStorageDirectory(manager->mediaKeyStorageDirectory()); > #endif >- > if (parameters.viewScaleFactor != 1) > scaleView(parameters.viewScaleFactor); > >@@ -3793,6 +3795,9 @@ void WebPage::updatePreferences(const WebPreferencesStore& store) > WebProcess::singleton().setUseGPUProcessForCanvasRendering(m_shouldRenderCanvasInGPUProcess); > WebProcess::singleton().setUseGPUProcessForDOMRendering(m_shouldRenderDOMInGPUProcess); > WebProcess::singleton().setUseGPUProcessForMedia(m_shouldPlayMediaInGPUProcess); >+#if ENABLE(WEBGL) >+ WebProcess::singleton().setUseGPUProcessForWebGL(m_shouldRenderWebGLInGPUProcess); >+#endif > #endif > > #if ENABLE(IPC_TESTING_API) >@@ -6990,6 +6995,7 @@ void WebPage::synchronizeCORSDisablingPatternsWithNetworkProcess() > WebProcess::singleton().ensureNetworkProcessConnection().connection().send(Messages::NetworkConnectionToWebProcess::SetCORSDisablingPatterns(m_identifier, m_corsDisablingPatterns), 0); > } > >+ > #if ENABLE(MEDIA_USAGE) > void WebPage::addMediaUsageManagerSession(MediaSessionIdentifier identifier, const String& bundleIdentifier, const URL& pageURL) > { >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h >index e7f8c0a3b604e7aa157c740231e555749d4ef7c7..2110a32f670f00fa244fe6f9d795a6ddf60d1706 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.h >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h >@@ -34,6 +34,7 @@ > #include "APIObject.h" > #include "CallbackID.h" > #include "ContentAsStringIncludesChildFrames.h" >+#include "DataReference.h" > #include "DownloadID.h" > #include "DrawingAreaInfo.h" > #include "EditingRange.h" >@@ -160,7 +161,6 @@ class Array; > > namespace IPC { > class Connection; >-class DataReference; > class Decoder; > class FormDataReference; > } >@@ -1257,7 +1257,7 @@ public: > void didReceiveWebPageMessage(IPC::Connection&, IPC::Decoder&); > > template<typename T> >- bool sendSyncWithDelayedReply(T&& message, typename T::Reply&& reply) >+ SendSyncResult sendSyncWithDelayedReply(T&& message, typename T::Reply&& reply) > { > cancelGesturesBlockedOnSynchronousReplies(); > return sendSync(WTFMove(message), WTFMove(reply), Seconds::infinity(), IPC::SendSyncOption::InformPlatformProcessWillSuspend); >@@ -1826,6 +1826,9 @@ private: > bool m_shouldRenderCanvasInGPUProcess { false }; > bool m_shouldRenderDOMInGPUProcess { false }; > bool m_shouldPlayMediaInGPUProcess { false }; >+#if ENABLE(WEBGL) >+ bool m_shouldRenderWebGLInGPUProcess { false }; >+#endif > #if ENABLE(APP_BOUND_DOMAINS) > bool m_needsInAppBrowserPrivacyQuirks { false }; > #endif >@@ -2183,4 +2186,3 @@ inline bool WebPage::platformNeedsLayoutForEditorState(const WebCore::Frame&) co > #endif > > } // namespace WebKit >- >diff --git a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >index e575fca019f6b12a8f4dae5cb1d682da4e436eb9..84e28411cfddd91f9a5d47c21d71e9db6d7c6343 100644 >--- a/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >+++ b/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm >@@ -517,7 +517,7 @@ bool WebPage::handleEditingKeyboardEvent(KeyboardEvent& event) > > // FIXME: Interpret the event immediately upon receiving it in UI process, without sending to WebProcess first. > bool eventWasHandled = false; >- bool sendResult = WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::InterpretKeyEvent(editorState(ShouldPerformLayout::Yes), platformEvent->type() == PlatformKeyboardEvent::Char), >+ auto sendResult = WebProcess::singleton().parentProcessConnection()->sendSync(Messages::WebPageProxy::InterpretKeyEvent(editorState(ShouldPerformLayout::Yes), platformEvent->type() == PlatformKeyboardEvent::Char), > Messages::WebPageProxy::InterpretKeyEvent::Reply(eventWasHandled), m_identifier); > return sendResult && eventWasHandled; > } >diff --git a/Source/WebKit/WebProcess/WebProcess.cpp b/Source/WebKit/WebProcess/WebProcess.cpp >index f2f22822c7b223fca59f95573d11dc99b1034811..582ee75d99a7424254a39dab206f8461734ad9a6 100644 >--- a/Source/WebKit/WebProcess/WebProcess.cpp >+++ b/Source/WebKit/WebProcess/WebProcess.cpp >@@ -1942,6 +1942,20 @@ bool WebProcess::shouldUseRemoteRenderingFor(RenderingPurpose purpose) > } > return false; > } >+ >+#if ENABLE(WEBGL) >+void WebProcess::setUseGPUProcessForWebGL(bool useGPUProcessForWebGL) >+{ >+ m_useGPUProcessForWebGL = useGPUProcessForWebGL; >+} >+ >+bool WebProcess::shouldUseRemoteRenderingForWebGL() const >+{ >+ return m_useGPUProcessForWebGL; >+} >+ >+#endif >+ > #endif > > #if ENABLE(VP9) >diff --git a/Source/WebKit/WebProcess/WebProcess.h b/Source/WebKit/WebProcess/WebProcess.h >index e9c47db4c447c0f4ab627c094b5f68db565a9a6c..1a585ac142b1832764c4d85379090b2cbca73c1a 100644 >--- a/Source/WebKit/WebProcess/WebProcess.h >+++ b/Source/WebKit/WebProcess/WebProcess.h >@@ -347,6 +347,10 @@ public: > void setUseGPUProcessForDOMRendering(bool); > void setUseGPUProcessForMedia(bool); > bool shouldUseRemoteRenderingFor(WebCore::RenderingPurpose); >+#if ENABLE(WEBGL) >+ void setUseGPUProcessForWebGL(bool); >+ bool shouldUseRemoteRenderingForWebGL() const; >+#endif > #endif > > #if ENABLE(VP9) >@@ -687,6 +691,9 @@ private: > bool m_useGPUProcessForCanvasRendering { false }; > bool m_useGPUProcessForDOMRendering { false }; > bool m_useGPUProcessForMedia { false }; >+#if ENABLE(WEBGL) >+ bool m_useGPUProcessForWebGL { false }; >+#endif > #endif > > #if ENABLE(VP9) >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index a4664baac9c424c56c86a92607a42c5620769053..9c2e3a93eff298cef68ece6369a4b6a5dba2624d 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,32 @@ >+2020-12-01 Kimmo Kinnunen <kkinnunen@apple.com> >+ >+ Implement RemoteGraphicsContextGL >+ https://bugs.webkit.org/show_bug.cgi?id=217216 >+ <rdar://problem/69876258> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Implements a remote version of GraphicsContextGL for GPU process. >+ Current implementation is using WebKit IPC and is incomplete. >+ >+ Add the code generator to generate the implementation. Currently >+ the generator generates a WebKit IPC implementation. >+ >+ The input definition to the generator is the proxy implementation >+ header files. >+ The output of the generator is >+ - WebKit IPC message definition file >+ - Message sender code >+ - Message receiver and payload invocation code >+ >+ The generator converts GraphicsContextGL GCGL -prefixed types to >+ sized IPC types. >+ >+ The generator is invoked during development time and the results are >+ stored in the repository. >+ >+ * Scripts/generate-gpup-webgl: Added. >+ > 2020-11-27 Wenson Hsieh <wenson_hsieh@apple.com> > > Introduce new display list meta commands in preparation for webkit.org/b/219091 >diff --git a/Tools/Scripts/generate-gpup-webgl b/Tools/Scripts/generate-gpup-webgl >new file mode 100755 >index 0000000000000000000000000000000000000000..8ddc0e3bb43d54105e8c7a40392333a67075ac3b >--- /dev/null >+++ b/Tools/Scripts/generate-gpup-webgl >@@ -0,0 +1,1030 @@ >+#!/usr/bin/env python3 >+# -*- coding: utf-8 -*- >+# >+# Copyright (C) 2020 Apple Inc. All rights reserved. >+# >+# Redistribution and use in source and binary forms, with or without >+# modification, are permitted provided that the following conditions >+# are met: >+# >+# 1. Redistributions of source code must retain the above copyright >+# notice, this list of conditions and the following disclaimer. >+# 2. Redistributions in binary form must reproduce the above copyright >+# notice, this list of conditions and the following disclaimer in the >+# documentation and/or other materials provided with the distribution. >+# >+# THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY >+# EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR >+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, >+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR >+# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY >+# OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT >+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ >+ >+# This script generates the source files for WebGL GPU process IPC. >+# >+# python3 -m black -l 150 Tools/Scripts/generate-gpup-webgl >+# python3 -m mypy Tools/Scripts/generate-gpup-webgl >+# >+import argparse >+import enum >+import pathlib >+import re >+import sys >+import collections >+ >+from typing import List, Dict, Iterable, Callable, Tuple, Set, Optional, Generator, Iterator, Counter >+ >+root_dir = (pathlib.Path(__file__).parent / ".." / "..").resolve() >+extensions_input_fn = root_dir / "Source" / "WebCore" / "platform" / "graphics" / "ExtensionsGL.h" >+ >+functions_input_fns = [ >+ root_dir / "Source" / "WebKit" / "WebProcess" / "GPU" / "graphics" / "RemoteGraphicsContextGLProxy.h" >+] >+types_input_fn = root_dir / "Source" / "WebKit" / "WebProcess" / "GPU" / "graphics" / "RemoteGraphicsContextGLProxy.h" >+ >+ >+template_preamble = """/* Copyright (C) 2020 Apple Inc. All rights reserved. >+ * >+ * Redistribution and use in source and binary forms, with or without >+ * modification, are permitted provided that the following conditions >+ * are met: >+ * 1. Redistributions of source code must retain the above copyright >+ * notice, this list of conditions and the following disclaimer. >+ * 2. Redistributions in binary form must reproduce the above copyright >+ * notice, this list of conditions and the following disclaimer in the >+ * documentation and/or other materials provided with the distribution. >+ * >+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' AND >+ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED >+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE >+ * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE LIABLE FOR >+ * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL >+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR >+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER >+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, >+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE >+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. >+ */ >+ >+// This file is generated by generate-gpup-webgl. Do not edit. >+""" >+context_functions_fn = root_dir / "Source" / "WebKit" / "GPUProcess" / "graphics" / "RemoteGraphicsContextGLFunctionsGenerated.h" >+context_functions_template = ( >+ template_preamble >+ + """// This file should be included in the private section of the >+// RemoteGraphicsContextGL implementations. >+#pragma once >+{} >+ >+""" >+) >+context_messages_fn = root_dir / "Source" / "WebKit" / "GPUProcess" / "graphics" / "RemoteGraphicsContextGL.messages.in" >+context_messages_template = ( >+ template_preamble >+ + """#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+ >+messages -> RemoteGraphicsContextGL NotRefCounted {{ >+ void Reshape(int32_t width, int32_t height) >+#if PLATFORM(COCOA) >+ void PrepareForDisplay() -> (MachSendRight displayBuffer) Synchronous >+#endif >+#if !PLATFORM(COCOA) >+ void PrepareForDisplay() -> () Synchronous >+#endif >+ void EnsureExtensionEnabled(String extension) >+ void NotifyMarkContextChanged() >+{} >+}} >+ >+#endif >+ >+""" >+) >+ >+context_proxy_functions_fn = root_dir / "Source" / "WebKit" / "WebProcess" / "GPU" / "graphics" / "RemoteGraphicsContextGLProxyFunctionsGenerated.cpp" >+context_proxy_functions_template = ( >+ template_preamble >+ + """ >+#include "config.h" >+#include "RemoteGraphicsContextGLProxy.h" >+ >+#if ENABLE(GPU_PROCESS) && ENABLE(WEBGL) >+ >+namespace WebKit {{ >+{} >+ >+}} >+ >+#endif >+ >+""" >+) >+ >+ >+def write_file(fn, new_contents): >+ try: >+ with open(fn) as f: >+ if f.read() == new_contents: >+ return >+ except: >+ pass >+ with open(fn, "w") as f: >+ f.write(new_contents) >+ >+class cpp_type(object): >+ type_name: str >+ >+ def __init__(self, type_name : str): >+ self.type_name = type_name >+ >+ def __str__(self): >+ return self.type_name >+ >+ def __hash__(self): >+ return hash(self.type_name) >+ >+ def __repr__(self): >+ return self.type_name >+ >+ def __eq__(self, other): >+ return self.type_name == other.type_name >+ >+ def is_void(self) -> bool: >+ return self.type_name in ["void", "GCGLvoid", "const void", "const GCGLvoid"] >+ >+ def is_const(self) -> bool: >+ return self.type_name.startswith("const ") >+ >+ def is_container(self) -> bool: >+ return False >+ >+ def is_output_buffer_type(self) -> bool: >+ return False >+ >+ def is_span(self) -> bool: >+ return False >+ >+ def is_dynamic_span(self) -> bool: >+ return False >+ >+ def is_pointer(self) -> bool: >+ return False >+ >+ def is_const_pointer(self) -> bool: >+ return False >+ >+ def is_reference(self) -> bool: >+ return False >+ >+ def is_const_reference(self) -> bool: >+ return False >+ >+ def get_value_type(self) -> 'cpp_type': >+ return self >+ >+ def get_decay_type(self) -> 'cpp_type': >+ if self.is_const(): >+ return get_cpp_type(self.type_name[6:]) >+ return self >+ >+ def get_rvalue_type(self) -> 'cpp_type': >+ return get_cpp_type(self.type_name + "&&") >+ >+ def get_pointer_type(self) -> 'cpp_type': >+ return get_cpp_type(self.type_name + "*") >+ >+class cpp_type_container(cpp_type): >+ def __init__(self, type_name : str, container_name : str, contained_type : cpp_type, arity : Optional[int] = None): >+ cpp_type.__init__(self, type_name) >+ self.container_name = container_name >+ self.contained_type = contained_type >+ self.arity = arity >+ def is_container(self) -> bool: >+ return True >+ def is_span(self) -> bool: >+ return self.container_name == "GCGLSpan" >+ def is_dynamic_span(self) -> bool: >+ return self.container_name == "GCGLSpan" and self.arity is None >+ def get_container_name(self): >+ return self.container_name >+ def get_arity(self) -> Optional[int]: >+ return self.arity >+ def get_contained_type(self) -> cpp_type: >+ return self.contained_type >+ def is_output_buffer_type(self) -> bool: >+ return self.contained_type.is_const() >+ >+def create_cpp_type_container(type_name : str) -> Optional[cpp_type_container]: >+ m = re.match(r"([\w:]+)<(.+)>$", type_name) >+ if not m: >+ return None >+ container_name = m[1] >+ templates = m[2] >+ arity = None >+ m = re.match(r"([^,]+),\s*(\d+)", templates) >+ if m: >+ templates = m[1] >+ arity = int(m[2]) >+ return cpp_type_container(type_name, container_name, get_cpp_type(templates), arity) >+ >+class cpp_type_function(cpp_type): >+ def __init__(self, type_name : str, return_value_type : cpp_type, argument_types : List[cpp_type]): >+ cpp_type.__init__(self, type_name) >+ self.return_value_type = return_value_type >+ self.argument_types = argument_types >+ >+def cpp_split_args_specs(args_spec : str) -> Iterator[str]: >+ # https://stackoverflow.com/questions/33527245/python-split-by-comma-skipping-the-content-inside-parentheses >+ comma = r",(?!(?:[^<]*\<[^>]*\>)*[^<>]*\>)" >+ return filter(None, [a.strip() for a in re.split(comma, args_spec.strip())]) >+ >+def create_cpp_type_function(type_name : str) -> Optional[cpp_type_function]: >+ m = re.match(r'(.*)\((.*)\)', type_name) >+ if not m: >+ return None >+ return_value_type = get_cpp_type(m[1]) >+ args_types = [get_cpp_type(a) for a in cpp_split_args_specs(m[2])] >+ return cpp_type_function(type_name, return_value_type, args_types) >+ >+# Pointer or refererence >+class cpp_type_indirect(cpp_type): >+ category : str >+ value_type : cpp_type >+ >+ def __init__(self, type_name : str, category : str, value_type : cpp_type): >+ cpp_type.__init__(self, type_name) >+ self.category = category >+ self.value_type = value_type >+ >+ def is_const_pointer(self): >+ return self.category == '*' and self.is_const() >+ def is_pointer(self): >+ return self.category == '*' and not self.is_const() >+ def is_const_reference(self): >+ return self.category == '&' and self.is_const() >+ def is_reference(self): >+ return self.category == '&' and not self.is_const() >+ def is_rvalue_reference(self): >+ return self.category == '&&' >+ def get_value_type(self): >+ return self.value_type >+ >+def create_cpp_type_indirect(type_name : str) -> Optional[cpp_type_indirect]: >+ m = re.match(r"const (.+)&&$", type_name) >+ if not m: >+ m = re.match(r"(.+)&&$", type_name) >+ if m: >+ return cpp_type_indirect(type_name, '&&', get_cpp_type(m[1])) >+ m = re.match(r"const (.+)&$", type_name) >+ if not m: >+ m = re.match(r"(.+)&$", type_name) >+ if m: >+ return cpp_type_indirect(type_name, '&', get_cpp_type(m[1])) >+ m = re.match(r"const (.+)\*$", type_name) >+ if not m: >+ m = re.match(r"(.+)\*$", type_name) >+ if m: >+ return cpp_type_indirect(type_name, '*', get_cpp_type(m[1])) >+ return None >+ >+ >+class cpp_expr(object): >+ type: cpp_type >+ expr: str >+ >+ def __init__(self, type: cpp_type, expr: str): >+ self.type = type >+ self.expr = expr >+ >+ def __str__(self): >+ return self.expr >+ >+ >+CppExprConverter = Callable[[cpp_expr, cpp_type], cpp_expr] >+ >+ >+def cpp_reinterpret_cast_from_pointer_through(cast_through_type : cpp_type) -> Callable[[cpp_expr, cpp_type], cpp_expr]: >+ def cpp_reinterpret_cast_from_pointer(expr: cpp_expr, type: cpp_type) -> cpp_expr: >+ return cpp_expr(type, f"static_cast<{type.type_name}>(reinterpret_cast<{str(cast_through_type)}>({str(expr)}))") >+ return cpp_reinterpret_cast_from_pointer >+ >+def cpp_reinterpret_cast_to_pointer_through(cast_through_type : cpp_type) -> Callable[[cpp_expr, cpp_type], cpp_expr]: >+ def cpp_reinterpret_cast_to_pointer(expr: cpp_expr, type: cpp_type) -> cpp_expr: >+ return cpp_expr(type, f"reinterpret_cast<{type.type_name}>(static_cast<{str(cast_through_type)}>({str(expr)}))") >+ return cpp_reinterpret_cast_to_pointer >+ >+def cpp_static_cast(expr: cpp_expr, type: cpp_type) -> cpp_expr: >+ return cpp_expr(type, f"static_cast<{type.type_name}>({str(expr)})") >+ >+ >+def cpp_implicit_cast(expr: cpp_expr, type: cpp_type) -> cpp_expr: >+ return cpp_expr(type, str(expr)) >+ >+ >+def cpp_array_reinterpret_cast_conversion(expr: cpp_expr, type: cpp_type_container) -> cpp_expr: >+ element_pointer_type = type.get_contained_type().get_pointer_type() >+ return cpp_expr(type, f"{str(type)}(reinterpret_cast<{element_pointer_type}>({str(expr)}.data()), {str(expr)}.size())") >+ >+def webkit_ipc_span_transfer_type_reinterpret_cast_conversion(expr: cpp_expr, type: cpp_type_container) -> cpp_expr: >+ element_pointer_type = type.get_contained_type().get_pointer_type() >+ return cpp_expr(type, f"{str(type)}(reinterpret_cast<const {element_pointer_type}>({str(expr)}.data), {str(expr)}.bufSize)") >+ >+def cpp_move_expr(expr: cpp_expr) -> cpp_expr: >+ return cpp_expr(expr.type.get_rvalue_type(), f"WTFMove({str(expr)})") >+ >+ >+cpp_types: Dict[str, cpp_type] = {} >+ >+cpp_type_constructors : List[Callable[[str], Optional[cpp_type]]] = [ >+ create_cpp_type_function, >+ create_cpp_type_container, >+ create_cpp_type_indirect >+] >+ >+def get_cpp_type(type_name: str): >+ r = cpp_types.get(type_name, None) >+ if r: >+ return r >+ for type_constr in cpp_type_constructors: >+ r = type_constr(type_name) >+ if r: >+ break >+ if not r: >+ r = cpp_type(type_name) >+ cpp_types[type_name] = r >+ return r >+ >+ >+class cpp_arg(object): >+ name: str >+ type: cpp_type >+ >+ def __init__(self, type: cpp_type, name: str): >+ self.name = name >+ self.type = type >+ >+ def __str__(self): >+ return "{} {}".format(self.type, self.name) >+ >+ >+class cpp_decl(object): >+ type: cpp_type >+ name: str >+ >+ def __init__(self, type: cpp_type, name: str): >+ self.type = type >+ self.name = name >+ >+ def __str__(self): >+ return f"{str(self.type)} {self.name}" >+ >+ >+class cpp_arg_list(object): >+ args: List[cpp_arg] >+ >+ def __init__(self, args: List[cpp_arg]): >+ self.args = args >+ >+ def names(self): >+ return ", ".join(a.name for a in self.args) >+ >+ def exprs(self): >+ return [cpp_expr(a.type, a.name) for a in self.args] >+ >+ def decls(self): >+ return [cpp_decl(a.type, a.name) for a in self.args] >+ >+ def types(self): >+ return [a.type for a in self.args] >+ >+ def __str__(self): >+ return ", ".join(str(a) for a in self.args) >+ >+ >+class cpp_func(object): >+ name: str >+ args: cpp_arg_list >+ return_type: cpp_type >+ is_extension: bool >+ overload_suffix: str >+ >+ def __init__(self, name: str, return_type: cpp_type, args: cpp_arg_list, is_extension: bool): >+ self.name = name >+ self.return_type = return_type >+ self.args = args >+ self.is_extension = is_extension >+ self.overload_suffix = "" >+ >+ def __str__(self): >+ return f"{self.return_type} {self.name}({str(self.args)})" >+ >+ def get_args_categories(self) -> Tuple[List[cpp_arg], List[cpp_arg]]: >+ in_args = [] >+ out_args = [] >+ for a in self.args.args: >+ #fmt: off >+ if a.type.is_pointer() or \ >+ a.type.is_reference(): >+ out_args += [a] >+ elif isinstance(a.type, cpp_type_container) and (((a.type.is_span() or a.type.is_dynamic_span()) and not a.type.get_contained_type().is_const())): >+ out_args += [a] >+ else: >+ in_args += [a] >+ #fmt: on >+ return in_args, out_args >+ >+ def is_implemented_type(self, type: cpp_type): >+ if type.is_const_pointer(): >+ return False >+ return True >+ >+ def is_implemented(self): >+ #" in a.type.type_name for a in self.args.args): >+ # return False >+ #if "GCGLsync" in self.return_type.type_name: >+ # return False >+ if any(a.name == "bufSize" for a in self.args.args): >+ return False >+ if any(a.type.is_pointer() and a.type.get_value_type().is_void() for a in self.args.args): >+ return False >+ if any(not self.is_implemented_type(a.type) for a in self.args.args): >+ return False >+ if self.return_type.is_pointer(): >+ return False >+ if not self.is_implemented_type(self.return_type): >+ return False >+ return True >+ >+ >+webkit_ipc_types: Dict[cpp_type, cpp_type] = {} >+ >+webkit_ipc_types_converters: Dict[Tuple[cpp_type, cpp_type], CppExprConverter] = {} >+ >+ >+def webkit_ipc_convert_expr(expr: cpp_expr, type: cpp_type) -> cpp_expr: >+ """ Converts `expr` of type of `self` to `type` """ >+ convert = webkit_ipc_types_converters.get((expr.type, type), None) >+ if not convert: >+ if expr.type == type: >+ return expr >+ convert = cpp_implicit_cast >+ return convert(expr, type) >+ >+ >+def webkit_ipc_get_span_transfer_type(type : cpp_type_container) -> cpp_type: >+ element_type = type.get_contained_type().get_decay_type() >+ arity = type.get_arity() >+ webkit_ipc_element_type = webkit_ipc_types[element_type] if not element_type.is_void() else get_cpp_type('uint8_t') >+ if arity is not None: >+ return get_cpp_type(f"IPC::ArrayReference<{str(webkit_ipc_element_type)}, {arity}>") >+ return get_cpp_type(f"IPC::ArrayReference<{str(webkit_ipc_element_type)}>") >+ >+ >+ >+def webkit_ipc_get_span_store_type(type: cpp_type_container) -> cpp_type: >+ element_type = type.get_contained_type().get_decay_type() >+ if element_type.is_void(): >+ element_type = get_cpp_type('GCGLchar') >+ if type.is_dynamic_span(): >+ inline_capacity = 16 if "float" in element_type.type_name else 4 >+ return get_cpp_type(f"Vector<{str(element_type)}, {str(inline_capacity)}>") >+ return get_cpp_type(f"std::array<{str(element_type)}, {str(type.get_arity())}>") >+ >+def webkit_ipc_make_gcglspan_conversion(expr : cpp_expr, type : cpp_type_container) -> cpp_expr: >+ pointer_cast_type = type.get_contained_type().get_pointer_type() >+ if type.is_dynamic_span(): >+ return cpp_expr(type, f"makeGCGLSpan(reinterpret_cast<{str(pointer_cast_type)}>({str(expr)}.data()), {str(expr)}.size())") >+ >+ assert(type.is_span()) >+ return cpp_expr(type, f"makeGCGLSpan<{str(type.get_arity())}>(reinterpret_cast<{str(pointer_cast_type)}>({str(expr)}.data()))") >+ >+# See messages.py function_parameter_type >+webkit_ipc_builtin_types = set( >+ ["uint8_t", "uint16_t", "uint32_t", "uint64_t", "int8_t", "int16_t", "int32_t", "int64_t", "bool", "float", "double" "bool"] >+) >+ >+ >+def webkit_ipc_get_message_forwarder_type(type: cpp_type) -> cpp_type: >+ if type.type_name in webkit_ipc_builtin_types: >+ return type >+ return type.get_rvalue_type() >+ >+ >+def webkit_ipc_move_expr(expr: cpp_expr) -> cpp_expr: >+ if expr.type.type_name in webkit_ipc_builtin_types: >+ return expr >+ return cpp_move_expr(expr) >+ >+ >+def webkit_ipc_msg_name(func: cpp_func): >+ return func.name[0].capitalize() + func.name[1:] + func.overload_suffix >+ >+ >+class webkit_ipc_msg(object): >+ name: str >+ in_args: cpp_arg_list >+ out_args: cpp_arg_list >+ >+ def __init__(self, func: cpp_func): >+ self.name = webkit_ipc_msg_name(func) >+ in_args, out_args = func.get_args_categories() >+ ipc_in_args = [cpp_arg(webkit_ipc_types[a.type], a.name) for a in in_args] >+ ipc_out_args = [] >+ if not func.return_type.is_void(): >+ ipc_out_args += [cpp_arg(webkit_ipc_types[func.return_type], "returnValue")] >+ for a in out_args: >+ ipc_out_args += [cpp_arg(webkit_ipc_types[a.type], a.name)] >+ if a.type.is_dynamic_span(): >+ ipc_in_args += [cpp_arg(get_cpp_type("uint64_t"), f"{a.name}Size")] >+ self.in_args = cpp_arg_list(ipc_in_args) >+ self.out_args = cpp_arg_list(ipc_out_args) >+ >+ def __str__(self): >+ if len(self.out_args.args): >+ return f"\n void {self.name}({str(self.in_args)}) -> ({str(self.out_args)}) Synchronous" >+ return f"\n void {self.name}({str(self.in_args)})" >+ >+ >+class webkit_ipc_cpp_proxy_impl(object): >+ name: str >+ msg_name: str >+ return_type: cpp_type >+ args: cpp_arg_list >+ >+ pre_call_stmts: List[str] >+ call_stmts: List[str] >+ post_call_stmts: List[str] >+ return_stmts: List[str] >+ in_exprs: List[cpp_expr] >+ out_exprs: List[cpp_expr] >+ >+ def __init__(self, cpp_func: cpp_func): >+ self.name = cpp_func.name >+ self.msg_name = webkit_ipc_msg_name(cpp_func) >+ self.return_type = cpp_func.return_type >+ self.args = cpp_func.args >+ self.pre_call_stmts = [] >+ self.call_stmts = [] >+ self.post_call_stmts = [] >+ self.return_stmts = [] >+ self.in_exprs = [] >+ self.out_exprs = [] >+ in_args, out_args = cpp_func.get_args_categories() >+ self.process_return_value(cpp_func.return_type) >+ self.process_in_args(in_args) >+ self.process_out_args(out_args) >+ self.process_call() >+ >+ def process_call(self): >+ in_exprs = ", ".join([str(i) for i in self.in_exprs]) >+ out_exprs = ", ".join(str(o) for o in self.out_exprs) >+ is_async = self.return_type.is_void() and len(out_exprs) == 0 >+ if is_async: >+ self.call_stmts += [ >+ f"send(Messages::RemoteGraphicsContextGL::{self.msg_name}({in_exprs}), m_graphicsContextGLIdentifier);", >+ ] >+ else: >+ send_result = "" >+ if self.post_call_stmts: >+ send_result = "auto sendResult = " >+ self.post_call_stmts = [ >+ "if (sendResult)" + (" {" if len(self.post_call_stmts) > 1 else "") >+ ] + [" " + s for s in self.post_call_stmts] + [ >+ ("}" if len(self.post_call_stmts) > 1 else "") >+ ] >+ self.call_stmts += [ >+ f"{send_result}sendSync(Messages::RemoteGraphicsContextGL::{self.msg_name}({in_exprs}), Messages::RemoteGraphicsContextGL::{self.msg_name}::Reply({out_exprs}), m_graphicsContextGLIdentifier, 10_s);", >+ ] >+ >+ >+ def process_in_args(self, in_args: List[cpp_arg]): >+ for i in in_args: >+ if i.type.is_const_pointer(): >+ assert False >+ else: >+ self.in_exprs += [webkit_ipc_convert_expr(cpp_expr(i.type, i.name), webkit_ipc_types[i.type])] >+ >+ def process_out_args(self, out_args: List[cpp_arg]): >+ for o in out_args: >+ if o.type.is_pointer(): >+ value_type = o.type.get_value_type() >+ webkit_ipc_value_type = webkit_ipc_types[value_type] >+ v = cpp_arg(webkit_ipc_value_type, o.name + "Reply") >+ self.pre_call_stmts += [f"{str(v.type)} {str(v.name)} = {{ }};"] >+ e = cpp_expr(v.type, v.name) >+ self.out_exprs += [e] >+ self.post_call_stmts += [ >+ #fmt: off >+ f"if ({o.name})", >+ f" *{o.name} = {webkit_ipc_convert_expr(e, value_type)};" >+ #fmt: on >+ ] >+ elif o.type.is_span(): >+ webkit_ipc_type = webkit_ipc_types[o.type] >+ assert(isinstance(webkit_ipc_type, cpp_type_container)) >+ v = cpp_arg(webkit_ipc_type, o.name + "Reply") >+ self.pre_call_stmts += [f"{str(v.type)} {str(v.name)};"] >+ self.out_exprs += [cpp_expr(v.type, v.name)] >+ if o.type.is_dynamic_span(): >+ self.in_exprs += [cpp_expr(get_cpp_type("size_t"), f"{o.name}.bufSize")] >+ self.post_call_stmts += [ >+ f"memcpy({o.name}.data, {v.name}.data(), {o.name}.bufSize * sizeof({str(webkit_ipc_type.get_contained_type())}));" >+ ] >+ else: >+ self.out_exprs += [cpp_expr(o.type, o.name)] >+ >+ def process_return_value(self, return_type: cpp_type): >+ if return_type.is_void(): >+ return >+ self.return_type = return_type >+ ipc_return_type = webkit_ipc_types[return_type] >+ return_value_expr = cpp_expr(ipc_return_type, "returnValue") >+ self.pre_call_stmts += [f"{return_value_expr.type} {return_value_expr.expr} = {{ }};"] >+ self.out_exprs = [return_value_expr] + self.out_exprs >+ self.return_stmts = [f"return {str(webkit_ipc_convert_expr(return_value_expr, return_type))};"] >+ >+ def __str__(self): >+ nolint = " // NOLINT" if "_" in self.name else "" >+ body = "".join(f"\n {b}" for b in self.pre_call_stmts + self.call_stmts + self.post_call_stmts + self.return_stmts) >+ return f"""\n{str(self.return_type)} RemoteGraphicsContextGLProxy::{self.name}({str(self.args)}){nolint} >+{{{body} >+}}""" >+ >+ >+class webkit_ipc_cpp_proxy_placeholder(object): >+ name: str >+ return_type: cpp_type >+ args: cpp_arg_list >+ body: List[str] >+ >+ def __init__(self, cpp_func: cpp_func): >+ self.name = cpp_func.name >+ >+ self.return_type = cpp_func.return_type >+ self.args = cpp_func.args >+ self.body = ["notImplemented();"] >+ if cpp_func.return_type.type_name != "void": >+ self.body += ["return { };"] >+ >+ def __str__(self): >+ nolint = " // NOLINT" if "_" in self.name else "" >+ body = "\n{\n " + "\n ".join(self.body) + "\n}" >+ return f"\n{str(self.return_type)} RemoteGraphicsContextGLProxy::{self.name}({str(self.args)}){nolint}{body}" >+ >+ >+class context_proxy_cpp_webkit_ipc_generator(object): >+ "RemoteGraphicsContextGLProxy C++ implementation generator." >+ impls: List[webkit_ipc_cpp_proxy_impl] >+ unimpls: List[webkit_ipc_cpp_proxy_placeholder] >+ >+ def __init__(self, funcs: Iterable[cpp_func], unimplemented: Iterable[cpp_func]): >+ self.impls = [webkit_ipc_cpp_proxy_impl(f) for f in funcs] >+ self.unimpls = [webkit_ipc_cpp_proxy_placeholder(f) for f in unimplemented] >+ >+ def get_functions(self): >+ return "\n".join(str(i) for i in self.impls + self.unimpls) >+ >+ def generate(self): >+ write_file( >+ context_proxy_functions_fn, >+ context_proxy_functions_template.format(self.get_functions()), >+ ) >+ >+ >+class webkit_ipc_cpp_impl(object): >+ name: str >+ args: cpp_arg_list >+ is_extension: bool >+ pre_call_stmts: List[str] >+ call_stmts: List[str] >+ post_call_stmts: List[str] >+ in_exprs: List[cpp_expr] >+ out_exprs: List[cpp_expr] >+ return_value_expr: Optional[cpp_expr] >+ >+ def __init__(self, cpp_func: cpp_func): >+ self.name = cpp_func.name >+ self.overload_suffix = cpp_func.overload_suffix >+ self.args = cpp_arg_list([]) >+ self.is_extension = cpp_func.is_extension >+ self.pre_call_stmts = [] >+ self.call_stmts = [] >+ self.post_call_stmts = [] >+ self.in_exprs = [] >+ self.out_exprs = [] >+ self.return_value_expr = None >+ >+ self.process_return_value(cpp_func.return_type) >+ in_args, out_args = cpp_func.get_args_categories() >+ self.process_args(cpp_func.args.args, set(in_args), set(out_args)) >+ self.process_call() >+ >+ def process_call(self): >+ ext = "getExtensions()." if self.is_extension else "" >+ >+ in_exprs = ", ".join(str(e) for e in self.in_exprs) >+ is_async = len(self.out_exprs) == 0 >+ >+ call_expr = f"m_context->{ext}{self.name}({in_exprs})" >+ if not self.return_value_expr: >+ self.call_stmts += [f"{call_expr};"] >+ else: >+ self.call_stmts += [f"{str(self.return_value_expr)} = {call_expr};"] >+ if not is_async: >+ out_exprs = ", ".join(str(e) for e in self.out_exprs) >+ self.post_call_stmts += [f"completionHandler({out_exprs});"] >+ >+ def process_args(self, args: List[cpp_arg], in_args: Set[cpp_arg], out_args: Set[cpp_arg]): >+ for a in args: >+ if a.type.is_const_pointer(): >+ assert False >+ if a in in_args: >+ self.process_in_arg(a) >+ else: >+ self.process_out_arg(a) >+ if self.out_exprs: >+ out_arg_decls = ", ".join(f"{str(e.type)}" for e in self.out_exprs) >+ self.args.args += [cpp_arg(get_cpp_type(f"CompletionHandler<void({out_arg_decls})>&&"), "completionHandler")] >+ >+ def process_in_arg(self, a: cpp_arg): >+ self.args.args += [cpp_arg(webkit_ipc_get_message_forwarder_type(webkit_ipc_types[a.type]), a.name)] >+ self.in_exprs += [webkit_ipc_convert_expr(cpp_expr(webkit_ipc_types[a.type], a.name), a.type)] >+ >+ def process_out_arg(self, a: cpp_arg): >+ if a.type.is_pointer(): >+ value_arg = cpp_arg(a.type.get_value_type(), a.name) >+ self.pre_call_stmts += [f"{str(value_arg.type)} {str(value_arg.name)} = {{ }};"] >+ self.in_exprs += [cpp_expr(a.type, f"&{value_arg.name}")] >+ e = cpp_expr(value_arg.type, value_arg.name) >+ webkit_ipc_value_type = webkit_ipc_types[e.type] >+ self.out_exprs += [webkit_ipc_convert_expr(e, webkit_ipc_value_type)] >+ elif a.type.is_dynamic_span(): >+ assert(isinstance(a.type, cpp_type_container)) >+ size_arg = cpp_arg(get_cpp_type("uint64_t"), f"{a.name}Size") >+ self.args.args += [size_arg] >+ store_arg = cpp_arg(webkit_ipc_get_span_store_type(a.type), a.name) >+ self.pre_call_stmts += [f"{str(store_arg.type)} {str(store_arg.name)}(static_cast<size_t>({a.name}Size), 0);"] >+ self.in_exprs += [cpp_expr(store_arg.type, f"{store_arg.name}")] >+ webkit_ipc_type = webkit_ipc_types[a.type] >+ self.out_exprs += [webkit_ipc_convert_expr(cpp_expr(store_arg.type, store_arg.name), webkit_ipc_type)] >+ elif a.type.is_span(): >+ assert(isinstance(a.type, cpp_type_container)) >+ store_arg = cpp_arg(webkit_ipc_get_span_store_type(a.type), a.name) >+ self.pre_call_stmts += [f"{str(store_arg.type)} {str(store_arg.name)} {{ }};"] >+ self.in_exprs += [cpp_expr(store_arg.type, store_arg.name)] >+ webkit_ipc_type = webkit_ipc_types[a.type] >+ self.out_exprs += [webkit_ipc_convert_expr(cpp_expr(store_arg.type, store_arg.name), webkit_ipc_type)] >+ else: >+ assert a.type.is_reference() >+ webkit_ipc_type = webkit_ipc_types[a.type] >+ value_arg = cpp_arg(a.type.get_value_type(), a.name) >+ self.pre_call_stmts += [f"{self.ns(value_arg.type)} {str(value_arg.name)} {{ }};"] >+ e = cpp_expr(value_arg.type, value_arg.name) >+ self.in_exprs += [e] >+ self.out_exprs += [webkit_ipc_move_expr(webkit_ipc_convert_expr(e, webkit_ipc_type))] >+ >+ def process_return_value(self, return_type: cpp_type): >+ if return_type.is_void(): >+ return >+ ipc_return_type = webkit_ipc_types[return_type] >+ return_value_expr = cpp_expr(return_type, "returnValue") >+ self.pre_call_stmts += [f"{return_value_expr.type} {return_value_expr.expr} = {{ }};"] >+ self.out_exprs += [webkit_ipc_move_expr(webkit_ipc_convert_expr(return_value_expr, ipc_return_type))] >+ self.return_value_expr = return_value_expr >+ >+ def __str__(self): >+ body = "".join(f"\n {b}" for b in self.pre_call_stmts + self.call_stmts + self.post_call_stmts) >+ return f""" void {self.name}{self.overload_suffix}({str(self.args)}) >+ {{{body} >+ }}""" >+ >+ def ns(self, type: cpp_type): >+ # TODO: namespace info is not stored in names. >+ if type.type_name == "ActiveInfo": >+ return "WebCore::GraphicsContextGL::" + str(type) >+ return str(type) >+ >+def webkit_ipc_resolve_overload_suffix(funcs : Iterable[cpp_func]): >+ counts = collections.Counter(f.name for f in funcs) >+ suffixes : Counter[str] = collections.Counter() >+ for f in funcs: >+ if counts[f.name] > 1: >+ f.overload_suffix = str(suffixes[f.name]) >+ suffixes.update([f.name]) >+ >+ >+class context_cpp_webkit_ipc_generator(object): >+ "RemoteGraphicsContextGL C++ implementation generator." >+ impls: List[webkit_ipc_cpp_impl] >+ >+ def __init__(self, funcs: Iterable[cpp_func]): >+ self.impls = [webkit_ipc_cpp_impl(f) for f in funcs] >+ >+ def get_functions(self): >+ return "\n".join(str(i) for i in self.impls) >+ >+ def generate(self): >+ write_file( >+ context_functions_fn, >+ context_functions_template.format(self.get_functions()), >+ ) >+ >+ >+class context_msg_webkit_ipc_generator(object): >+ "RemoteGraphicsContextGL WebKit IPC message definition generator." >+ msgs: List[webkit_ipc_msg] >+ >+ def __init__(self, funcs: Iterable[cpp_func]): >+ self.msgs = [webkit_ipc_msg(f) for f in funcs] >+ >+ def get_messages(self): >+ return "".join(str(m) for m in self.msgs) >+ >+ def generate(self): >+ write_file(context_messages_fn, context_messages_template.format(self.get_messages())) >+ >+ >+def create_cpp_arg(arg_spec: str, arg_index: int): >+ r = arg_spec.rsplit(" ", 1) >+ name = "" >+ type = None >+ if len(r) > 1 and r[0] != "const": >+ name = r[1].strip() >+ type = get_cpp_type(r[0]) >+ else: >+ name = "arg{}".format(arg_index) >+ type = get_cpp_type(arg_spec) >+ return cpp_arg(type, name) >+ >+ >+def create_cpp_arg_list(args_specs: Iterable[str]): >+ return cpp_arg_list([create_cpp_arg(arg_spec=e, arg_index=i) for i, e in enumerate(args_specs)]) >+ >+ >+def create_cpp_func(name: str, return_spec: str, args_specs: List[str], is_extension: bool): >+ return cpp_func(name=name, return_type=get_cpp_type(return_spec), args=create_cpp_arg_list(args_specs), is_extension=is_extension) >+ >+ >+def read_lines_until(lines : Iterable[str], match : str) -> Generator[str, None, None]: >+ for line in lines: >+ if re.match(match, line.strip()): >+ break >+ yield line >+ >+def main(): >+ parser = argparse.ArgumentParser("usage: %prog [options]") >+ parser.add_argument("--verbose", action="store_true", help="Print some debug info from the generator script") >+ options = parser.parse_args() >+ >+ # Construct the list of functions to remote from web process to GPU process. >+ >+ # FIXME: Until extensions header is removed, we need to complicate the implementation >+ # with the distinction of whether a function is or is not an extension function. >+ extension_signatures : Set[str] = set() >+ with open(extensions_input_fn) as f: >+ for line in f.readlines(): >+ m = re.match(r".*virtual (\S+)\s+(\w+)\((.*)\) = 0;", line) >+ if m: >+ func = create_cpp_func( >+ name=m[2], >+ return_spec=m[1], >+ args_specs=cpp_split_args_specs(m[3]), >+ is_extension=True, >+ ) >+ extension_signatures.update([str(func)]) >+ funcs = [] >+ unimplemented = [] >+ for fn in functions_input_fns: >+ with open(fn) as f: >+ lines = iter(f.readlines()) >+ for _ in read_lines_until(lines, "// Functions with a generated implementation. This list is used by generate-gpup-webgl script."): >+ pass >+ >+ for line in read_lines_until(lines, "// End of list used by generate-gpup-webgl script."): >+ m = re.match(r"\s*(\S+)\s+(\w+)\((.*)\) final;", line) >+ if m: >+ func_name = m[2] >+ func = create_cpp_func( >+ name=func_name, >+ return_spec=m[1], >+ args_specs=cpp_split_args_specs(m[3]), >+ is_extension=False, >+ ) >+ func.is_extension = str(func) in extension_signatures >+ if func.is_implemented(): >+ funcs.append(func) >+ else: >+ unimplemented.append(func) >+ >+ >+ webkit_ipc_resolve_overload_suffix(funcs) >+ # Initialize WebKit IPC generation. Construct type mappings for the used C++ types -> IPC types. >+ # TODO: namespacing issues. >+ ai_type = get_cpp_type("ActiveInfo&") >+ ai_transfer_type = get_cpp_type("WebCore::GraphicsContextGL::ActiveInfo") >+ webkit_ipc_types[ai_type] = ai_transfer_type >+ >+ with open(types_input_fn) as f: >+ lines = iter(f.readlines()) >+ for _ in read_lines_until(lines, "// The GCGL types map to following WebKit IPC types. The list is used by generate-gpup-webgl script."): >+ pass >+ for line in read_lines_until(lines, "// End of list used by generate-gpup-webgl script."): >+ m = re.match(r".*static_assert\(std::is_same_v<(\w+), (\w+)>\);", line) >+ if m: >+ webkit_ipc_types[get_cpp_type(m[1])] = get_cpp_type(m[2]) >+ continue >+ m = re.match(r".*static_assert\(sizeof\((\w+)\) == sizeof\((\w+)\) && sizeof\((\w+)\) == sizeof\((\w+)\)\);", line) >+ if m: >+ cpp_type = get_cpp_type(m[1]) >+ ipc_type = get_cpp_type(m[2]) >+ cpp_cast_through_type = get_cpp_type(m[4]) >+ webkit_ipc_types[cpp_type] = ipc_type >+ webkit_ipc_types_converters[(cpp_type, ipc_type)] = cpp_reinterpret_cast_from_pointer_through(cpp_cast_through_type) >+ webkit_ipc_types_converters[(ipc_type, cpp_type)] = cpp_reinterpret_cast_to_pointer_through(cpp_cast_through_type) >+ continue >+ m = re.match(r".*static_assert\(sizeof\((\w+)\) == sizeof\((\w+)\)\);", line) >+ if m: >+ cpp_type = get_cpp_type(m[1]) >+ ipc_type = get_cpp_type(m[2]) >+ webkit_ipc_types[cpp_type] = ipc_type >+ webkit_ipc_types_converters[(cpp_type, ipc_type)] = cpp_static_cast >+ webkit_ipc_types_converters[(ipc_type, cpp_type)] = cpp_static_cast >+ continue >+ # For all types in the input API, form corresponding IPC types and conversions. >+ # TODO: this is not driven by the typing. >+ all_types = set() >+ for func in funcs: >+ all_types.update(func.args.types() + [func.return_type]) >+ # Sort by len so that template args come before templates. >+ for cpp_type in sorted(all_types, key=lambda x: len(x.type_name)): >+ if cpp_type in webkit_ipc_types: >+ continue >+ >+ if cpp_type.is_dynamic_span() or cpp_type.is_span(): >+ transfer_type = webkit_ipc_get_span_transfer_type(cpp_type) >+ webkit_ipc_types[cpp_type] = transfer_type.get_value_type() >+ if cpp_type.get_contained_type().is_const(): >+ webkit_ipc_types_converters[(cpp_type, transfer_type)] = webkit_ipc_span_transfer_type_reinterpret_cast_conversion >+ webkit_ipc_types_converters[(transfer_type, cpp_type)] = webkit_ipc_make_gcglspan_conversion >+ else: >+ store_type = webkit_ipc_get_span_store_type(cpp_type) >+ webkit_ipc_types_converters[(store_type, transfer_type)] = cpp_array_reinterpret_cast_conversion >+ elif cpp_type.is_reference() or cpp_type.is_const_reference() or cpp_type.is_container(): >+ value_type = cpp_type.get_value_type() if not cpp_type.is_container() else cpp_type >+ if value_type.is_container(): >+ contained_type = value_type.get_contained_type() >+ webkit_ipc_contained_type = webkit_ipc_types[contained_type] >+ if webkit_ipc_contained_type == contained_type: >+ webkit_ipc_types[cpp_type] = value_type >+ else: >+ transfer_type = get_cpp_type(f"{value_type.get_container_name()}<{str(webkit_ipc_contained_type)}>") >+ webkit_ipc_types[cpp_type] = transfer_type >+ # TODO: Here might be case where Vector<GCGLint> was used in the interface and Vector<int32_t> is used >+ # in the IPC definition. There is no sensible way to do this at the moment. We do not convert, rather >+ # expect that all the invocations are taken care of the fact that GCGLint is the same type as int32_t. >+ # This will not hold for all types such as GCGLboolean. >+ #webkit_ipc_types_converters[(cpp_type, transfer_type)] = cpp_array_reinterpret_cast_conversion >+ else: >+ webkit_ipc_types[cpp_type] = value_type >+ else: >+ webkit_ipc_types[cpp_type] = cpp_type.get_value_type() >+ >+ # The input to the generators is list of functions to remote. >+ # Run the various generators. >+ generators = [ >+ context_proxy_cpp_webkit_ipc_generator(funcs, unimplemented), >+ context_msg_webkit_ipc_generator(funcs), >+ context_cpp_webkit_ipc_generator(funcs), >+ ] >+ for g in generators: >+ g.generate() >+ >+ if options.verbose: >+ print("Implemented:") >+ print("".join(f" {str(i)} final\n" for i in funcs)) >+ print("Unimplemented:") >+ print("".join(f" {str(u)} final\n" for u in unimplemented)) >+ print(f"Implemented: {len(funcs)}, unimplemented: {len(unimplemented)}, total: {len(funcs)+len(unimplemented)}") >+ print("C++ type map to WebKit IPC type map:") >+ for _, t in cpp_types.items(): >+ if t in webkit_ipc_types: >+ print(f" {str(t)} -> {str(webkit_ipc_types[t])}") >+ print("C++ types without WebKit IPC type:") >+ for _, t in cpp_types.items(): >+ if t not in webkit_ipc_types: >+ print(f" {str(t)}") >+ print("WebKit IPC type conversions") >+ for (a, b), converter in webkit_ipc_types_converters.items(): >+ print(f" {str(a)} -> {str(b)} : {converter.__name__}") >+ print("Done.") >+ return 0 >+ >+ >+if __name__ == "__main__": >+ sys.exit(main()) >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 0d385bcd50ff82512e56b19608dbd3816297b468..885ef77083b377af9aad5b2827517c260deb30aa 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,20 @@ >+2020-12-01 Kimmo Kinnunen <kkinnunen@apple.com> >+ >+ Implement RemoteGraphicsContextGL >+ https://bugs.webkit.org/show_bug.cgi?id=217216 >+ <rdar://problem/69876258> >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Implements a beginning of a remote version of GraphicsContextGL for GPU >+ process. Current implementation is using WebKit IPC. >+ >+ Adds test expectations for the missing functionality. Does not yet >+ enable the tests that actually pass but which were skipped before the >+ implementation. >+ >+ * gpu-process/TestExpectations: >+ > 2020-11-29 Lauro Moura <lmoura@igalia.com> > > [GTK] Gardening WebGL failures >diff --git a/LayoutTests/gpu-process/TestExpectations b/LayoutTests/gpu-process/TestExpectations >index a22528fa1b2678731853058003390fd7537dc0c6..da56386289d6c94d4ffaeca89ad2ba993b1016c9 100644 >--- a/LayoutTests/gpu-process/TestExpectations >+++ b/LayoutTests/gpu-process/TestExpectations >@@ -317,6 +317,14 @@ http/tests/security/webgl-remote-read-remote-image-allowed-with-credentials.html > http/tests/webgl [ Skip ] > js/shared-array-buffer-webgl.html [ Skip ] > >+webkit.org/b/218184 fast/canvas/webgl/texImage2D-mse-flipY-false.html [ Timeout ] >+webkit.org/b/218184 fast/canvas/webgl/texImage2D-mse-flipY-true.html [ Timeout ] >+webkit.org/b/219349 fast/canvas/webgl/context-update-on-display-configuration.html [ Timeout ] >+webkit.org/b/219349 fast/canvas/webgl/webglcontextchangedevent.html [ Timeout ] >+webkit.org/b/219351 fast/canvas/webgl/gl-pixelstorei.html [ Failure ] >+webkit.org/b/219351 fast/canvas/webgl/premultiplyalpha-test.html [ Failure ] >+webkit.org/b/219352 fast/canvas/webgl/lose-context-on-status-failure.html [ Failure ] >+ > webgpu [ Skip ] > > accessibility/press-works-on-control-types.html [ Skip ]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 217216
:
413049
|
414787
|
414797
|
415024
|
415117
|
415121
|
415122
|
415123
|
415124
|
415125
|
415126
|
415127
|
415128
|
415129
|
415131
|
415135
|
415202
|
415216
|
415218
|
415219
|
415220
|
415221
|
415223
|
415285
|
415297
|
415394
|
415724
|
415727
|
415729
|
415739