eglfs: hooks can never be null

e60ca0de60 reworked the hooks design.
hooks is initialized with a stub pointer if we don't have a platform
hook.

Change-Id: Ia60facfebd9e4d9c08d237c6d49793efb598130f
Reviewed-by: Donald Carr <donald.carr@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
This commit is contained in:
Girish Ramakrishnan 2012-05-17 13:51:51 -07:00 committed by Qt by Nokia
parent 5672cbf131
commit dd699d5ea5

View File

@ -123,7 +123,6 @@ QEglFSScreen::QEglFSScreen()
qWarning("QEglScreen %p\n", this); qWarning("QEglScreen %p\n", this);
#endif #endif
if (hooks)
hooks->platformInit(); hooks->platformInit();
EGLint major, minor; EGLint major, minor;
@ -165,12 +164,10 @@ QEglFSScreen::~QEglFSScreen()
if (m_surface) if (m_surface)
eglDestroySurface(m_dpy, m_surface); eglDestroySurface(m_dpy, m_surface);
if (hooks)
hooks->destroyNativeWindow(m_window); hooks->destroyNativeWindow(m_window);
eglTerminate(m_dpy); eglTerminate(m_dpy);
if (hooks)
hooks->platformDestroy(); hooks->platformDestroy();
} }
@ -205,7 +202,6 @@ void QEglFSScreen::createAndSetPlatformContext()
EGLConfig config = q_configFromGLFormat(m_dpy, platformFormat); EGLConfig config = q_configFromGLFormat(m_dpy, platformFormat);
if (hooks)
m_window = hooks->createNativeWindow(hooks->screenSize()); m_window = hooks->createNativeWindow(hooks->screenSize());
#ifdef QEGL_EXTRA_DEBUG #ifdef QEGL_EXTRA_DEBUG