Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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#include <QtCore/QLoggingCategory>
10
12
14
15class QQnxGLContext;
16
18{
19public:
20 QQnxEglWindow(QWindow *window, screen_context_t context, bool needRootWindow);
22
23 EGLSurface surface() const;
24
25 bool isInitialized() const;
27
28 void setGeometry(const QRect &rect) override;
29
30 QSurfaceFormat format() const override { return m_format; }
31
32protected:
33 int pixelFormat() const override;
34 void resetBuffers() override;
35
36private:
37 void createEGLSurface(QQnxGLContext *context);
38 void destroyEGLSurface();
39
40 QSize m_requestedBufferSize;
41
42 // This mutex is used to protect access to the m_requestedBufferSize
43 // member. This member is used in conjunction with QQnxGLContext::requestNewSurface()
44 // to coordinate recreating the EGL surface which involves destroying any
45 // existing EGL surface; resizing the native window buffers; and creating a new
46 // EGL surface. All of this has to be done from the thread that is calling
47 // QQnxGLContext::makeCurrent()
48 mutable QMutex m_mutex;
49
50 QAtomicInt m_newSurfaceRequested;
51 EGLDisplay m_eglDisplay;
52 EGLConfig m_eglConfig;
53 EGLSurface m_eglSurface;
54 QSurfaceFormat m_format;
55};
56
58
59#endif // QQNXEGLWINDOW_H
\inmodule QtCore
Definition qatomic.h:112
\inmodule QtCore
Definition qmutex.h:281
QWindow * window() const
Returns the window which belongs to the QPlatformWindow.
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 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:31
\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
#define Q_DECLARE_LOGGING_CATEGORY(name)
static void ensureInitialized()