diff options
author | Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com> | 2012-06-13 16:38:27 -0700 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-06-14 16:12:19 +0200 |
commit | f2d04d9b8cb323826c5af180dd2c22fe584a5e26 (patch) | |
tree | 56ab10855809bd051ae85ebdb0f97e7d8b068c85 /src/plugins/platforms/eglfs/qeglfshooks_stub.cpp | |
parent | ed776e367099754af6436f07d72352e6b73124da (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/qeglfshooks_stub.cpp')
-rw-r--r-- | src/plugins/platforms/eglfs/qeglfshooks_stub.cpp | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp index fbc02d1a01..fe622e1c1b 100644 --- a/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp +++ b/src/plugins/platforms/eglfs/qeglfshooks_stub.cpp @@ -72,26 +72,9 @@ QImage::Format QEglFSHooks::screenFormat() const return screenDepth() == 16 ? QImage::Format_RGB16 : QImage::Format_RGB32; } -QSurfaceFormat QEglFSHooks::defaultSurfaceFormat() const +QSurfaceFormat QEglFSHooks::surfaceFormatFor(const QSurfaceFormat &inputFormat) const { - QSurfaceFormat format; - if (screenDepth() == 16) { - format.setDepthBufferSize(16); - format.setRedBufferSize(5); - format.setGreenBufferSize(6); - format.setBlueBufferSize(5); - } else { - format.setDepthBufferSize(24); - format.setStencilBufferSize(8); - format.setRedBufferSize(8); - format.setGreenBufferSize(8); - format.setBlueBufferSize(8); - } - - static int samples = qgetenv("QT_QPA_EGLFS_MULTISAMPLE").toInt(); - format.setSamples(samples); - - return format; + return inputFormat; } EGLNativeWindowType QEglFSHooks::createNativeWindow(const QSize &size) |