Title: [250740] trunk/Source/WebCore
- Revision
- 250740
- Author
- commit-qu...@webkit.org
- Date
- 2019-10-04 12:57:20 -0700 (Fri, 04 Oct 2019)
Log Message
Allow using WebGL 2 when USE_ANGLE=1
https://bugs.webkit.org/show_bug.cgi?id=202593
Patch by James Darpinian <jdarpin...@chromium.org> on 2019-10-04
Reviewed by Alex Christensen.
* html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::create):
Disable irrelevant extension check.
* platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
(WebCore::GraphicsContext3D::GraphicsContext3D):
Use ES3 ANGLE context when WebGL 2 is requested.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (250739 => 250740)
--- trunk/Source/WebCore/ChangeLog 2019-10-04 19:33:00 UTC (rev 250739)
+++ trunk/Source/WebCore/ChangeLog 2019-10-04 19:57:20 UTC (rev 250740)
@@ -1,3 +1,17 @@
+2019-10-04 James Darpinian <jdarpin...@chromium.org>
+
+ Allow using WebGL 2 when USE_ANGLE=1
+ https://bugs.webkit.org/show_bug.cgi?id=202593
+
+ Reviewed by Alex Christensen.
+
+ * html/canvas/WebGLRenderingContextBase.cpp:
+ (WebCore::WebGLRenderingContextBase::create):
+ Disable irrelevant extension check.
+ * platform/graphics/cocoa/GraphicsContext3DCocoa.mm:
+ (WebCore::GraphicsContext3D::GraphicsContext3D):
+ Use ES3 ANGLE context when WebGL 2 is requested.
+
2019-10-04 Alex Christensen <achristen...@webkit.org>
Stop sending list of display-isolated schemes to NetworkProcess
Modified: trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp (250739 => 250740)
--- trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp 2019-10-04 19:33:00 UTC (rev 250739)
+++ trunk/Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp 2019-10-04 19:57:20 UTC (rev 250740)
@@ -611,7 +611,7 @@
if (extensions.supports("GL_EXT_debug_marker"_s))
extensions.pushGroupMarkerEXT("WebGLRenderingContext"_s);
-#if ENABLE(WEBGL2) && PLATFORM(MAC)
+#if ENABLE(WEBGL2) && PLATFORM(MAC) && !USE(ANGLE)
// glTexStorage() was only added to Core in OpenGL 4.2.
// However, according to https://developer.apple.com/opengl/capabilities/ all Apple GPUs support this extension.
if (attributes.isWebGL2 && !extensions.supports("GL_ARB_texture_storage"))
Modified: trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm (250739 => 250740)
--- trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm 2019-10-04 19:33:00 UTC (rev 250739)
+++ trunk/Source/WebCore/platform/graphics/cocoa/GraphicsContext3DCocoa.mm 2019-10-04 19:57:20 UTC (rev 250740)
@@ -325,11 +325,16 @@
}
std::vector<EGLint> contextAttributes;
- contextAttributes.push_back(EGL_CONTEXT_CLIENT_VERSION);
- contextAttributes.push_back(2);
- // ANGLE will upgrade the context to ES3 automatically unless this is specified.
- contextAttributes.push_back(EGL_CONTEXT_OPENGL_BACKWARDS_COMPATIBLE_ANGLE);
- contextAttributes.push_back(EGL_FALSE);
+ if (attrs.isWebGL2) {
+ contextAttributes.push_back(EGL_CONTEXT_CLIENT_VERSION);
+ contextAttributes.push_back(3);
+ } else {
+ contextAttributes.push_back(EGL_CONTEXT_CLIENT_VERSION);
+ contextAttributes.push_back(2);
+ // ANGLE will upgrade the context to ES3 automatically unless this is specified.
+ contextAttributes.push_back(EGL_CONTEXT_OPENGL_BACKWARDS_COMPATIBLE_ANGLE);
+ contextAttributes.push_back(EGL_FALSE);
+ }
contextAttributes.push_back(EGL_CONTEXT_WEBGL_COMPATIBILITY_ANGLE);
contextAttributes.push_back(EGL_TRUE);
if (strstr(displayExtensions, "EGL_ANGLE_power_preference")) {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes