[Webkit-unassigned] [Bug 219421] [WinCairo] Enable USE_ANGLE

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 8 17:23:50 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=219421

--- Comment #4 from Fujii Hironori <Hironori.Fujii at sony.com> ---
Comment on attachment 415192
  --> https://bugs.webkit.org/attachment.cgi?id=415192
WIP patch

View in context: https://bugs.webkit.org/attachment.cgi?id=415192&action=review

>> Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp:1077
>> +#endif
> 
> GL_TEXTURE_RECTANGLE_ANGLE might still be supported on Windows, so this could be turned into a runtime check if you like. Granted, it'd only apply if ANGLE would run on top of GL for Windows.
> 
>  if (m_supportsTextureRectangle) 
>    gl::Disable(GL_TEXTURE_RECTANGLE_ANGLE);
> 
> check for texture rectangle might be
> GL_ARB_texture_rectangle or EGL_ANGLE_iosurface_client_buffer (not sure if how ANGLE advertises the ARB_texture_rectangle).

WebKit enables only ANGLE D3D backend on Windows at the moment.
https://trac.webkit.org/browser/webkit/trunk/Source/ThirdParty/ANGLE/PlatformWin.cmake
I tried to enable ANGLE OpenGL backend, and it turned out it's not simple task, and I gave up.

>> Source/WebCore/platform/graphics/texmap/TextureMapperGCGLPlatformLayer.cpp:107
>>          ::glBindFramebuffer(GraphicsContextGLOpenGL::FRAMEBUFFER, m_context.m_state.boundDrawFBO);
> 
> This depicts some sort of mixup. This function is probably calling directly OpenGL ES or OpenGL, where as the context above is angle context.
> I'd suggest making the includes such that compiler catches this..

Good catch.
However, because WinCairo is using both ANGLE's EGL API and ANGLE's direct API (gl::*), I think I can't do so.

>> Source/WebCore/platform/graphics/texmap/TextureMapperGCGLPlatformLayer.cpp:109
>> +        GLContext* ativeContext = GLContext::current();
> 
> If the GLContext is really useful and does something, such as makes real OpenGL or OpenGL ES context current, then it will confuse the angle context in cases where ANGLE is using OpenGL.
> In this light, it'd be maybe simpler if the ANGLE context would participate in the GLContext::current() tracking. One way to do this might be that case where ANGLEContext : public GLContext or something similar.
> 
> There's a typo, ativeContext

It should be possible. But, I don't like the idea tracking the current GL context in WebCore duplicately.
I prefer the idea deprecating GLContext::current().
ANGLEContext is a copy of Nicosia::GCGLANGLELayer::ANGLEContext.
https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/nicosia/texmap/NicosiaGCGLANGLELayer.cpp#L54
I don't want to copy the code. Unfortunately, GTK port's USE_ANGLE build is broken now.
I will merge both ANGLEContext after someone restore GTK port's USE_ANGLE build.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20201209/89cc4802/attachment-0001.htm>


More information about the webkit-unassigned mailing list