diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-02-18 08:58:57 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-03-02 08:24:24 (GMT) |
commit | 551b41e20118b66edb37704a0cfbfe5d3a960067 (patch) | |
tree | a8d838511a3df2cd72babbdc6378863077b6d0b1 /src/gui/egl/qegl_p.h | |
parent | d0a2d10dfac7be20af78988a3351d374acfdd208 (diff) | |
download | Qt-551b41e20118b66edb37704a0cfbfe5d3a960067.zip Qt-551b41e20118b66edb37704a0cfbfe5d3a960067.tar.gz Qt-551b41e20118b66edb37704a0cfbfe5d3a960067.tar.bz2 |
Add QEgl::defaultConfig method to select configs suitable for Qt
Reviewed-By: TrustMe
Diffstat (limited to 'src/gui/egl/qegl_p.h')
-rw-r--r-- | src/gui/egl/qegl_p.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index 8a9d815..1a5e4c0 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -114,6 +114,21 @@ namespace QEgl { BestPixelFormat }; + enum ConfigOptions + { + Opaque = 0x00, + Translucent = 0x01, + + ReadOnly = 0x00, + Renderable = 0x02 // Config will be compatable with the paint engines (VG or GL) + }; + + // Most of the time we use the same config for things like widgets & pixmaps, so rather than + // go through the eglChooseConfig loop every time, we use defaultConfig, which will return + // the config for a particular device/api/option combo. This function assumes that once a + // config is chosen for a particular combo, it's safe to always use that combo. + Q_GUI_EXPORT EGLConfig defaultConfig(QPaintDevice* device, API api, ConfigOptions options); + Q_GUI_EXPORT EGLConfig chooseConfig(const QEglProperties* configAttribs, QEgl::PixelFormatMatch match = QEgl::ExactPixelFormat); Q_GUI_EXPORT EGLSurface createSurface(QPaintDevice *device, EGLConfig cfg, const QEglProperties *surfaceAttribs = 0); |