diff options
author | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-05-23 15:07:42 +0200 |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@jollamobile.com> | 2014-05-26 13:53:56 +0200 |
commit | 22095133d2af68f78d6905f215035f02a8933e68 (patch) | |
tree | 6e4c84783f722c7579aeb0e574de76249ad4e0c6 /customcontext/texture/eglgralloctexture.h | |
parent | 488a8184b90801f3987779b5b1b046cf67ba0d4b (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.h | 5 |
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 |