Changeset 243284 in webkit
- Timestamp:
- Mar 21, 2019, 2:44:22 AM (7 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/egl/GLContextEGL.cpp (modified) (1 diff)
-
platform/graphics/egl/GLContextEGLLibWPE.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r243279 r243284 1 2019-03-21 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [WPE] Confusing messages in stderr when surfaceless context is not supported 4 https://bugs.webkit.org/show_bug.cgi?id=195742 5 6 Reviewed by Žan Doberšek. 7 8 The messages shown are: 9 10 Cannot create EGL surfaceless context: missing EGL_KHR_surfaceless_{context,opengl} extension. 11 Cannot create EGL WPE context: EGL_SUCCESS 12 13 It seems like there's anything wrong, while there isn't. It's also confusing an error message where the error is 14 EGL_SUCCESS. I think we should not show those messages at all, not suporting surfaceless contexts is not an 15 error and it's correctly handled. Failing to get a native window handle from render backend offscreen egl target 16 is not an error either, since most of the backends don't implement the interface (they actually have an empty 17 implementation). 18 19 * platform/graphics/egl/GLContextEGL.cpp: 20 (WebCore::GLContextEGL::createSurfacelessContext): Remove the message when extensions are not present 21 * platform/graphics/egl/GLContextEGLLibWPE.cpp: 22 (WebCore::GLContextEGL::createWPEContext): Handle the case of wpe_renderer_backend_egl_offscreen_target_create() 23 returning nullptr, which can happen if the backend doesn't implement the interface. Move the context creation 24 after the target initialization, to avoid leaking the context when the target doesn't have a native window. 25 1 26 2019-03-20 Yusuke Suzuki <ysuzuki@apple.com> 2 27 -
trunk/Source/WebCore/platform/graphics/egl/GLContextEGL.cpp
r242640 r243284 234 234 235 235 const char* extensions = eglQueryString(display, EGL_EXTENSIONS); 236 if (!GLContext::isExtensionSupported(extensions, "EGL_KHR_surfaceless_context") && !GLContext::isExtensionSupported(extensions, "EGL_KHR_surfaceless_opengl")) { 237 WTFLogAlways("Cannot create EGL surfaceless context: missing EGL_KHR_surfaceless_{context,opengl} extension.\n"); 238 return nullptr; 239 } 236 if (!GLContext::isExtensionSupported(extensions, "EGL_KHR_surfaceless_context") && !GLContext::isExtensionSupported(extensions, "EGL_KHR_surfaceless_opengl")) 237 return nullptr; 240 238 241 239 EGLConfig config; -
trunk/Source/WebCore/platform/graphics/egl/GLContextEGLLibWPE.cpp
r238282 r243284 60 60 } 61 61 62 EGLContext context = createContextForEGLVersion(platformDisplay, config, sharingContext); 63 if (context == EGL_NO_CONTEXT) { 64 WTFLogAlways("Cannot create EGL WPE context: %s\n", lastErrorString()); 62 auto* target = wpe_renderer_backend_egl_offscreen_target_create(); 63 if (!target) 64 return nullptr; 65 66 wpe_renderer_backend_egl_offscreen_target_initialize(target, downcast<PlatformDisplayLibWPE>(platformDisplay).backend()); 67 EGLNativeWindowType window = wpe_renderer_backend_egl_offscreen_target_get_native_window(target); 68 if (!window) { 69 wpe_renderer_backend_egl_offscreen_target_destroy(target); 65 70 return nullptr; 66 71 } 67 72 68 auto* target = wpe_renderer_backend_egl_offscreen_target_create(); 69 wpe_renderer_backend_egl_offscreen_target_initialize(target, downcast<PlatformDisplayLibWPE>(platformDisplay).backend()); 70 EGLNativeWindowType window = wpe_renderer_backend_egl_offscreen_target_get_native_window(target); 71 if (!window) { 73 EGLContext context = createContextForEGLVersion(platformDisplay, config, sharingContext); 74 if (context == EGL_NO_CONTEXT) { 72 75 WTFLogAlways("Cannot create EGL WPE context: %s\n", lastErrorString()); 73 76 wpe_renderer_backend_egl_offscreen_target_destroy(target);
Note:
See TracChangeset
for help on using the changeset viewer.