From 7518adbb131ac05fe4e96880e47adcf35fc1c040 Mon Sep 17 00:00:00 2001 From: Gunnar Sletta Date: Tue, 31 Jan 2012 09:14:52 +0100 Subject: Introduced BufferQueueingOpenGL capability in platofrm integration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iedb7255862fd3a11aceae0e06e90a5539febc7e7 Reviewed-by: Samuel Rødal --- src/gui/kernel/qplatformintegration_qpa.cpp | 21 +++++++++++++++++++++ src/gui/kernel/qplatformintegration_qpa.h | 4 +++- src/plugins/platforms/cocoa/qcocoaintegration.mm | 1 + 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qplatformintegration_qpa.cpp b/src/gui/kernel/qplatformintegration_qpa.cpp index ec9a7fc983..e867e4e588 100644 --- a/src/gui/kernel/qplatformintegration_qpa.cpp +++ b/src/gui/kernel/qplatformintegration_qpa.cpp @@ -171,6 +171,27 @@ QPlatformNativeInterface * QPlatformIntegration::nativeInterface() const \sa createPlatformWindow(QWindow *window, WId winId = 0) const */ +/*! + \enum QPlatformIntegration::Capability + + Capabilities are used to determing specific features of a platform integration + + \value ThreadedPixmaps The platform uses a pixmap implementation that is reentrant + and can be used from multiple threads, like the raster paint engine and QImage based + pixmaps. + + \value OpenGL The platform supports OpenGL + + \value ThreadedOpenGL The platform supports using OpenGL outside the GUI thread. + + \value SharedGraphicsCache The platform supports a shared graphics cache + + \value BufferQueueingOpenGL The OpenGL implementation on the platform will queue + up buffers when swapBuffers() is called and block only when its buffer pipeline + is full, rather than block immediately. + */ + + /*! \fn QAbstractEventDispatcher *QPlatformIntegration::guiThreadEventDispatcher() const = 0 diff --git a/src/gui/kernel/qplatformintegration_qpa.h b/src/gui/kernel/qplatformintegration_qpa.h index f3dc43094a..efaf495b81 100644 --- a/src/gui/kernel/qplatformintegration_qpa.h +++ b/src/gui/kernel/qplatformintegration_qpa.h @@ -74,7 +74,9 @@ public: ThreadedPixmaps = 1, OpenGL = 2, ThreadedOpenGL = 3, - SharedGraphicsCache = 4 + SharedGraphicsCache = 4, + BufferQueueingOpenGL = 5 + }; virtual ~QPlatformIntegration() { } diff --git a/src/plugins/platforms/cocoa/qcocoaintegration.mm b/src/plugins/platforms/cocoa/qcocoaintegration.mm index 3abfe2c990..fb8e487029 100644 --- a/src/plugins/platforms/cocoa/qcocoaintegration.mm +++ b/src/plugins/platforms/cocoa/qcocoaintegration.mm @@ -150,6 +150,7 @@ bool QCocoaIntegration::hasCapability(QPlatformIntegration::Capability cap) cons case ThreadedPixmaps: return true; case OpenGL : return true; case ThreadedOpenGL : return true; + case BufferQueueingOpenGL: return true; default: return QPlatformIntegration::hasCapability(cap); } } -- cgit v1.2.3