summaryrefslogtreecommitdiffstats
path: root/customcontext/texture/eglgralloctexture.h
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@jollamobile.com>2014-05-23 15:07:42 +0200
committerGunnar Sletta <gunnar.sletta@jollamobile.com>2014-05-26 13:53:56 +0200
commit22095133d2af68f78d6905f215035f02a8933e68 (patch)
tree6e4c84783f722c7579aeb0e574de76249ad4e0c6 /customcontext/texture/eglgralloctexture.h
parent488a8184b90801f3987779b5b1b046cf67ba0d4b (diff)
Support eglgralloctextures through QQuickWindow::createTexture().
Change-Id: I8cbdfde5b47beb849327e4ae61c5009005ffc79c Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Diffstat (limited to 'customcontext/texture/eglgralloctexture.h')
-rw-r--r--customcontext/texture/eglgralloctexture.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/customcontext/texture/eglgralloctexture.h b/customcontext/texture/eglgralloctexture.h
index 2d05f7e..94d36b9 100644
--- a/customcontext/texture/eglgralloctexture.h
+++ b/customcontext/texture/eglgralloctexture.h
@@ -72,6 +72,8 @@ public:
bool hasAlpha() const { return m_hasAlpha; }
+ static NativeBuffer *create(const QImage &image);
+
private:
QAtomicInt m_ref;
EGLImageKHR m_eglImage;
@@ -91,10 +93,13 @@ public:
virtual bool hasMipmaps() const;
virtual void bind();
+ static EglGrallocTexture *create(const QImage &image);
+
private:
mutable GLuint m_id;
NativeBuffer *m_buffer;
bool m_bound;
+ bool m_ownsBuffer;
};
class EglGrallocTextureFactory : public QQuickTextureFactory