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
qqnxeglwindow.h
Go to the documentation of this file.
1// Copyright (C) 2013 BlackBerry Limited. All rights reserved.
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 QQNXEGLWINDOW_H
6#define QQNXEGLWINDOW_H
7
8#include "qqnxwindow.h"
9#include <QtCore/QMutex>
10#include <QtCore/QLoggingCategory>
11
13
14Q_DECLARE_LOGGING_CATEGORY(lcQpaWindowEgl);
15
16class QQnxGLContext;
17
19{
20public:
21 QQnxEglWindow(QWindow *window, screen_context_t context, bool needRootWindow);
23
24 EGLSurface surface() const;
25
26 bool isInitialized() const;
27 void ensureInitialized(QQnxGLContext *context);
28
29 void setGeometry(const QRect &rect) override;
30
31 QSurfaceFormat format() const override { return m_format; }
32
33protected:
34 int pixelFormat() const override;
35 void resetBuffers() override;
36
37private:
38 void createEGLSurface(QQnxGLContext *context);
39 void destroyEGLSurface();
40
41 QSize m_requestedBufferSize;
42
43 // This mutex is used to protect access to the m_requestedBufferSize
44 // member. This member is used in conjunction with QQnxGLContext::requestNewSurface()
45 // to coordinate recreating the EGL surface which involves destroying any
46 // existing EGL surface; resizing the native window buffers; and creating a new
47 // EGL surface. All of this has to be done from the thread that is calling
48 // QQnxGLContext::makeCurrent()
49 mutable QMutex m_mutex;
50
51 QAtomicInt m_newSurfaceRequested;
52 EGLDisplay m_eglDisplay;
53 EGLConfig m_eglConfig;
54 EGLSurface m_eglSurface;
55 QSurfaceFormat m_format;
56};
57
58QT_END_NAMESPACE
59
60#endif // QQNXEGLWINDOW_H
bool isInitialized() const
void resetBuffers() override
QQnxEglWindow(QWindow *window, screen_context_t context, bool needRootWindow)
QSurfaceFormat format() const override
Returns the actual surface format of the window.
int pixelFormat() const override
EGLSurface surface() const
void ensureInitialized(QQnxGLContext *context)
void setGeometry(const QRect &rect) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.
void doneCurrent() override
The QQnxWindow is the base class of the various classes used as instances of QPlatformWindow in the Q...
Definition qqnxwindow.h:32
void initWindow()
Combined button and popup list for selecting options.
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
#define _SCREEN_VERSION
Definition qqnxscreen.h:19
#define _SCREEN_MAKE_VERSION(major, minor, patch)
Definition qqnxscreen.h:18