Introduced BufferQueueingOpenGL capability in platofrm integration
authorGunnar Sletta <gunnar.sletta@nokia.com>
Tue, 31 Jan 2012 08:14:52 +0000 (09:14 +0100)
committerQt by Nokia <qt-info@nokia.com>
Wed, 1 Feb 2012 07:25:45 +0000 (08:25 +0100)
Change-Id: Iedb7255862fd3a11aceae0e06e90a5539febc7e7
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
src/gui/kernel/qplatformintegration_qpa.cpp
src/gui/kernel/qplatformintegration_qpa.h
src/plugins/platforms/cocoa/qcocoaintegration.mm

index ec9a7fc..e867e4e 100644 (file)
@@ -172,6 +172,27 @@ QPlatformNativeInterface * QPlatformIntegration::nativeInterface() 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
 
index f3dc430..efaf495 100644 (file)
@@ -74,7 +74,9 @@ public:
         ThreadedPixmaps = 1,
         OpenGL = 2,
         ThreadedOpenGL = 3,
-        SharedGraphicsCache = 4
+        SharedGraphicsCache = 4,
+        BufferQueueingOpenGL = 5
+
     };
 
     virtual ~QPlatformIntegration() { }
index 3abfe2c..fb8e487 100644 (file)
@@ -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);
     }
 }