Added MultipleWindows platform capability.
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>
This commit is contained in:
parent
6be78c0712
commit
300534fc21
@ -195,6 +195,10 @@ QPlatformServices *QPlatformIntegration::services() const
|
|||||||
\value BufferQueueingOpenGL The OpenGL implementation on the platform will queue
|
\value BufferQueueingOpenGL The OpenGL implementation on the platform will queue
|
||||||
up buffers when swapBuffers() is called and block only when its buffer pipeline
|
up buffers when swapBuffers() is called and block only when its buffer pipeline
|
||||||
is full, rather than block immediately.
|
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.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -83,11 +83,12 @@ class Q_GUI_EXPORT QPlatformIntegration
|
|||||||
public:
|
public:
|
||||||
enum Capability {
|
enum Capability {
|
||||||
ThreadedPixmaps = 1,
|
ThreadedPixmaps = 1,
|
||||||
OpenGL = 2,
|
OpenGL,
|
||||||
ThreadedOpenGL = 3,
|
ThreadedOpenGL,
|
||||||
SharedGraphicsCache = 4,
|
SharedGraphicsCache,
|
||||||
BufferQueueingOpenGL = 5,
|
BufferQueueingOpenGL,
|
||||||
WindowMasks = 6
|
WindowMasks,
|
||||||
|
MultipleWindows
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual ~QPlatformIntegration() { }
|
virtual ~QPlatformIntegration() { }
|
||||||
|
@ -309,6 +309,7 @@ bool QCocoaIntegration::hasCapability(QPlatformIntegration::Capability cap) cons
|
|||||||
case ThreadedOpenGL:
|
case ThreadedOpenGL:
|
||||||
case BufferQueueingOpenGL:
|
case BufferQueueingOpenGL:
|
||||||
case WindowMasks:
|
case WindowMasks:
|
||||||
|
case MultipleWindows:
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
return QPlatformIntegration::hasCapability(cap);
|
return QPlatformIntegration::hasCapability(cap);
|
||||||
|
@ -74,6 +74,7 @@ bool QMinimalIntegration::hasCapability(QPlatformIntegration::Capability cap) co
|
|||||||
{
|
{
|
||||||
switch (cap) {
|
switch (cap) {
|
||||||
case ThreadedPixmaps: return true;
|
case ThreadedPixmaps: return true;
|
||||||
|
case MultipleWindows: return true;
|
||||||
default: return QPlatformIntegration::hasCapability(cap);
|
default: return QPlatformIntegration::hasCapability(cap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -338,6 +338,8 @@ bool QWindowsIntegration::hasCapability(QPlatformIntegration::Capability cap) co
|
|||||||
#endif // !QT_NO_OPENGL
|
#endif // !QT_NO_OPENGL
|
||||||
case WindowMasks:
|
case WindowMasks:
|
||||||
return true;
|
return true;
|
||||||
|
case MultipleWindows:
|
||||||
|
return true;
|
||||||
default:
|
default:
|
||||||
return QPlatformIntegration::hasCapability(cap);
|
return QPlatformIntegration::hasCapability(cap);
|
||||||
}
|
}
|
||||||
|
@ -216,6 +216,7 @@ bool QXcbIntegration::hasCapability(QPlatformIntegration::Capability cap) const
|
|||||||
#endif
|
#endif
|
||||||
case ThreadedOpenGL: return false;
|
case ThreadedOpenGL: return false;
|
||||||
case WindowMasks: return true;
|
case WindowMasks: return true;
|
||||||
|
case MultipleWindows: return true;
|
||||||
default: return QPlatformIntegration::hasCapability(cap);
|
default: return QPlatformIntegration::hasCapability(cap);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user