Several platform plugins, like eglfs, kms, etc don't support multiple
windows as there's no system compositor, they're rendering directly to
a single back buffer. By adding a platform capability we'll be able to
provide better error reporting when an application tries to create
multiple QWindows on a single-window platform. Also, QML apps can use
this capability to figure out whether they should create a QWindow for
dialogs / popups / menus, or whether to just create items in the same
scene, that are shown on top of the rest of the content.
Change-Id: I15b8d21ee2bc4568e9d705dbf32f872c2c25742b
Reviewed-by: Andy Nichols <andy.nichols@digia.com>
\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.
+
+ \value MultipleWindows The platform supports multiple QWindows, i.e. does some kind
+ of compositing either client or server side. Some platforms might only support a
+ single fullscreen window.
*/
public:
enum Capability {
ThreadedPixmaps = 1,
- OpenGL = 2,
- ThreadedOpenGL = 3,
- SharedGraphicsCache = 4,
- BufferQueueingOpenGL = 5,
- WindowMasks = 6
+ OpenGL,
+ ThreadedOpenGL,
+ SharedGraphicsCache,
+ BufferQueueingOpenGL,
+ WindowMasks,
+ MultipleWindows
};
virtual ~QPlatformIntegration() { }
case ThreadedOpenGL:
case BufferQueueingOpenGL:
case WindowMasks:
+ case MultipleWindows:
return true;
default:
return QPlatformIntegration::hasCapability(cap);
{
switch (cap) {
case ThreadedPixmaps: return true;
+ case MultipleWindows: return true;
default: return QPlatformIntegration::hasCapability(cap);
}
}
#endif // !QT_NO_OPENGL
case WindowMasks:
return true;
+ case MultipleWindows:
+ return true;
default:
return QPlatformIntegration::hasCapability(cap);
}
#endif
case ThreadedOpenGL: return false;
case WindowMasks: return true;
+ case MultipleWindows: return true;
default: return QPlatformIntegration::hasCapability(cap);
}
}