Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
Loading...
Searching...
No Matches
qwaylandshmbackingstore_p.h
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QWAYLANDSHMBACKINGSTORE_H
6
#
define
QWAYLANDSHMBACKINGSTORE_H
7
8
//
9
// W A R N I N G
10
// -------------
11
//
12
// This file is not part of the Qt API. It exists purely as an
13
// implementation detail. This header file may change from version to
14
// version without notice, or even be removed.
15
//
16
// We mean it.
17
//
18
19
#
include
<
QtWaylandClient
/
private
/
qwaylandbuffer_p
.
h
>
20
21
#
include
<
qpa
/
qplatformbackingstore
.
h
>
22
#
include
<
QtGui
/
QImage
>
23
#
include
<
qpa
/
qplatformwindow
.
h
>
24
#
include
<
QMutex
>
25
26
QT_BEGIN_NAMESPACE
27
28
namespace
QtWaylandClient
{
29
30
class
QWaylandDisplay;
31
class
QWaylandAbstractDecoration;
32
class
QWaylandWindow;
33
34
class
Q_WAYLANDCLIENT_EXPORT
QWaylandShmBuffer
:
public
QWaylandBuffer
{
35
public
:
36
QWaylandShmBuffer
(
QWaylandDisplay
*
display
,
37
const
QSize
&
size
,
QImage
::
Format
format
,
qreal
scale
= 1,
wl_event_queue
*
customEventQueue
=
nullptr
);
38
~
QWaylandShmBuffer
()
override
;
39
QSize
size
()
const
override
{
return
mImage
.
size
(); }
40
int
scale
()
const
override
{
return
int
(
mImage
.
devicePixelRatio
()); }
41
QImage
*
image
() {
return
&
mImage
; }
42
43
QRegion
&
dirtyRegion
() {
return
mDirtyRegion
; }
44
45
uint
age
()
const
{
return
mAge
; }
46
void
setAge
(
uint
age
) {
mAge
=
age
; }
47
48
private
:
49
Q_DISABLE_COPY
(
QWaylandShmBuffer
)
50
51
QImage
mImage
;
52
struct
wl_shm_pool
*
mShmPool
=
nullptr
;
53
QRegion
mDirtyRegion
;
54
uint
mAge
= 0;
55
};
56
57
class
Q_WAYLANDCLIENT_EXPORT
QWaylandShmBackingStore
:
public
QPlatformBackingStore
58
{
59
public
:
60
QWaylandShmBackingStore
(
QWindow
*
window
,
QWaylandDisplay
*
display
);
61
~
QWaylandShmBackingStore
()
override
;
62
63
QPaintDevice
*
paintDevice
()
override
;
64
void
flush
(
QWindow
*
window
,
const
QRegion
&
region
,
const
QPoint
&
offset
)
override
;
65
void
resize
(
const
QSize
&
size
,
const
QRegion
&
staticContents
)
override
;
66
void
beginPaint
(
const
QRegion
&
region
)
override
;
67
void
endPaint
()
override
;
68
bool
scroll
(
const
QRegion
&
region
,
int
dx
,
int
dy
)
override
;
69
70
QImage
*
contentSurface
()
const
;
71
bool
recreateBackBufferIfNeeded
();
72
void
finalizeBackBuffer
();
73
74
QWaylandWindow
*
waylandWindow
()
const
;
75
void
iterateBuffer
();
76
77
#
if
QT_CONFIG
(
opengl
)
78
QImage
toImage
()
const
override
;
79
#
endif
80
81
private
:
82
Q_DISABLE_COPY
(
QWaylandShmBackingStore
)
83
84
void
updateDirtyStates
(
const
QRegion
&
region
);
85
QWaylandShmBuffer
*
getBuffer
(
const
QSize
&
size
,
bool
&
bufferWasRecreated
);
86
87
QWaylandDisplay
*
mDisplay
=
nullptr
;
88
QList
<
QWaylandShmBuffer
*>
mBuffers
;
89
QWaylandShmBuffer
*
mFrontBuffer
=
nullptr
;
90
QWaylandShmBuffer
*
mBackBuffer
=
nullptr
;
91
bool
mPainting
=
false
;
92
bool
mPendingFlush
=
false
;
93
QRegion
mPendingRegion
;
94
QMutex
mMutex
;
95
96
QSize
mRequestedSize
;
97
Qt
::
WindowFlags
mCurrentWindowFlags
;
98
struct
wl_event_queue
*
mEventQueue
=
nullptr
;
99
};
100
101
}
102
103
QT_END_NAMESPACE
104
105
#
endif
QtWaylandClient::QWaylandShmBackingStore
Definition
qwaylandshmbackingstore_p.h:58
QtWaylandClient::QWaylandShmBuffer
Definition
qwaylandshmbackingstore_p.h:34
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QtWaylandClient
Definition
qwaylandclientextension.h:16
QtWaylandClient::qtCursorShapeToWaylandShape
static QtWayland::wp_cursor_shape_device_v1::shape qtCursorShapeToWaylandShape(Qt::CursorShape cursorShape)
Definition
qwaylandcursor.cpp:225
QtWayland
Definition
qwaylanddisplay_p.h:54
qtbase
src
plugins
platforms
wayland
qwaylandshmbackingstore_p.h
Generated on
for Qt by
1.18.0