KWin
Loading...
Searching...
No Matches
graphicsbufferallocator.h
Go to the documentation of this file.
1/*
2 SPDX-FileCopyrightText: 2023 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
3
4 SPDX-License-Identifier: GPL-2.0-or-later
5*/
6
7#pragma once
8
9#include "kwin_export.h"
10
11#include <QList>
12#include <QSize>
13
14namespace KWin
15{
16
17class GraphicsBuffer;
18
23{
25 QSize size;
26
28 uint32_t format;
29
31 QList<uint64_t> modifiers;
32
34 bool software = false;
35};
36
37class KWIN_EXPORT GraphicsBufferAllocator
38{
39public:
42
43 virtual GraphicsBuffer *allocate(const GraphicsBufferOptions &options) = 0;
44};
45
46} // namespace KWin
virtual GraphicsBuffer * allocate(const GraphicsBufferOptions &options)=0
uint32_t format
The pixel format of the buffer, see DRM_FORMAT_*.
bool software
Whether the graphics buffer should be suitable for software rendering.
QList< uint64_t > modifiers
An optional list of modifiers, see DRM_FORMAT_MOD_*.
QSize size
The size of the buffer, in device pixels.