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
qwlserverbufferintegration_p.h
Go to the documentation of this file.
1// Copyright (C) 2021 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef QWAYLANDSERVERBUFFERINTEGRATION_H
5#define QWAYLANDSERVERBUFFERINTEGRATION_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtCore/private/qglobal_p.h>
19#include <QtCore/QSize>
20#include <QtGui/qopengl.h>
21
22#include <QtWaylandCompositor/qtwaylandcompositorglobal.h>
23
24struct wl_client;
25struct wl_resource;
26
28
30class QOpenGLContext;
31class QOpenGLTexture;
32class QImage;
33
34namespace QtWayland {
35class Display;
36
37class Q_WAYLANDCOMPOSITOR_EXPORT ServerBuffer
38{
39public:
40 enum Format {
43 Custom
44 };
45
47 virtual ~ServerBuffer();
48
49 virtual struct ::wl_resource *resourceForClient(struct ::wl_client *) = 0;
50 virtual bool bufferInUse() { return true; }
51
53 virtual void releaseOpenGlTexture() {}
54
55 virtual bool isYInverted() const;
56
57 QSize size() const;
58 Format format() const;
59protected:
62};
63
64class Q_WAYLANDCOMPOSITOR_EXPORT ServerBufferIntegration
65{
66public:
69
70 virtual bool initializeHardware(QWaylandCompositor *);
71
75 uint glInternalFormat)
76 {
79 Q_UNUSED(glInternalFormat);
80 return nullptr;
81 }
82};
83
84}
85
87
88#endif //QWAYLANDSERVERBUFFERINTEGRATION_H
\inmodule QtGui
Definition qimage.h:37
\inmodule QtGui
\inmodule QtGui
\inmodule QtCore
Definition qsize.h:25
\qmltype WaylandCompositor \instantiates QWaylandCompositor \inqmlmodule QtWayland....
virtual bool supportsFormat(ServerBuffer::Format format) const =0
virtual ServerBuffer * createServerBufferFromData(QByteArrayView view, const QSize &size, uint glInternalFormat)
virtual ServerBuffer * createServerBufferFromImage(const QImage &qimage, ServerBuffer::Format format)=0
virtual QOpenGLTexture * toOpenGlTexture()=0
virtual struct::wl_resource * resourceForClient(struct ::wl_client *)=0
Format
Definition ddsheader.h:14
Combined button and popup list for selecting options.
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLint GLsizei GLsizei GLenum format
#define Q_UNUSED(x)
struct _XDisplay Display
unsigned int uint
Definition qtypes.h:34
QQuickView * view
[0]