summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/eglfs/qeglfsintegration.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@digia.com>2014-02-11 14:59:30 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-02-13 20:54:01 +0100
commitff11af4fbc2948a3a3bc635549c7ac349d249abc (patch)
tree79d6544923010bb740913842c550a010c6ae6922 /src/plugins/platforms/eglfs/qeglfsintegration.cpp
parent5b422304a9b97b628dc9990fd67e2f293d535b41 (diff)
QOpenGLWidget and new-style compositing on eglfs
Integrate with QOpenGLTextureBlitter, QOpenGLWidget and friends. Change-Id: Ic2867b713a21a3d2820d546174fc9164b3dd220c Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com> Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Diffstat (limited to 'src/plugins/platforms/eglfs/qeglfsintegration.cpp')
-rw-r--r--src/plugins/platforms/eglfs/qeglfsintegration.cpp25
1 files changed, 14 insertions, 11 deletions
diff --git a/src/plugins/platforms/eglfs/qeglfsintegration.cpp b/src/plugins/platforms/eglfs/qeglfsintegration.cpp
index 472e58cc72..2941806f17 100644
--- a/src/plugins/platforms/eglfs/qeglfsintegration.cpp
+++ b/src/plugins/platforms/eglfs/qeglfsintegration.cpp
@@ -88,17 +88,6 @@ bool QEglFSIntegration::hasCapability(QPlatformIntegration::Capability cap) cons
return QEGLPlatformIntegration::hasCapability(cap);
}
-QPlatformOpenGLContext *QEglFSIntegration::createPlatformOpenGLContext(QOpenGLContext *context) const
-{
- return new QEglFSContext(QEglFSHooks::hooks()->surfaceFormatFor(context->format()), context->shareHandle(), display());
-}
-
-QPlatformOffscreenSurface *QEglFSIntegration::createPlatformOffscreenSurface(QOffscreenSurface *surface) const
-{
- QEglFSScreen *screen = static_cast<QEglFSScreen *>(surface->screen()->handle());
- return new QEGLPbuffer(screen->display(), QEglFSHooks::hooks()->surfaceFormatFor(surface->requestedFormat()), surface);
-}
-
void QEglFSIntegration::initialize()
{
QEglFSHooks::hooks()->platformInit();
@@ -124,6 +113,20 @@ QEGLPlatformWindow *QEglFSIntegration::createWindow(QWindow *window) const
return new QEglFSWindow(window);
}
+QEGLPlatformContext *QEglFSIntegration::createContext(const QSurfaceFormat &format,
+ QPlatformOpenGLContext *shareContext,
+ EGLDisplay display) const
+{
+ return new QEglFSContext(QEglFSHooks::hooks()->surfaceFormatFor(format), shareContext, display);
+}
+
+QPlatformOffscreenSurface *QEglFSIntegration::createOffscreenSurface(EGLDisplay display,
+ const QSurfaceFormat &format,
+ QOffscreenSurface *surface) const
+{
+ return new QEGLPbuffer(display, QEglFSHooks::hooks()->surfaceFormatFor(format), surface);
+}
+
QVariant QEglFSIntegration::styleHint(QPlatformIntegration::StyleHint hint) const
{
switch (hint)