Title: [274860] trunk/Source
Revision
274860
Author
[email protected]
Date
2021-03-23 03:57:15 -0700 (Tue, 23 Mar 2021)

Log Message

Move instanced drawing functionality from ExtensionsGL to GraphicsContextGL
https://bugs.webkit.org/show_bug.cgi?id=223179

Patch by Kimmo Kinnunen <[email protected]> on 2021-03-23
Reviewed by Kenneth Russell.

Remove unused instanced rendering functions from ExtensionsGL.
They are already in GraphicsContextGL interfaces.
ExtensionsGL is being removed as it is redundant. The extension object
is the same object as the context object and not useful.

Source/WebCore:

* platform/graphics/ExtensionsGL.h:
* platform/graphics/angle/ExtensionsGLANGLE.cpp:
* platform/graphics/angle/ExtensionsGLANGLE.h:
* platform/graphics/opengl/ExtensionsGLOpenGL.h:

Source/WebKit:

* GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
* GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:
(drawBuffersEXT):
* WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
* WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (274859 => 274860)


--- trunk/Source/WebCore/ChangeLog	2021-03-23 10:54:36 UTC (rev 274859)
+++ trunk/Source/WebCore/ChangeLog	2021-03-23 10:57:15 UTC (rev 274860)
@@ -1,5 +1,22 @@
 2021-03-23  Kimmo Kinnunen  <[email protected]>
 
+        Move instanced drawing functionality from ExtensionsGL to GraphicsContextGL
+        https://bugs.webkit.org/show_bug.cgi?id=223179
+
+        Reviewed by Kenneth Russell.
+
+        Remove unused instanced rendering functions from ExtensionsGL.
+        They are already in GraphicsContextGL interfaces.
+        ExtensionsGL is being removed as it is redundant. The extension object
+        is the same object as the context object and not useful.
+
+        * platform/graphics/ExtensionsGL.h:
+        * platform/graphics/angle/ExtensionsGLANGLE.cpp:
+        * platform/graphics/angle/ExtensionsGLANGLE.h:
+        * platform/graphics/opengl/ExtensionsGLOpenGL.h:
+
+2021-03-23  Kimmo Kinnunen  <[email protected]>
+
         ANGLE is missing the explicit context headers
         https://bugs.webkit.org/show_bug.cgi?id=223470
 

Modified: trunk/Source/WebCore/platform/graphics/ExtensionsGL.h (274859 => 274860)


--- trunk/Source/WebCore/platform/graphics/ExtensionsGL.h	2021-03-23 10:54:36 UTC (rev 274859)
+++ trunk/Source/WebCore/platform/graphics/ExtensionsGL.h	2021-03-23 10:57:15 UTC (rev 274860)
@@ -287,11 +287,6 @@
     // GL_ARB_draw_buffers / GL_EXT_draw_buffers
     virtual void drawBuffersEXT(GCGLSpan<const GCGLenum> bufs) = 0;
 
-    // GL_ANGLE_instanced_arrays
-    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;
-
     // Other functions.
 #if !USE(ANGLE)
     // EXT Robustness - uses getGraphicsResetStatusARB

Modified: trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp (274859 => 274860)


--- trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp	2021-03-23 10:54:36 UTC (rev 274859)
+++ trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp	2021-03-23 10:57:15 UTC (rev 274860)
@@ -120,30 +120,6 @@
     gl::DrawBuffersEXT(bufs.bufSize, bufs.data);
 }
 
-void ExtensionsGLANGLE::drawArraysInstancedANGLE(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount)
-{
-    if (!m_context->makeContextCurrent())
-        return;
-
-    gl::DrawArraysInstancedANGLE(mode, first, count, 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*>(offset), primcount);
-}
-
-void ExtensionsGLANGLE::vertexAttribDivisorANGLE(GCGLuint index, GCGLuint divisor)
-{
-    if (!m_context->makeContextCurrent())
-        return;
-
-    gl::VertexAttribDivisorANGLE(index, divisor);
-}
-
 String ExtensionsGLANGLE::getExtensions()
 {
     return String(reinterpret_cast<const char*>(gl::GetString(GL_EXTENSIONS)));

Modified: trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h (274859 => 274860)


--- trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h	2021-03-23 10:54:36 UTC (rev 274859)
+++ trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h	2021-03-23 10:57:15 UTC (rev 274860)
@@ -51,10 +51,6 @@
 
     String getTranslatedShaderSourceANGLE(PlatformGLObject) override;
 
-    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;
-
     // Only for non-WebGL 2.0 contexts.
     GCGLenum adjustWebGL1TextureInternalFormat(GCGLenum internalformat, GCGLenum format, GCGLenum type);
 

Modified: trunk/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGL.h (274859 => 274860)


--- trunk/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGL.h	2021-03-23 10:54:36 UTC (rev 274859)
+++ trunk/Source/WebCore/platform/graphics/opengl/ExtensionsGLOpenGL.h	2021-03-23 10:57:15 UTC (rev 274860)
@@ -47,9 +47,9 @@
     void bindVertexArrayOES(PlatformGLObject) override;
     void drawBuffersEXT(GCGLSpan<const GCGLenum>) override;
 
-    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;
+    void drawArraysInstancedANGLE(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount);
+    void drawElementsInstancedANGLE(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLvoidptr offset, GCGLsizei primcount);
+    void vertexAttribDivisorANGLE(GCGLuint index, GCGLuint divisor);
 
 protected:
     bool supportsExtension(const WTF::String&) override;

Modified: trunk/Source/WebKit/ChangeLog (274859 => 274860)


--- trunk/Source/WebKit/ChangeLog	2021-03-23 10:54:36 UTC (rev 274859)
+++ trunk/Source/WebKit/ChangeLog	2021-03-23 10:57:15 UTC (rev 274860)
@@ -1,3 +1,21 @@
+2021-03-23  Kimmo Kinnunen  <[email protected]>
+
+        Move instanced drawing functionality from ExtensionsGL to GraphicsContextGL
+        https://bugs.webkit.org/show_bug.cgi?id=223179
+
+        Reviewed by Kenneth Russell.
+
+        Remove unused instanced rendering functions from ExtensionsGL.
+        They are already in GraphicsContextGL interfaces.
+        ExtensionsGL is being removed as it is redundant. The extension object
+        is the same object as the context object and not useful.
+
+        * GPUProcess/graphics/RemoteGraphicsContextGL.messages.in:
+        * GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h:
+        (drawBuffersEXT):
+        * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h:
+        * WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp:
+
 2021-03-23  Youenn Fablet  <[email protected]>
 
         Enable webrtc GPU Process feature flag

Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in (274859 => 274860)


--- trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in	2021-03-23 10:54:36 UTC (rev 274859)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGL.messages.in	2021-03-23 10:57:15 UTC (rev 274860)
@@ -279,9 +279,6 @@
     void GetGraphicsResetStatusARB() -> (int32_t returnValue) Synchronous
     void GetTranslatedShaderSourceANGLE(uint32_t arg0) -> (String returnValue) Synchronous
     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)
     void GetInternalformativ(uint32_t target, uint32_t internalformat, uint32_t pname, uint64_t paramsSize) -> (IPC::ArrayReference<int32_t> params) Synchronous
     void MultiDrawArraysANGLE(uint32_t mode, IPC::ArrayReference<int32_t> firsts, IPC::ArrayReference<int32_t> counts, int32_t drawcount)
     void MultiDrawArraysInstancedANGLE(uint32_t mode, IPC::ArrayReference<int32_t> firsts, IPC::ArrayReference<int32_t> counts, IPC::ArrayReference<int32_t> instanceCounts, int32_t drawcount)

