Qt 6.x
The Qt SDK
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
4#ifndef QQNXEGLWINDOW_H
5#define QQNXEGLWINDOW_H
6
7#include "qqnxwindow.h"
8#include <QtCore/QMutex>
9
11
12class QQnxGLContext;
13
15{
16public:
17 QQnxEglWindow(QWindow *window, screen_context_t context, bool needRootWindow);
19
20 EGLSurface surface() const;
21
22 bool isInitialized() const;
24
25 void setGeometry(const QRect &rect) override;
26
27 QSurfaceFormat format() const override { return m_format; }
28
29protected:
30 int pixelFormat() const override;
31 void resetBuffers() override;
32
33private:
34 void createEGLSurface(QQnxGLContext *context);
35 void destroyEGLSurface();
36
37 QSize m_requestedBufferSize;
38
39 // This mutex is used to protect access to the m_requestedBufferSize
40 // member. This member is used in conjunction with QQnxGLContext::requestNewSurface()
41 // to coordinate recreating the EGL surface which involves destroying any
42 // existing EGL surface; resizing the native window buffers; and creating a new
43 // EGL surface. All of this has to be done from the thread that is calling
44 // QQnxGLContext::makeCurrent()
45 mutable QMutex m_mutex;
46
47 QAtomicInt m_newSurfaceRequested;
48 EGLDisplay m_eglDisplay;
49 EGLConfig m_eglConfig;
50 EGLSurface m_eglSurface;
51 QSurfaceFormat m_format;
52};
53
55
56#endif // QQNXEGLWINDOW_H
\inmodule QtCore
Definition qatomic.h:112
\inmodule QtCore
Definition qmutex.h:285
QWindow * window() const
Returns the window which belongs to the QPlatformWindow.
bool isInitialized() const
void resetBuffers() override
QSurfaceFormat format() const override
Returns the actual surface format of the window.
int pixelFormat() const override
EGLSurface surface() const
void setGeometry(const QRect &rect) override
This function is called by Qt whenever a window is moved or resized using the QWindow API.
The QQnxWindow is the base class of the various classes used as instances of QPlatformWindow in the Q...
Definition qqnxwindow.h:28
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:25
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
\inmodule QtGui
Definition qwindow.h:63
rect
[4]
Combined button and popup list for selecting options.
static void * context
typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform
static void ensureInitialized()