KWin
Loading...
Searching...
No Matches
src
platformsupport
scenes
qpainter
qpainterswapchain.h
Go to the documentation of this file.
1
/*
2
KWin - the KDE window manager
3
This file is part of the KDE project.
4
5
SPDX-FileCopyrightText: 2021 Xaver Hugl <xaver.hugl@gmail.com>
6
SPDX-FileCopyrightText: 2023 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
7
8
SPDX-License-Identifier: GPL-2.0-or-later
9
*/
10
11
#pragma once
12
13
#include "kwin_export.h"
14
15
#include <QImage>
16
#include <QList>
17
#include <QSize>
18
19
#include <memory>
20
21
namespace
KWin
22
{
23
24
class
GraphicsBuffer;
25
class
GraphicsBufferAllocator;
26
class
GraphicsBufferView;
27
28
class
KWIN_EXPORT
QPainterSwapchainSlot
29
{
30
public
:
31
QPainterSwapchainSlot
(
GraphicsBuffer
*buffer);
32
~QPainterSwapchainSlot
();
33
34
GraphicsBuffer
*buffer()
const
;
35
GraphicsBufferView
*view()
const
;
36
int
age()
const
;
37
38
private
:
39
GraphicsBuffer
*m_buffer;
40
std::unique_ptr<GraphicsBufferView> m_view;
41
int
m_age = 0;
42
friend
class
QPainterSwapchain
;
43
};
44
45
class
KWIN_EXPORT
QPainterSwapchain
46
{
47
public
:
48
QPainterSwapchain
(
GraphicsBufferAllocator
*allocator,
const
QSize &size, uint32_t
format
);
49
~QPainterSwapchain
();
50
51
QSize size()
const
;
52
uint32_t
format
()
const
;
53
54
std::shared_ptr<QPainterSwapchainSlot> acquire();
55
void
release(std::shared_ptr<QPainterSwapchainSlot> slot);
56
57
private
:
58
GraphicsBufferAllocator
*m_allocator;
59
QList<std::shared_ptr<QPainterSwapchainSlot>> m_slots;
60
QSize m_size;
61
uint32_t m_format;
62
};
63
64
}
KWin::GraphicsBufferAllocator
Definition
graphicsbufferallocator.h:38
KWin::GraphicsBuffer
Definition
graphicsbuffer.h:57
KWin::GraphicsBufferView
Definition
graphicsbufferview.h:17
KWin::QPainterSwapchain
Definition
qpainterswapchain.h:46
KWin::QPainterSwapchainSlot
Definition
qpainterswapchain.h:29
KWin
Definition
activation_test.cpp:20
KWin::format
GLenum format
Definition
gltexture.cpp:49
Generated on Sat Feb 17 2024 01:42:09 for KWin by
1.10.0