QWaylandBufferRef Class
The QWaylandBufferRef class holds the reference to a surface buffer More...
Header: | #include <QWaylandBufferRef> |
qmake: | QT += waylandcompositor |
This class is under development and is subject to change.
Public Types
enum | BufferFormatEgl { BufferFormatEgl_Null, BufferFormatEgl_RGB, BufferFormatEgl_RGBA, BufferFormatEgl_EXTERNAL_OES, ..., BufferFormatEgl_Y_XUXV } |
enum | BufferType { BufferType_Null, BufferType_Shm, BufferType_Egl } |
Public Functions
QWaylandBufferRef() | |
QWaylandBufferRef(QtWayland::SurfaceBuffer *buffer) | |
QWaylandBufferRef(const QWaylandBufferRef &ref) | |
~QWaylandBufferRef() | |
void | bindToTexture() const |
BufferFormatEgl | bufferFormatEgl() const |
BufferType | bufferType() const |
bool | hasBuffer() const |
QImage | image() const |
bool | isDestroyed() const |
bool | isNull() const |
bool | isShm() const |
QWaylandSurface::Origin | origin() const |
QSize | size() const |
void | updateTexture() const |
bool | operator!=(const QWaylandBufferRef &ref) |
QWaylandBufferRef & | operator=(const QWaylandBufferRef &ref) |
bool | operator==(const QWaylandBufferRef &ref) |
Detailed Description
The QWaylandBufferRef class holds the reference to a surface buffer
This class can be used to reference a surface buffer. As long as a reference to the buffer exists, it is owned by the compositor and the client cannot modify it.
Member Type Documentation
enum QWaylandBufferRef::BufferFormatEgl
enum QWaylandBufferRef::BufferType
Member Function Documentation
QWaylandBufferRef::QWaylandBufferRef()
Constructs a null buffer ref.
QWaylandBufferRef::QWaylandBufferRef(QtWayland::SurfaceBuffer *buffer)
Constructs a reference to buffer.
QWaylandBufferRef::QWaylandBufferRef(const QWaylandBufferRef &ref)
Creates a new reference to the buffer referenced by ref.
QWaylandBufferRef::~QWaylandBufferRef()
Dereferences the buffer.
void QWaylandBufferRef::bindToTexture() const
Binds the buffer to the current OpenGL texture. This may perform a copy of the buffer data, depending on the platform and the type of the buffer.
BufferFormatEgl QWaylandBufferRef::bufferFormatEgl() const
BufferType QWaylandBufferRef::bufferType() const
bool QWaylandBufferRef::hasBuffer() const
Returns true if this QWaylandBufferRef references a buffer. Otherwise returns false.
See also isNull().
QImage QWaylandBufferRef::image() const
Returns an image with the contents of the buffer.
bool QWaylandBufferRef::isDestroyed() const
Returns true if this QWaylandBufferRef references a buffer that has been destroyed. Otherwise returns false.
bool QWaylandBufferRef::isNull() const
Returns true if this QWaylandBufferRef does not reference a buffer. Otherwise returns false.
See also hasBuffer().
bool QWaylandBufferRef::isShm() const
Returns true if the buffer is a shared memory buffer. Otherwise returns false.
QWaylandSurface::Origin QWaylandBufferRef::origin() const
Returns the origin of the buffer. If the buffer referenced is null, QWaylandSurface::OriginBottomLeft is returned.
QSize QWaylandBufferRef::size() const
Returns the size of the buffer. If the buffer referenced is null, an invalid QSize() is returned.
void QWaylandBufferRef::updateTexture() const
bool QWaylandBufferRef::operator!=(const QWaylandBufferRef &ref)
Returns false if this QWaylandBufferRef references the same buffer as ref. Otherwise returns true.
QWaylandBufferRef &QWaylandBufferRef::operator=(const QWaylandBufferRef &ref)
Assigns ref to this buffer. The previously referenced buffer is dereferenced and the new one gets a new reference.
bool QWaylandBufferRef::operator==(const QWaylandBufferRef &ref)
Returns true if this QWaylandBufferRef references the same buffer as ref. Otherwise returns false.
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.