eglfs: use GL API directly in QEglFSCursor
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Mon, 21 May 2012 22:41:55 +0000 (15:41 -0700)
committerQt by Nokia <qt-info@nokia.com>
Fri, 25 May 2012 15:23:20 +0000 (17:23 +0200)
commitb8420c9fc246428cf26ace2970f252ca7580aef5
tree4320d492663bf32b22419adb066ceadaf470b16b
parent113620d6f788486f118c19f19475cb6cb716ec32
eglfs: use GL API directly in QEglFSCursor

The upcoming hardware cursor support for pi requires the cursor
code to render with it's own context. This is because the cursor
rendering happens in the input event (gui) thread which may be
different from the the scenegraph thread.

Currently, Qt can be informed about the current opengl context by
using QOpenGLContext::makeCurrent(). All of Qt's helper OpenGL
classes complain if that function has not been called. Usage of
makeCurrent API requires a QSurface. A big rewrite of EGLFS is
needed to make such a QSurface (QEglFSWindow) available to the
cursor code. There is no other way around this since Qt
has no other API to inform it that an opengl context is active.

The solution is not use Qt's OpenGL helper classes and use GL API
directly.

Change-Id: If47030d9a289686ebf2e758f90445323d1733dc0
Reviewed-by: Andy Nichols <andy.nichols@nokia.com>
src/plugins/platforms/eglfs/qeglfscursor.cpp
src/plugins/platforms/eglfs/qeglfscursor.h