summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-05-17 13:51:51 -0700
committerQt by Nokia <qt-info@nokia.com>2012-05-18 15:28:32 +0200
commitdd699d5ea52b9c9abd1b0e7ebb0d705901117f7f (patch)
treeb072fa3c4f8b6ca83dd6f0257336ae49675e4671
parent5672cbf1317bc266ac12c224b148d6d213c91779 (diff)
eglfs: hooks can never be null
e60ca0de6015a8ee16c7be54d0d430252ef525c1 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>
-rw-r--r--src/plugins/platforms/eglfs/qeglfsscreen.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsscreen.cpp b/src/plugins/platforms/eglfs/qeglfsscreen.cpp
index 0a97a932cb..3d5d4289c3 100644
--- a/src/plugins/platforms/eglfs/qeglfsscreen.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsscreen.cpp
@@ -123,8 +123,7 @@ QEglFSScreen::QEglFSScreen()
qWarning("QEglScreen %p\n", this);
#endif
- if (hooks)
- hooks->platformInit();
+ hooks->platformInit();
EGLint major, minor;
@@ -165,13 +164,11 @@ QEglFSScreen::~QEglFSScreen()
if (m_surface)
eglDestroySurface(m_dpy, m_surface);
- if (hooks)
- hooks->destroyNativeWindow(m_window);
+ hooks->destroyNativeWindow(m_window);
eglTerminate(m_dpy);
- if (hooks)
- hooks->platformDestroy();
+ hooks->platformDestroy();
}
void QEglFSScreen::createAndSetPlatformContext() const {
@@ -205,8 +202,7 @@ void QEglFSScreen::createAndSetPlatformContext()
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
qWarning("Configuration %d matches requirements\n", (int)config);