1// Copyright (C) 2019 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
4#ifndef VULKANWRAPPER_H
5#define VULKANWRAPPER_H
6
7#include <QOpenGLContext>
8
9QT_BEGIN_NAMESPACE
10
11class VulkanWrapper;
12struct VulkanImageWrapper;
13class VulkanWrapperPrivate;
14
15class QOpenGLContext;
16class QImage;
17
18class VulkanWrapper
19{
20public:
21 VulkanWrapper(QOpenGLContext *glContext);
22
23 VulkanImageWrapper *createTextureImage(const QImage &img);
24 VulkanImageWrapper *createTextureImageFromData(const uchar *pixels, uint bufferSize, const QSize &size, uint glInternalFormat);
25 int getImageInfo(const VulkanImageWrapper *imgWrapper, int *memSize, int *w = nullptr, int *h = nullptr);
26 void freeTextureImage(VulkanImageWrapper *imageWrapper);
27
28private:
29 VulkanWrapperPrivate *d_ptr;
30};
31
32QT_END_NAMESPACE
33
34#endif // VULKANWRAPPER_H
35

source code of qtwayland/src/hardwareintegration/compositor/vulkan-server/vulkanwrapper.h