Title: [287984] trunk/Source/WebCore
Revision
287984
Author
[email protected]
Date
2022-01-13 11:11:51 -0800 (Thu, 13 Jan 2022)

Log Message

Remove the code inside USE(OPENGL) && ENABLE(WEBGL2)
https://bugs.webkit.org/show_bug.cgi?id=235178

Patch by Alejandro G. Castro <[email protected]> on 2022-01-13
Reviewed by Dean Jackson.

No port is supporting WebGL2 without ANGLE nowadays, that code is
historical and we can remove it.

* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::getRestartIndex): Deleted.
* platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
(WebCore::GraphicsContextGLOpenGL::primitiveRestartIndex): Deleted.
* platform/graphics/opengl/GraphicsContextGLOpenGL.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (287983 => 287984)


--- trunk/Source/WebCore/ChangeLog	2022-01-13 19:03:25 UTC (rev 287983)
+++ trunk/Source/WebCore/ChangeLog	2022-01-13 19:11:51 UTC (rev 287984)
@@ -1,5 +1,21 @@
 2022-01-13  Alejandro G. Castro  <[email protected]>
 
+        Remove the code inside USE(OPENGL) && ENABLE(WEBGL2)
+        https://bugs.webkit.org/show_bug.cgi?id=235178
+
+        Reviewed by Dean Jackson.
+
+        No port is supporting WebGL2 without ANGLE nowadays, that code is
+        historical and we can remove it.
+
+        * html/canvas/WebGLRenderingContextBase.cpp:
+        (WebCore::getRestartIndex): Deleted.
+        * platform/graphics/opengl/GraphicsContextGLOpenGL.cpp:
+        (WebCore::GraphicsContextGLOpenGL::primitiveRestartIndex): Deleted.
+        * platform/graphics/opengl/GraphicsContextGLOpenGL.h:
+
+2022-01-13  Alejandro G. Castro  <[email protected]>
+
         [GTK][WPE][WebGL2] compilation fixes
         https://bugs.webkit.org/show_bug.cgi?id=225563
 

Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (287983 => 287984)


--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2022-01-13 19:03:25 UTC (rev 287983)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp	2022-01-13 19:11:51 UTC (rev 287984)
@@ -2766,22 +2766,6 @@
     markContextChangedAndNotifyCanvasObserver();
 }
 
-#if USE(OPENGL) && ENABLE(WEBGL2)
-static GCGLuint getRestartIndex(GCGLenum type)
-{
-    switch (type) {
-    case GraphicsContextGL::UNSIGNED_BYTE:
-        return std::numeric_limits<GCGLubyte>::max();
-    case GraphicsContextGL::UNSIGNED_SHORT:
-        return std::numeric_limits<GCGLushort>::max();
-    case GraphicsContextGL::UNSIGNED_INT:
-        return std::numeric_limits<GCGLuint>::max();
-    }
-
-    return 0;
-}
-#endif
-
 void WebGLRenderingContextBase::drawElements(GCGLenum mode, GCGLsizei count, GCGLenum type, long long offset)
 {
 #if USE(ANGLE)

Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp (287983 => 287984)


--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp	2022-01-13 19:03:25 UTC (rev 287983)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.cpp	2022-01-13 19:11:51 UTC (rev 287984)
@@ -2383,16 +2383,6 @@
     getExtensions().vertexAttribDivisorANGLE(index, divisor);
 }
 
-#if HAVE(OPENGL_4) && ENABLE(WEBGL2)
-void GraphicsContextGLOpenGL::primitiveRestartIndex(GCGLuint index)
-{
-    if (!makeContextCurrent())
-        return;
-
-    ::glPrimitiveRestartIndex(index);
-}
-#endif
-
 void GraphicsContextGLOpenGL::bufferData(GCGLenum target, const void* data, GCGLenum usage, GCGLuint srcOffset, GCGLuint length)
 {
     UNUSED_PARAM(target);

Modified: trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h (287983 => 287984)


--- trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h	2022-01-13 19:03:25 UTC (rev 287983)
+++ trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h	2022-01-13 19:11:51 UTC (rev 287984)
@@ -383,11 +383,6 @@
     std::optional<PixelBuffer> readRenderingResultsForPainting();
     std::optional<PixelBuffer> readCompositedResultsForPainting();
 
-#if USE(OPENGL) && ENABLE(WEBGL2)
-    void primitiveRestartIndex(GCGLuint);
-#endif
-
-
     void setContextVisibility(bool) final;
 
     // Support for buffer creation and deletion
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to