Bug 204446

Summary: [GTK] Check EGL image extension by using native gl API in AcceleratedBackingStoreWayland
Product: WebKit Reporter: ChangSeok Oh <changseok>
Component: WebKitGTKAssignee: ChangSeok Oh <changseok>
Status: RESOLVED FIXED    
Severity: Normal CC: bugs-noreply, cgarcia, commit-queue, zan
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 199060    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

ChangSeok Oh
Reported 2019-11-21 00:28:05 PST
This is part of efforts bringing ANGLE support for WebGL to gtk port.
Attachments
Patch (4.46 KB, patch)
2019-11-21 00:50 PST, ChangSeok Oh
no flags
Patch (4.51 KB, patch)
2019-11-21 01:07 PST, ChangSeok Oh
no flags
Patch (4.13 KB, patch)
2019-11-23 01:54 PST, ChangSeok Oh
no flags
ChangSeok Oh
Comment 1 2019-11-21 00:50:27 PST
ChangSeok Oh
Comment 2 2019-11-21 01:07:59 PST
Carlos Garcia Campos
Comment 3 2019-11-22 05:04:04 PST
Comment on attachment 384035 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=384035&action=review > Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:84 > + if (!availableExtensions.contains("GL_ARB_texture_storage"_s)) { > + GLint majorVersion; > + ::glGetIntegerv(GL_MAJOR_VERSION, &majorVersion); > + GLint minorVersion; > + ::glGetIntegerv(GL_MINOR_VERSION, &minorVersion); > + if (majorVersion > 4 || (majorVersion == 4 && minorVersion >= 2)) > + availableExtensions.add("GL_ARB_texture_storage"_s); > + } We can simply this, since are only interested in GL_OES_EGL_image and glEGLImageTargetTexture2DOES we don't need to handle this exception here for GL_ARB_texture_storage. > Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:115 > + if (availableExtensions.contains("GL_OES_EGL_image") || availableExtensions.contains("GL_OES_EGL_image_external")) If we are going to build the list of extensions here, we can simplify this even more. Let's just add checkEGLImageAvailable (or something like that) and check any of those are available using the gl api directly, instead of first building a has set to then check if any of those are present.
ChangSeok Oh
Comment 4 2019-11-23 01:54:57 PST
ChangSeok Oh
Comment 5 2019-11-23 01:55:53 PST
Comment on attachment 384035 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=384035&action=review >> Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:84 >> + } > > We can simply this, since are only interested in GL_OES_EGL_image and glEGLImageTargetTexture2DOES we don't need to handle this exception here for GL_ARB_texture_storage. You're right. >> Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp:115 >> + if (availableExtensions.contains("GL_OES_EGL_image") || availableExtensions.contains("GL_OES_EGL_image_external")) > > If we are going to build the list of extensions here, we can simplify this even more. Let's just add checkEGLImageAvailable (or something like that) and check any of those are available using the gl api directly, instead of first building a has set to then check if any of those are present. That is a good suggestion. Thanks!
WebKit Commit Bot
Comment 6 2019-11-25 02:08:46 PST
Comment on attachment 384234 [details] Patch Clearing flags on attachment: 384234 Committed r252851: <https://trac.webkit.org/changeset/252851>
WebKit Commit Bot
Comment 7 2019-11-25 02:08:48 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.