9#include "kwin_export.h"
27 std::array<FileDescriptor, 4>
fd;
28 std::array<uint32_t, 4>
offset{0, 0, 0, 0};
29 std::array<uint32_t, 4>
pitch{0, 0, 0, 0};
63 bool isReferenced()
const;
64 bool isDropped()
const;
74 Q_DECLARE_FLAGS(MapFlags, MapFlag)
81 virtual Map map(MapFlags flags);
84 virtual QSize
size()
const = 0;
90 static bool alphaChannelFromDrmFormat(uint32_t format);
97 bool m_dropped =
false;
121 : m_buffer(other.m_buffer)
129 : m_buffer(std::exchange(other.m_buffer, nullptr))
142 if (other.m_buffer) {
143 other.m_buffer->
ref();
148 m_buffer = other.m_buffer;
157 m_buffer = std::exchange(other.m_buffer,
nullptr);
190 inline operator bool()
const
201Q_DECLARE_OPERATORS_FOR_FLAGS(KWin::GraphicsBuffer::MapFlags)
virtual bool hasAlphaChannel() const =0
virtual QSize size() const =0
GraphicsBufferRef & operator=(const GraphicsBufferRef &other)
GraphicsBufferRef(const GraphicsBufferRef &other)
GraphicsBuffer * operator->() const
GraphicsBufferRef(GraphicsBuffer *buffer)
GraphicsBuffer * operator*() const
GraphicsBufferRef & operator=(GraphicsBufferRef &&other)
GraphicsBufferRef & operator=(GraphicsBuffer *buffer)
GraphicsBufferRef(GraphicsBufferRef &&other)
GraphicsBuffer * buffer() const
std::array< uint32_t, 4 > offset
std::array< uint32_t, 4 > pitch
std::array< FileDescriptor, 4 > fd