Modified: trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h (274859 => 274860)


--- trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h	2021-03-23 10:54:36 UTC (rev 274859)
+++ trunk/Source/WebKit/GPUProcess/graphics/RemoteGraphicsContextGLFunctionsGenerated.h	2021-03-23 10:57:15 UTC (rev 274860)
@@ -1114,18 +1114,6 @@
     {
         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);
-    }
     void getInternalformativ(uint32_t target, uint32_t internalformat, uint32_t pname, uint64_t paramsSize, CompletionHandler<void(IPC::ArrayReference<int32_t>)>&& completionHandler)
     {
         Vector<GCGLint, 4> params(static_cast<size_t>(paramsSize), 0);

Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h (274859 => 274860)


--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h	2021-03-23 10:54:36 UTC (rev 274859)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxy.h	2021-03-23 10:57:15 UTC (rev 274860)
@@ -310,9 +310,6 @@
     GCGLint getGraphicsResetStatusARB() final;
     String getTranslatedShaderSourceANGLE(PlatformGLObject arg0) 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, GCGLSpan<GCGLint> params) final;
     void multiDrawArraysANGLE(GCGLenum mode, GCGLSpan<const GCGLint> firsts, GCGLSpan<const GCGLsizei> counts, GCGLsizei drawcount) final;
     void multiDrawArraysInstancedANGLE(GCGLenum mode, GCGLSpan<const GCGLint> firsts, GCGLSpan<const GCGLsizei> counts, GCGLSpan<const GCGLsizei> instanceCounts, GCGLsizei drawcount) final;

Modified: trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp (274859 => 274860)


--- trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp	2021-03-23 10:54:36 UTC (rev 274859)
+++ trunk/Source/WebKit/WebProcess/GPU/graphics/RemoteGraphicsContextGLProxyFunctionsGenerated.cpp	2021-03-23 10:57:15 UTC (rev 274860)
@@ -2318,33 +2318,6 @@
     }
 }
 
-void RemoteGraphicsContextGLProxy::drawArraysInstancedANGLE(GCGLenum mode, GCGLint first, GCGLsizei count, GCGLsizei primcount)
-{
-    if (!isContextLost()) {
-        auto sendResult = send(Messages::RemoteGraphicsContextGL::DrawArraysInstancedANGLE(mode, first, count, primcount));
-        if (!sendResult)
-            markContextLost();
-    }
-}
-
-void RemoteGraphicsContextGLProxy::drawElementsInstancedANGLE(GCGLenum mode, GCGLsizei count, GCGLenum type, GCGLvoidptr offset, GCGLsizei primcount)
-{
-    if (!isContextLost()) {
-        auto sendResult = send(Messages::RemoteGraphicsContextGL::DrawElementsInstancedANGLE(mode, count, type, static_cast<uint64_t>(offset), primcount));
-        if (!sendResult)
-            markContextLost();
-    }
-}
-
-void RemoteGraphicsContextGLProxy::vertexAttribDivisorANGLE(GCGLuint index, GCGLuint divisor)
-{
-    if (!isContextLost()) {
-        auto sendResult = send(Messages::RemoteGraphicsContextGL::VertexAttribDivisorANGLE(index, divisor));
-        if (!sendResult)
-            markContextLost();
-    }
-}
-
 void RemoteGraphicsContextGLProxy::getInternalformativ(GCGLenum target, GCGLenum internalformat, GCGLenum pname, GCGLSpan<GCGLint> params)
 {
     IPC::ArrayReference<int32_t> paramsReply;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to