aboutsummaryrefslogtreecommitdiffstats
path: root/softwarecontext/pixmaptexture.h
diff options
context:
space:
mode:
Diffstat (limited to 'softwarecontext/pixmaptexture.h')
-rw-r--r--softwarecontext/pixmaptexture.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/softwarecontext/pixmaptexture.h b/softwarecontext/pixmaptexture.h
new file mode 100644
index 0000000000..314005f82a
--- /dev/null
+++ b/softwarecontext/pixmaptexture.h
@@ -0,0 +1,24 @@
+#ifndef PIXMAPTEXTURE_H
+#define PIXMAPTEXTURE_H
+
+#include <private/qsgtexture_p.h>
+
+class PixmapTexture : public QSGTexture
+{
+ Q_OBJECT
+public:
+ PixmapTexture(const QImage &image);
+
+ virtual int textureId() const;
+ virtual QSize textureSize() const;
+ virtual bool hasAlphaChannel() const;
+ virtual bool hasMipmaps() const;
+ virtual void bind();
+
+ QPixmap pixmap() const { return m_pixmap; }
+
+private:
+ QPixmap m_pixmap;
+};
+
+#endif // PIXMAPTEXTURE_H