summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/qeglfscontext.cpp
diff options
context:
space:
mode:
authorGirish Ramakrishnan <girish.1.ramakrishnan@nokia.com>2012-06-13 16:38:27 -0700
committerQt by Nokia <qt-info@nokia.com>2012-06-14 16:12:19 +0200
commitf2d04d9b8cb323826c5af180dd2c22fe584a5e26 (patch)
tree56ab10855809bd051ae85ebdb0f97e7d8b068c85 /src/plugins/platforms/eglfs/qeglfscontext.cpp
parented776e367099754af6436f07d72352e6b73124da (diff)
eglfs: Make QEglFSWindow respect the window format
Prior to this change, eglfs code used to override the window format with it's own format. With this change, eglfs will respect the window format. This is useful when the application requires a surface with alpha (for example, so that the video layer below is visible) QEglFSHooks::surfaceFormatFor() allows the hook author to override the context and window surface format. Change-Id: I97f03a8b0871dfebfca73004fa0188b33d0d0367 Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com> Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfscontext.cpp')
-rw-r--r--src/plugins/platforms/eglfs/qeglfscontext.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfscontext.cpp b/src/plugins/platforms/eglfs/qeglfscontext.cpp
index 7e874bee0e..1a16b36696 100644
--- a/src/plugins/platforms/eglfs/qeglfscontext.cpp
+++ b/src/plugins/platforms/eglfs/qeglfscontext.cpp
@@ -50,15 +50,12 @@ QT_BEGIN_NAMESPACE
QEglFSContext::QEglFSContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share,
EGLDisplay display, EGLenum eglApi)
- : QEGLPlatformContext(format, share, display, eglApi)
+ : QEGLPlatformContext(hooks->surfaceFormatFor(format), share, display, eglApi)
{
}
bool QEglFSContext::makeCurrent(QPlatformSurface *surface)
{
- // create the native window surface. this makes sure that
- // we create surfaces only for painted widgets (unlike QDesktopWidget)
- (static_cast<QEglFSWindow *>(surface))->create();
return QEGLPlatformContext::makeCurrent(surface);
}