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
4#ifndef QQNXEGLWINDOW_H
5#define QQNXEGLWINDOW_H
6
7#include "qqnxwindow.h"
8#include <QtCore/QMutex>
9#include <QtCore/QLoggingCategory>
10
12
13Q_DECLARE_LOGGING_CATEGORY(lcQpaWindowEgl);
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;
26 void ensureInitialized(QQnxGLContext *context);
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
57QT_END_NAMESPACE
58
59#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:31
void initWindow()
Q_LOGGING_CATEGORY(lcEventDispatcher, "qt.eventdispatcher")
#define _SCREEN_VERSION
Definition qqnxscreen.h:18
#define _SCREEN_MAKE_VERSION(major, minor, patch)
Definition qqnxscreen.h:17