QWaylandBufferRef Class

QWaylandBufferRef 클래스는 서피스 버퍼에 대한 참조를 보유합니다. 더 보기...

Header: #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 이 버퍼를 참조하는 경우 참을 반환합니다. 그렇지 않으면 false를 반환합니다.

isNull() 및 hasContent()도 참조하세요 .

bool QWaylandBufferRef::hasContent() const

QWaylandBufferRef 이 콘텐츠가 있는 버퍼를 참조하는 경우 참을 반환합니다. 그렇지 않으면 false를 반환합니다.

isNull() 및 hasBuffer()도 참조하세요 .

[since 6.2] bool QWaylandBufferRef::hasProtectedContent() const

QWaylandBufferRef 이 보호된 콘텐츠가 있는 버퍼를 참조하는 경우 true를 반환합니다. 그렇지 않으면 false를 반환합니다.

참고: 이 인에이블러는 클라이언트 버퍼 통합의 지원을 전제로 하는 인에이블러입니다. 현재 Qt에 포함된 클라이언트 버퍼 통합은 보호된 콘텐츠 버퍼를 지원하지 않습니다.

이 함수는 Qt 6.2에 도입되었습니다.

hasContent()도 참조하십시오 .

QImage QWaylandBufferRef::image() const

버퍼의 내용이 포함된 이미지를 반환합니다.

bool QWaylandBufferRef::isDestroyed() const

QWaylandBufferRef 이 소멸된 버퍼를 참조하는 경우 참을 반환합니다. 그렇지 않으면 false를 반환합니다.

bool QWaylandBufferRef::isNull() const

QWaylandBufferRef 이 버퍼를 참조하지 않으면 참을 반환합니다. 그렇지 않으면 false를 반환합니다.

hasBuffer() 및 hasContent()도 참조하세요 .

bool QWaylandBufferRef::isSharedMemory() const

버퍼가 공유 메모리 버퍼인 경우 true를 반환합니다. 그렇지 않으면 false를 반환합니다.

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)

기본 버퍼를 더 이상 사용되지 않는 것으로 표시합니다. handlelockNativeBuffer()에 대한 이전 호출에서 반환된 값과 일치해야 합니다.

struct wl_resource *QWaylandBufferRef::wl_buffer() const

버퍼에 대한 웨이랜드 리소스를 반환합니다.

QWaylandBufferRef &QWaylandBufferRef::operator=(const QWaylandBufferRef &ref)

이 버퍼에 ref 을 할당하고 참조를 추가합니다. 이전에 참조된 버퍼는 참조 해제됩니다.

관련 비회원

[noexcept] bool operator!=(const QWaylandBufferRef &lhs, const QWaylandBufferRef &rhs)

lhsrhs 과 동일한 버퍼를 참조하는 경우 false 을 반환합니다. 그렇지 않으면 true 을 반환합니다.

[noexcept] bool operator==(const QWaylandBufferRef &lhs, const QWaylandBufferRef &rhs)

lhsrhs 과 동일한 버퍼를 참조하는 경우 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.