aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qquickitemrhiintegration/testrhiitem.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qquickitemrhiintegration/testrhiitem.h')
-rw-r--r--tests/auto/quick/qquickitemrhiintegration/testrhiitem.h61
1 files changed, 0 insertions, 61 deletions
diff --git a/tests/auto/quick/qquickitemrhiintegration/testrhiitem.h b/tests/auto/quick/qquickitemrhiintegration/testrhiitem.h
deleted file mode 100644
index 94a50a6d9b..0000000000
--- a/tests/auto/quick/qquickitemrhiintegration/testrhiitem.h
+++ /dev/null
@@ -1,61 +0,0 @@
-// Copyright (C) 2022 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
-
-#ifndef TESTRHIITEM_H
-#define TESTRHIITEM_H
-
-#include "rhiitem.h"
-
-class TestRenderer : public RhiItemRenderer
-{
-public:
- void initialize(QRhi *rhi, QRhiTexture *outputTexture) override;
- void synchronize(RhiItem *item) override;
- void render(QRhiCommandBuffer *cb) override;
-
-private:
- QRhi *m_rhi = nullptr;
- QRhiTexture *m_output = nullptr;
- QScopedPointer<QRhiRenderBuffer> m_ds;
- QScopedPointer<QRhiTextureRenderTarget> m_rt;
- QScopedPointer<QRhiRenderPassDescriptor> m_rp;
-
- struct {
- QRhiResourceUpdateBatch *resourceUpdates = nullptr;
- QScopedPointer<QRhiBuffer> vbuf;
- QScopedPointer<QRhiBuffer> ubuf;
- QScopedPointer<QRhiShaderResourceBindings> srb;
- QScopedPointer<QRhiGraphicsPipeline> ps;
- QScopedPointer<QRhiSampler> sampler;
- QScopedPointer<QRhiTexture> tex;
- QMatrix4x4 mvp;
- } scene;
-
- struct {
- QColor color;
- } itemData;
-
- void initScene();
- void updateTexture();
-};
-
-class TestRhiItem : public RhiItem
-{
- Q_OBJECT
- QML_NAMED_ELEMENT(TestRhiItem)
- Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged)
-
-public:
- RhiItemRenderer *createRenderer() override { return new TestRenderer; }
-
- QColor color() const { return m_color; }
- void setColor(QColor c);
-
-signals:
- void colorChanged();
-
-private:
- QColor m_color;
-};
-
-#endif