| 1 |
// Copyright (C) 2021 The Qt Company Ltd. |
| 2 |
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only |
| 3 |
|
| 4 |
#ifndef RHIWIDGET_P_H |
| 5 |
#define RHIWIDGET_P_H |
| 6 |
|
| 7 |
#include "rhiwidget.h" |
| 8 |
|
| 9 |
#include <private/qwidget_p.h> |
| 10 |
#include <private/qbackingstorerhisupport_p.h> |
| 11 |
|
| 12 |
class QRhiWidgetPrivate : public QWidgetPrivate |
| 13 |
{ |
| 14 |
Q_DECLARE_PUBLIC(QRhiWidget) |
| 15 |
public: |
| 16 |
TextureData texture() const override |
| 17 |
{ |
| 18 |
TextureData td; |
| 19 |
if (!textureInvalid) |
| 20 |
td.textureLeft = t; |
| 21 |
return td; |
| 22 |
} |
| 23 |
QPlatformBackingStoreRhiConfig rhiConfig() const override; |
| 24 |
|
| 25 |
void ensureRhi(); |
| 26 |
void ensureTexture(); |
| 27 |
|
| 28 |
QRhi *rhi = nullptr; |
| 29 |
QRhiTexture *t = nullptr; |
| 30 |
bool noSize = false; |
| 31 |
QPlatformBackingStoreRhiConfig config; |
| 32 |
QRhiTexture::Format format = QRhiTexture::RGBA8; |
| 33 |
QSize explicitSize; |
| 34 |
QBackingStoreRhiSupport offscreenRenderer; |
| 35 |
bool textureInvalid = false; |
| 36 |
}; |
| 37 |
|
| 38 |
#endif |