summaryrefslogtreecommitdiffstats
path: root/src/compositor/compositor_api/qwaylandsurface.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@theqtcompany.com>2015-07-29 14:58:54 +0200
committerJørgen Lind <jorgen.lind@theqtcompany.com>2015-08-28 13:09:41 +0200
commita327ca8d8a1f6e0a44a3aa6bd4dac716911c434e (patch)
treeae4c432c495a7baee8f97737160836cbb2e38476 /src/compositor/compositor_api/qwaylandsurface.cpp
parent6c9c54587c6cd1059d5de652d06e248456832ab6 (diff)
Move the texture ownership from the QWaylandSurface
to the respective QWaylandSurfaceView. For all GL applications this will have no significant impact, but will cause a memory regression for shm surfaces with multiple views. This is done to simplify the creation and destruction of textures, especially in multi-threaded environments. Also the same patch removes the y_inverted property and replaces it with a origin property. Its done in the same patch as a lot of the code was overlapping. Change-Id: I4bce50c614c9ac3ba0580e0560339476eac03433
Diffstat (limited to 'src/compositor/compositor_api/qwaylandsurface.cpp')
-rw-r--r--src/compositor/compositor_api/qwaylandsurface.cpp33
1 files changed, 6 insertions, 27 deletions
diff --git a/src/compositor/compositor_api/qwaylandsurface.cpp b/src/compositor/compositor_api/qwaylandsurface.cpp
index bec39a184..5ffe58e0a 100644
--- a/src/compositor/compositor_api/qwaylandsurface.cpp
+++ b/src/compositor/compositor_api/qwaylandsurface.cpp
@@ -132,20 +132,17 @@ QWaylandOutput *QWaylandSurfaceLeaveEvent::output() const
QWaylandSurface::QWaylandSurface(wl_client *client, quint32 id, int version, QWaylandCompositor *compositor)
: QObject(*new QWaylandSurfacePrivate(client, id, version, compositor, this))
{
-
}
QWaylandSurface::QWaylandSurface(QWaylandSurfacePrivate *dptr)
: QObject(*dptr)
{
-
}
QWaylandSurface::~QWaylandSurface()
{
Q_D(QWaylandSurface);
qDeleteAll(d->interfaces);
- delete d->m_attacher;
}
QWaylandClient *QWaylandSurface::client() const
@@ -186,18 +183,6 @@ void QWaylandSurface::removeInterface(QWaylandSurfaceInterface *iface)
d->interfaces.removeOne(iface);
}
-QWaylandSurface::Type QWaylandSurface::type() const
-{
- Q_D(const QWaylandSurface);
- return d->type();
-}
-
-bool QWaylandSurface::isYInverted() const
-{
- Q_D(const QWaylandSurface);
- return d->isYInverted();
-}
-
bool QWaylandSurface::visible() const
{
return isMapped();
@@ -253,6 +238,12 @@ QWaylandSurface::WindowType QWaylandSurface::windowType() const
return d->windowType;
}
+QWaylandSurface::Origin QWaylandSurface::origin() const
+{
+ Q_D(const QWaylandSurface);
+ return d->origin();
+}
+
QWaylandSurface *QWaylandSurface::transientParent() const
{
Q_D(const QWaylandSurface);
@@ -459,18 +450,6 @@ void QWaylandSurface::setMapped(bool mapped)
d->setMapped(mapped);
}
-void QWaylandSurface::setBufferAttacher(QWaylandBufferAttacher *attacher)
-{
- Q_D(QWaylandSurface);
- d->m_attacher = attacher;
-}
-
-QWaylandBufferAttacher *QWaylandSurface::bufferAttacher() const
-{
- Q_D(const QWaylandSurface);
- return d->m_attacher;
-}
-
QList<QWaylandSurfaceView *> QWaylandSurface::views() const
{
Q_D(const QWaylandSurface);