QWaylandBufferRef Class
QWaylandBufferRefクラスはサーフェスバッファへの参照を保持します。詳細...
ヘッダー | #include <QWaylandBufferRef> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS WaylandCompositor) target_link_libraries(mytarget PRIVATE Qt6::WaylandCompositor) |
qmake: | QT += waylandcompositor |
パブリック関数
QWaylandBufferRef() | |
QWaylandBufferRef(const QWaylandBufferRef &ref) | |
~QWaylandBufferRef() | |
bool | hasBuffer() const |
bool | hasContent() const |
(since 6.2) bool | hasProtectedContent() const |
QImage | image() const |
bool | isDestroyed() const |
bool | isNull() const |
bool | isSharedMemory() const |
quintptr | lockNativeBuffer() |
QWaylandSurface::Origin | origin() const |
QSize | size() const |
QOpenGLTexture * | toOpenGLTexture(int plane = 0) const |
void | unlockNativeBuffer(quintptr handle) |
struct wl_resource * | wl_buffer() const |
QWaylandBufferRef & | operator=(const QWaylandBufferRef &ref) |
関連する非メンバー
bool | operator!=(const QWaylandBufferRef &lhs, const QWaylandBufferRef &rhs) |
bool | operator==(const QWaylandBufferRef &lhs, const QWaylandBufferRef &rhs) |
メンバ関数ドキュメント
QWaylandBufferRef::QWaylandBufferRef()
ヌル・バッファ参照を構築します。
QWaylandBufferRef::QWaylandBufferRef(const QWaylandBufferRef &ref)
ref によって参照されるバッファへの新しい参照を作成する。
[noexcept]
QWaylandBufferRef::~QWaylandBufferRef()
バッファの参照を解除する。
bool QWaylandBufferRef::hasBuffer() const
このQWaylandBufferRef がバッファを参照している場合は true を返す。そうでない場合は false を返します。
isNull() およびhasContent()も参照 。
bool QWaylandBufferRef::hasContent() const
このQWaylandBufferRef がコンテンツを持つバッファを参照している場合、true を返す。そうでない場合は false を返します。
[since 6.2]
bool QWaylandBufferRef::hasProtectedContent() const
このQWaylandBufferRef が保護されたコンテンツを持つバッファを参照している場合、true を返します。そうでない場合は false を返します。
注意: これは、クライアントバッファ統合でのサポートを前提としたイネーブラです。Qt に含まれるクライアントバッファ統合は、現在、保護されたコンテンツバッファをサポートしていません。
この関数は Qt 6.2 で導入されました。
hasContent()も参照してください 。
QImage QWaylandBufferRef::image() const
バッファの内容を画像として返す。
bool QWaylandBufferRef::isDestroyed() const
このQWaylandBufferRef が破棄されたバッファを参照している場合は true を返す。そうでない場合は false を返します。
bool QWaylandBufferRef::isNull() const
このQWaylandBufferRef がバッファを参照していない場合は true を返す。そうでない場合は false を返します。
hasBuffer() およびhasContent()も参照 。
bool QWaylandBufferRef::isSharedMemory() const
バッファが共有メモリ・バッファであればtrueを返す。そうでない場合は偽を返します。
quintptr QWaylandBufferRef::lockNativeBuffer()
このバッファのネイティブハンドルを返し、unlockNativeBuffer() が呼び出されるまで解放されないようにロックされたものとしてマークする。
このバッファのネイティブハンドルがないか、ロックに失敗した場合は0を返します。
QWaylandSurface::Origin QWaylandBufferRef::origin() const
バッファの原点を返す。参照したバッファがNULLの場合は、QWaylandSurface::OriginBottomLeft 。
QSize QWaylandBufferRef::size() const
バッファのサイズを返します。参照されたバッファが NULL の場合は、無効な QSize() が返されます。
QOpenGLTexture *QWaylandBufferRef::toOpenGLTexture(int plane = 0) const
バッファのOpenGLテクスチャを返します。plane はYUVなどのマルチプレーンフォーマットのインデックスです。
返されたテクスチャはバッファが所有します。テクスチャはバッファ参照が存在する間だけ有効です。この関数の呼び出し元はテクスチャを削除してはならず、テクスチャが使用されている間はバッファへの参照を保持する必要があります。
有効なバッファがない場合、またはテクスチャを作成できない場合はnullptr
を返します。
void QWaylandBufferRef::unlockNativeBuffer(quintptr handle)
handle は、以前にlockNativeBuffer() をコールしたときに返された値に対応しなければならない。
struct wl_resource *QWaylandBufferRef::wl_buffer() const
バッファのWaylandリソースを返します。
QWaylandBufferRef &QWaylandBufferRef::operator=(const QWaylandBufferRef &ref)
このバッファにref を割り当て、そのバッファへの参照を追加する。先に参照されていたバッファは参照解除される。
関連する非メンバー
[noexcept]
bool operator!=(const QWaylandBufferRef &lhs, const QWaylandBufferRef &rhs)
lhs がrhs と同じバッファを参照している場合はfalse
を返す。そうでない場合はtrue
を返します。
[noexcept]
bool operator==(const QWaylandBufferRef &lhs, const QWaylandBufferRef &rhs)
lhs がrhs と同じバッファを参照している場合はtrue
を返す。そうでない場合はfalse
を返します。
© 2025 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.