diff options
author | Alwin Esch <alwin.esch@web.de> | 2019-01-30 18:45:18 +0100 |
---|---|---|
committer | Alwin Esch <alwin.esch@web.de> | 2019-02-08 18:28:01 +0100 |
commit | 1ce33cc65c062be273e6a1db34a79a4870dfaeea (patch) | |
tree | 0be28b19b881374bec824077ecd78ad0d75f43d0 | |
parent | e393a31a44d6046e34641bee7630c454a335b343 (diff) |
X11: remove not needed CGLContextEGL::IsSuitableVisual
This calls GetEGLConfig which becomes also called direct after
the place where IsSuitableVisual is called.
-rw-r--r-- | xbmc/windowing/X11/GLContextEGL.cpp | 21 | ||||
-rw-r--r-- | xbmc/windowing/X11/GLContextEGL.h | 1 |
2 files changed, 4 insertions, 18 deletions
diff --git a/xbmc/windowing/X11/GLContextEGL.cpp b/xbmc/windowing/X11/GLContextEGL.cpp index 5a07916728..36ae4c0fb9 100644 --- a/xbmc/windowing/X11/GLContextEGL.cpp +++ b/xbmc/windowing/X11/GLContextEGL.cpp @@ -129,26 +129,19 @@ bool CGLContextEGL::Refresh(bool force, int screen, Window glWindow, bool &newCo return false; } - if (!IsSuitableVisual(vInfo)) - { - CLog::Log(LOGWARNING, "Visual 0x%x of the window is not suitable", (unsigned) vInfo->visualid); - XFree(vInfo); - Destroy(); - return false; - } - - CLog::Log(LOGNOTICE, "Using visual 0x%x", (unsigned) vInfo->visualid); - + unsigned int visualid = static_cast<unsigned int>(vInfo->visualid); m_eglConfig = GetEGLConfig(m_eglDisplay, vInfo); XFree(vInfo); if (m_eglConfig == EGL_NO_CONFIG) { - CLog::Log(LOGERROR, "failed to get eglconfig for visual id"); + CLog::Log(LOGERROR, "failed to get suitable eglconfig for visual 0x%x", visualid); Destroy(); return false; } + CLog::Log(LOGNOTICE, "Using visual 0x%x", visualid); + m_eglSurface = eglCreateWindowSurface(m_eglDisplay, m_eglConfig, glWindow, NULL); if (m_eglSurface == EGL_NO_SURFACE) { @@ -332,12 +325,6 @@ void CGLContextEGL::Detach() } } -bool CGLContextEGL::IsSuitableVisual(XVisualInfo *vInfo) -{ - EGLConfig config = GetEGLConfig(m_eglDisplay, vInfo); - return config != EGL_NO_CONFIG; -} - bool CGLContextEGL::SuitableCheck(EGLDisplay eglDisplay, EGLConfig config) { if (config == EGL_NO_CONFIG) diff --git a/xbmc/windowing/X11/GLContextEGL.h b/xbmc/windowing/X11/GLContextEGL.h index ba4431318b..a86c957109 100644 --- a/xbmc/windowing/X11/GLContextEGL.h +++ b/xbmc/windowing/X11/GLContextEGL.h @@ -34,7 +34,6 @@ public: EGLContext m_eglContext; EGLConfig m_eglConfig; protected: - bool IsSuitableVisual(XVisualInfo *vInfo); bool SuitableCheck(EGLDisplay eglDisplay, EGLConfig config); EGLConfig GetEGLConfig(EGLDisplay eglDisplay, XVisualInfo *vInfo); PFNEGLGETSYNCVALUESCHROMIUMPROC eglGetSyncValuesCHROMIUM = nullptr; |