aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/compressedtexture/qsgpkmhandler_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/compressedtexture/qsgpkmhandler_p.h')
-rw-r--r--src/quick/scenegraph/compressedtexture/qsgpkmhandler_p.h34
1 files changed, 5 insertions, 29 deletions
diff --git a/src/quick/scenegraph/compressedtexture/qsgpkmhandler_p.h b/src/quick/scenegraph/compressedtexture/qsgpkmhandler_p.h
index eb6b2e46c0..6154c51b84 100644
--- a/src/quick/scenegraph/compressedtexture/qsgpkmhandler_p.h
+++ b/src/quick/scenegraph/compressedtexture/qsgpkmhandler_p.h
@@ -51,42 +51,18 @@
// We mean it.
//
-#include <QOpenGLFunctions>
-#include <QQuickImageProvider>
-#include <QtQuick/QSGTexture>
-#include <QUrl>
+#include "qsgtexturefilehandler_p.h"
QT_BEGIN_NAMESPACE
-class QSGPkmHandler
+class QSGPkmHandler : public QSGTextureFileHandler
{
public:
- QSGPkmHandler() {}
+ using QSGTextureFileHandler::QSGTextureFileHandler;
- QQuickTextureFactory *read(QIODevice *device);
-};
-
-class QEtcTexture : public QSGTexture, protected QOpenGLFunctions
-{
- Q_OBJECT
-public:
- QEtcTexture();
- ~QEtcTexture();
-
- void bind();
-
- QSize textureSize() const { return m_size; }
- int textureId() const;
-
- bool hasAlphaChannel() const;
- bool hasMipmaps() const { return false; }
+ static bool canRead(const QByteArray &suffix, const QByteArray &block);
- QByteArray m_data;
- QSize m_size;
- QSize m_paddedSize;
- GLuint m_texture_id;
- GLenum m_type;
- bool m_uploaded;
+ QQuickTextureFactory *read() override;
};
QT_END_NAMESPACE