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
qminimaleglbackingstore.cpp
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
#
include
"qminimaleglbackingstore.h"
6
7
#
include
<
QtGui
/
QOpenGLContext
>
8
#
include
<
QtOpenGL
/
QOpenGLPaintDevice
>
9
10
QT_BEGIN_NAMESPACE
11
12
QMinimalEglBackingStore
::
QMinimalEglBackingStore
(
QWindow
*
window
)
13
: QPlatformBackingStore(window)
14
, m_context(
new
QOpenGLContext)
15
, m_device(
nullptr
)
16
{
17
m_context->setFormat(window->requestedFormat());
18
m_context->setScreen(window->screen());
19
m_context->create();
20
}
21
22
QMinimalEglBackingStore
::~
QMinimalEglBackingStore
()
23
{
24
delete
m_context;
25
}
26
27
QPaintDevice
*
QMinimalEglBackingStore
::
paintDevice
()
28
{
29
return
m_device;
30
}
31
32
void
QMinimalEglBackingStore
::flush(QWindow *window,
const
QRegion ®ion,
const
QPoint &offset)
33
{
34
Q_UNUSED(region);
35
Q_UNUSED(offset);
36
37
#
ifdef
QEGL_EXTRA_DEBUG
38
qWarning(
"QEglBackingStore::flush %p"
, window);
39
#
endif
40
41
m_context->swapBuffers(window);
42
}
43
44
void
QMinimalEglBackingStore
::
beginPaint
(
const
QRegion &)
45
{
46
m_context->makeCurrent(window());
47
m_device =
new
QOpenGLPaintDevice(window()->size());
48
}
49
50
void
QMinimalEglBackingStore
::
endPaint
()
51
{
52
delete
m_device;
53
}
54
55
void
QMinimalEglBackingStore
::
resize
(
const
QSize &size,
const
QRegion &staticContents)
56
{
57
Q_UNUSED(size);
58
Q_UNUSED(staticContents);
59
}
60
61
QT_END_NAMESPACE
QMinimalEglBackingStore
Definition
qminimaleglbackingstore.h:16
QMinimalEglBackingStore::~QMinimalEglBackingStore
~QMinimalEglBackingStore()
Definition
qminimaleglbackingstore.cpp:22
QMinimalEglBackingStore::endPaint
void endPaint() override
This function is called after painting onto the surface has ended.
Definition
qminimaleglbackingstore.cpp:50
QMinimalEglBackingStore::resize
void resize(const QSize &size, const QRegion &staticContents) override
Definition
qminimaleglbackingstore.cpp:55
QMinimalEglBackingStore::paintDevice
QPaintDevice * paintDevice() override
Implement this function to return the appropriate paint device.
Definition
qminimaleglbackingstore.cpp:27
QMinimalEglBackingStore::beginPaint
void beginPaint(const QRegion &) override
This function is called before painting onto the surface begins, with the region in which the paintin...
Definition
qminimaleglbackingstore.cpp:44
QWindow
\inmodule QtGui
Definition
qwindow.h:64
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtbase
src
plugins
platforms
minimalegl
qminimaleglbackingstore.cpp
Generated on
for Qt by
1.18.0