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
qandroidplatformoffscreensurface.cpp
Go to the documentation of this file.
1
// Copyright (C) 2020 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
"qandroidplatformoffscreensurface.h"
6
7
#
include
<
QtGui
/
private
/
qeglconvenience_p
.
h
>
8
9
QT_BEGIN_NAMESPACE
10
11
QAndroidPlatformOffscreenSurface
::
QAndroidPlatformOffscreenSurface
(
12
ANativeWindow *nativeSurface, EGLDisplay display, QOffscreenSurface *offscreenSurface)
13
: QPlatformOffscreenSurface(offscreenSurface), m_display(display), m_surface(EGL_NO_SURFACE)
14
{
15
// FIXME: Read surface format properties from native surface using ANativeWindow_getFormat
16
m_format.setAlphaBufferSize(8);
17
m_format.setRedBufferSize(8);
18
m_format.setGreenBufferSize(8);
19
m_format.setBlueBufferSize(8);
20
21
if
(EGLConfig config = q_configFromGLFormat(m_display, m_format,
false
)) {
22
const
EGLint attributes[] = { EGL_NONE };
23
m_surface = eglCreateWindowSurface(m_display, config, nativeSurface, attributes);
24
}
25
}
26
27
QAndroidPlatformOffscreenSurface
::~
QAndroidPlatformOffscreenSurface
()
28
{
29
eglDestroySurface(m_display, m_surface);
30
}
31
32
QT_END_NAMESPACE
QAndroidPlatformOffscreenSurface
Definition
qandroidplatformoffscreensurface.h:17
QAndroidPlatformOffscreenSurface::~QAndroidPlatformOffscreenSurface
~QAndroidPlatformOffscreenSurface()
Definition
qandroidplatformoffscreensurface.cpp:27
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtbase
src
plugins
platforms
android
qandroidplatformoffscreensurface.cpp
Generated on
for Qt by
1.18.0