Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qohoseglplatformcontext.cpp
Go to the documentation of this file.
1
// Copyright (C) 2025 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
4
#
include
"qohoseglplatformcontext.h"
5
#
include
"qohosfloatingwindow.h"
6
#
include
"qohosplatformwindow.h"
7
#
include
"render/qohosegl.h"
8
9
#
include
<
QtGui
/
private
/
qeglpbuffer_p
.
h
>
10
#
include
<
QtGui
/
qsurface
.
h
>
11
12
QT_BEGIN_NAMESPACE
13
14
QOhosEGLPlatformContext::QOhosEGLPlatformContext(
const
QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display)
15
: QEGLPlatformContext(format, share, display,
nullptr
)
16
{
17
}
18
19
void
QOhosEGLPlatformContext::swapBuffers(QPlatformSurface *surface)
20
{
21
QEGLPlatformContext::swapBuffers(surface);
22
23
auto
*ohosWindow =
static_cast
<
QOhosFloatingWindow
*>(surface);
24
auto
*ohosView = ohosWindow !=
nullptr
25
? ohosWindow->ownedViewOrNull()
26
:
nullptr
;
27
if
(ohosView !=
nullptr
)
28
ohosView->handleSurfaceContentsUpdated();
29
}
30
31
EGLSurface QOhosEGLPlatformContext::eglSurfaceForPlatformSurface(QPlatformSurface *surface)
32
{
33
if
(surface->surface()->surfaceClass() != QSurface::Window)
34
return
static_cast
<QEGLPbuffer *>(surface)->pbuffer();
35
36
auto
*ohosWindow =
static_cast
<
QOhosFloatingWindow
*>(surface);
37
auto
*ohosWindowSurface = ohosWindow->ownedSurfaceOrNull();
38
39
return
ohosWindowSurface !=
nullptr
40
? ohosWindowSurface->tryGetOrCreateEGLWindowSurface(eglDisplay(), eglConfig())
41
: EGL_NO_SURFACE;
42
}
43
44
QT_END_NAMESPACE
QOhosFloatingWindow
Definition
qohosfloatingwindow.h:19
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtbase
src
plugins
platforms
ohos
qohoseglplatformcontext.cpp
Generated on
for Qt by
1.16.1