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
qwaylandglcontext_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists purely as an
9// implementation detail. This header file may change from version to
10// version without notice, or even be removed.
11//
12// We mean it.
13//
14
15#ifndef QWAYLANDGLCONTEXT_H
16#define QWAYLANDGLCONTEXT_H
17
18#include "qwaylandeglinclude_p.h" //must be first
19
20#include <QtWaylandClient/private/qwaylanddisplay_p.h>
21#include <QtGui/private/qeglplatformcontext_p.h>
22#include <qpa/qplatformopenglcontext.h>
23
25
28
29namespace QtWaylandClient {
30
31class QWaylandEglWindow;
32class DecorationsBlitter;
33
34class Q_WAYLANDCLIENT_EXPORT QWaylandGLContext : public QEGLPlatformContext
35{
36public:
39 void swapBuffers(QPlatformSurface *surface) override;
40
41 bool makeCurrent(QPlatformSurface *surface) override;
42 void doneCurrent() override;
43
44 void beginFrame() override;
45 void endFrame() override;
46
47 GLuint defaultFramebufferObject(QPlatformSurface *surface) const override;
48
49 QFunctionPointer getProcAddress(const char *procName) override;
50
51protected:
52 EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) override;
53 EGLSurface createTemporaryOffscreenSurface() override;
54 void destroyTemporaryOffscreenSurface(EGLSurface surface) override;
55
56private:
57 QWaylandDisplay *m_display = nullptr;
58 EGLContext m_decorationsContext;
59 DecorationsBlitter *m_blitter = nullptr;
60 bool m_supportNonBlockingSwap = true;
61 EGLenum m_api;
62 wl_surface *m_wlSurface = nullptr;
63 wl_egl_window *m_eglWindow = nullptr;
64 QWaylandEglWindow *m_currentWindow = nullptr;
65 QMetaObject::Connection m_reconnectionWatcher;
66};
67
68}
69
71
72#endif // QWAYLANDGLCONTEXT_H
An EGL context implementation.
\inmodule QtCore Represents a handle to a signal-slot (or signal-functor) connection.
The QOpenGLShaderProgram class allows OpenGL shader programs to be linked and used.
The QPlatformOpenGLContext class provides an abstraction for native GL contexts.
The QPlatformSurface class provides an abstraction for a surface.
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
struct wl_display * display
Definition linuxdmabuf.h:41
Combined button and popup list for selecting options.
typedef EGLSurface(EGLAPIENTRYP PFNEGLCREATESTREAMPRODUCERSURFACEKHRPROC)(EGLDisplay dpy
typedef EGLDisplay(EGLAPIENTRYP PFNEGLGETPLATFORMDISPLAYEXTPROC)(EGLenum platform
GLint GLsizei GLsizei GLenum format
const void * getProcAddress
#define GLuint