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#ifndef QSGDEFAULTINTERNALIMAGENODE_P_H
6#define QSGDEFAULTINTERNALIMAGENODE_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <private/qsgadaptationlayer_p.h>
20#include <private/qsgbasicinternalimagenode_p.h>
21#include <QtQuick/qsgtexturematerial.h>
22
23QT_BEGIN_NAMESPACE
24
25class QSGDefaultRenderContext;
26
27class Q_QUICK_PRIVATE_EXPORT QSGSmoothTextureMaterial : public QSGTextureMaterial
28{
29public:
30 QSGSmoothTextureMaterial();
31
32 void setTexture(QSGTexture *texture);
33
34protected:
35 QSGMaterialType *type() const override;
36 QSGMaterialShader *createShader(QSGRendererInterface::RenderMode renderMode) const override;
37};
38
39class Q_QUICK_PRIVATE_EXPORT QSGDefaultInternalImageNode : public QSGBasicInternalImageNode
40{
41public:
42 QSGDefaultInternalImageNode(QSGDefaultRenderContext *rc);
43
44 void setMipmapFiltering(QSGTexture::Filtering filtering) override;
45 void setFiltering(QSGTexture::Filtering filtering) override;
46 void setHorizontalWrapMode(QSGTexture::WrapMode wrapMode) override;
47 void setVerticalWrapMode(QSGTexture::WrapMode wrapMode) override;
48
49 void updateMaterialAntialiasing() override;
50 void setMaterialTexture(QSGTexture *texture) override;
51 QSGTexture *materialTexture() const override;
52 bool updateMaterialBlending() override;
53 bool supportsWrap(const QSize &size) const override;
54
55private:
56 QSGDefaultRenderContext *m_rc;
57 QSGOpaqueTextureMaterial m_material;
58 QSGTextureMaterial m_materialO;
59 QSGSmoothTextureMaterial m_smoothMaterial;
60};
61
62QT_END_NAMESPACE
63
64#endif
65

source code of qtdeclarative/src/quick/scenegraph/qsgdefaultinternalimagenode_p.h