Expose GLRenderTarget::virtualScreenGeometry

Summary:
A simple way to get the current per-output geometry. It's also needed by
effects using render targets.

Reviewers: #kwin, #plasma_on_wayland

Subscribers: plasma-devel, kwin

Tags: #plasma_on_wayland, #kwin

Differential Revision: https://phabricator.kde.org/D3100
This commit is contained in:
Martin Gräßlin 2016-10-18 16:22:57 +02:00
parent 1708278a45
commit f4627e38f1

View file

@ -515,12 +515,23 @@ public:
* Sets the virtual screen geometry to @p g. * Sets the virtual screen geometry to @p g.
* This is the geometry of the OpenGL window currently being rendered to * This is the geometry of the OpenGL window currently being rendered to
* in the virtual geometry space the rendering geometries use. * in the virtual geometry space the rendering geometries use.
* @see virtualScreenGeometry
* @since 5.9 * @since 5.9
**/ **/
static void setVirtualScreenGeometry(const QRect &g) { static void setVirtualScreenGeometry(const QRect &g) {
s_virtualScreenGeometry = g; s_virtualScreenGeometry = g;
} }
/**
* The geometry of the OpenGL window currently being rendered to
* in the virtual geometry space the rendering system uses.
* @see setVirtualScreenGeometry
* @since 5.9
**/
static QRect virtualScreenGeometry() {
return s_virtualScreenGeometry;
}
protected: protected:
void initFBO(); void initFBO();