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-174249-20170724182314.patch (text/plain), 7.94 KB, created by
Zan Dobersek
on 2017-07-24 09:23:15 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Zan Dobersek
Created:
2017-07-24 09:23:15 PDT
Size:
7.94 KB
patch
obsolete
>Subversion Revision: 219820 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 07d9f254d3679a3216034bf83b162937f2f2e9fa..2db2b2a53b54c4876cfe2215a4385b31f85b2ee7 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,5 +1,43 @@ > 2017-07-24 Zan Dobersek <zdobersek@igalia.com> > >+ [WPE] WebGL2 support >+ https://bugs.webkit.org/show_bug.cgi?id=174249 >+ >+ Reviewed by Alex Christensen. >+ >+ Implement WebGL2 support in GraphicsContext3DCairo for the WPE port, but keep >+ the implementation specific to libepoxy (which WPE leverages by default). >+ >+ In the GraphicsContext3D::create() method, we first construct the >+ GraphicsContext3D object that also ensures a current GL context on this thread. >+ Only then can we determine through libepoxy whether the underlying GL library >+ is able to support WebGL2. >+ >+ For WebGL2, the GLES3 support is required. The initial libepoxy implementation >+ ensures this only in case of 'non-desktop GL' library of minimum version 3.0. >+ This effectively translates to the only supported configuration being the >+ EGL and OpenGL ES 3.0 (or higher) combination. If this cannot be ensured, we >+ discard the existing GraphicsContext3D object and return null. >+ >+ WebGL2 can also be supported via OpenGL (i.e. 'desktop GL'), but this hasn't >+ been tested yet. Implementation will in the future be extended to support that >+ as required. >+ >+ In the GraphicsContext3D constructor itself, the ANGLEWebKitBridge constructor >+ has to now receive the second argument, the desired shader specification that's >+ used when parsing the provided shaders. This should be SH_WEBGL_SPEC for WebGL1, >+ and SH_WEBGL2_SPEC for WebGL2. >+ >+ No new tests -- a small set of existing WebGL2 tests is unskipped and passing. >+ >+ * platform/graphics/cairo/GraphicsContext3DCairo.cpp: >+ (WebCore::GraphicsContext3D::create): >+ (WebCore::GraphicsContext3D::GraphicsContext3D): >+ * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp: >+ Add WebGL2-specific methods to the build. >+ >+2017-07-24 Zan Dobersek <zdobersek@igalia.com> >+ > [WPE] libepoxy headers can use EGL_CAST, which might not be defined by eglplatform.h > https://bugs.webkit.org/show_bug.cgi?id=174780 > >diff --git a/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp b/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp >index bbdfce4b9cc282f8abc10228441e5ab9e3a1ac6a..2b126b2aabda8da770975298036786365e5b5a86 100644 >--- a/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp >+++ b/Source/WebCore/platform/graphics/cairo/GraphicsContext3DCairo.cpp >@@ -82,7 +82,16 @@ RefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3DAttributes > if (!success) > return 0; > >- return adoptRef(new GraphicsContext3D(attributes, hostWindow, renderStyle)); >+ // Create the GraphicsContext3D object first in order to establist a current context on this thread. >+ auto context = adoptRef(new GraphicsContext3D(attributes, hostWindow, renderStyle)); >+ >+#if USE(LIBEPOXY) && USE(OPENGL_ES_2) >+ // Bail if GLES3 was requested but cannot be provided. >+ if (attributes.useGLES3 && !epoxy_is_desktop_gl() && epoxy_gl_version() < 30) >+ return nullptr; >+#endif >+ >+ return context; > } > > GraphicsContext3D::GraphicsContext3D(GraphicsContext3DAttributes attributes, HostWindow*, GraphicsContext3D::RenderStyle renderStyle) >@@ -181,7 +190,8 @@ GraphicsContext3D::GraphicsContext3D(GraphicsContext3DAttributes attributes, Hos > ::glEnable(GL_POINT_SPRITE); > } > #else >- m_compiler = ANGLEWebKitBridge(SH_ESSL_OUTPUT); >+ // Adjust the shader specification depending on whether GLES3 (i.e. WebGL2 support) was requested. >+ m_compiler = ANGLEWebKitBridge(SH_ESSL_OUTPUT, m_attrs.useGLES3 ? SH_WEBGL2_SPEC : SH_WEBGL_SPEC); > #endif > > // ANGLE initialization. >diff --git a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp >index 9cb3c864bdad25f9311d4db7191d39877fd988b7..475568cbdab8c71c062c345217f7992cca4bccb1 100644 >--- a/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp >+++ b/Source/WebCore/platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp >@@ -559,7 +559,7 @@ void GraphicsContext3D::bufferSubData(GC3Denum target, GC3Dintptr offset, GC3Dsi > ::glBufferSubData(target, offset, size, data); > } > >-#if PLATFORM(MAC) || PLATFORM(IOS) >+#if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(WPE) > void* GraphicsContext3D::mapBufferRange(GC3Denum target, GC3Dintptr offset, GC3Dsizeiptr length, GC3Dbitfield access) > { > makeContextCurrent(); >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index e7adf591fb39d35779c175f545ab352ddd1bfc6f..d281d8200e616b1f4a7b18b971d69f1ff8b9924d 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,5 +1,15 @@ > 2017-07-24 Zan Dobersek <zdobersek@igalia.com> > >+ [WPE] WebGL2 support >+ https://bugs.webkit.org/show_bug.cgi?id=174249 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Scripts/webkitperl/FeatureList.pm: >+ Enable WebGL2 for WPE when building through build-webkit. >+ >+2017-07-24 Zan Dobersek <zdobersek@igalia.com> >+ > [WPE] Add libepoxy to the Jhbuild moduleset > https://bugs.webkit.org/show_bug.cgi?id=174711 > >diff --git a/Tools/Scripts/webkitperl/FeatureList.pm b/Tools/Scripts/webkitperl/FeatureList.pm >index 5cd28636fcf36ac1af875ed09f2ce12567238afc..14b2964734a1177e0f1263301d4f54663e943f11 100644 >--- a/Tools/Scripts/webkitperl/FeatureList.pm >+++ b/Tools/Scripts/webkitperl/FeatureList.pm >@@ -399,7 +399,7 @@ my @features = ( > define => "ENABLE_WEBGL", default => (isAppleCocoaWebKit() || isGtk() || isWPE()), value => \$webglSupport }, > > { option => "webgl2", desc => "Toggle WebGL2 support", >- define => "ENABLE_WEBGL2", default => isAppleCocoaWebKit(), value => \$webgl2Support }, >+ define => "ENABLE_WEBGL2", default => (isAppleCocoaWebKit() || isWPE()), value => \$webgl2Support }, > > { option => "writableStreamAPI", desc => "Toggle WritableStream API support", > define => "ENABLE_WRITABLE_STREAM_API", default => 1, value => \$writableStreamAPISupport }, >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 4d5d6307dc56ae80d6dedb057e577eb8842f77b9..bd8e50d6bc305ee60bb25c52294a5fa9822ae159 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,14 @@ >+2017-07-24 Zan Dobersek <zdobersek@igalia.com> >+ >+ [WPE] WebGL2 support >+ https://bugs.webkit.org/show_bug.cgi?id=174249 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/wpe/TestExpectations: >+ Unskip WebGL2 tests under the webgl/ directory. More tests under fast/canvas/webgl2/ >+ will be unskipped later. >+ > 2017-07-11 Frederic Wang <fwang@igalia.com> > > Add attribute allow-top-navigation-by-user-activation to iframe sandbox >diff --git a/LayoutTests/platform/wpe/TestExpectations b/LayoutTests/platform/wpe/TestExpectations >index 3cc7e3e84a0310668c93f67651bb51e198269161..fe09b3b7c363af8f5c79a2e6de9d09e9e2d9e44e 100644 >--- a/LayoutTests/platform/wpe/TestExpectations >+++ b/LayoutTests/platform/wpe/TestExpectations >@@ -179,11 +179,6 @@ webkit.org/b/169917 webgl/1.0.2/conformance/glsl/misc/shader-uniform-packing-res > webkit.org/b/169917 webgl/1.0.2/conformance/glsl/misc/shader-with-non-reserved-words.html [ Slow ] > webkit.org/b/169917 webgl/1.0.3/conformance/rendering/many-draw-calls.html [ Slow ] > >-# WebGL2 >-Bug(WPE) webgl/webgl-vertex-array-object-defined.html [ Failure ] >-Bug(WPE) webgl/webgl2-rendering-context-defined.html [ Failure ] >-Bug(WPE) webgl/webgl2-rendering-context-obtain.html [ Failure ] >- > # security/ > # Require EventSender support > Bug(WPE) security/contentSecurityPolicy/image-with-blob-url-allowed-by-img-src-star-with-AllowContentSecurityPolicySourceStarToMatchAnyProtocol-enabled.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
Flags:
achristensen
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 174249
:
315642
|
315999
|
316031
| 316295