diff options
author | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-06-17 13:30:05 +0200 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@qt.io> | 2020-06-17 16:39:52 +0200 |
commit | 899e69d0407d7b2206e1308d96960934880469cb (patch) | |
tree | 853ca41006fd954c8359ce9daa7dc5d5142afc76 /src/plugins | |
parent | 15777b94ee96035be79b363f3b1e54f02b5d2cd5 (diff) |
Add some blind fixes for the OpenVG scenegraph backend
Change-Id: I49e7c124bf168d4c9703653e20b259c8ef853114
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/plugins')
6 files changed, 6 insertions, 24 deletions
diff --git a/src/plugins/scenegraph/openvg/qsgopenvgcontext.cpp b/src/plugins/scenegraph/openvg/qsgopenvgcontext.cpp index a5231e15d1..0d38cd2ab1 100644 --- a/src/plugins/scenegraph/openvg/qsgopenvgcontext.cpp +++ b/src/plugins/scenegraph/openvg/qsgopenvgcontext.cpp @@ -106,7 +106,7 @@ QSGTexture *QSGOpenVGRenderContext::createTexture(const QImage &image, uint flag return new QSGOpenVGTexture(tmp, flags); } -QSGRenderer *QSGOpenVGRenderContext::createRenderer() +QSGRenderer *QSGOpenVGRenderContext::createRenderer(QSGRendererInterface::RenderMode) { return new QSGOpenVGRenderer(this); } diff --git a/src/plugins/scenegraph/openvg/qsgopenvgcontext_p.h b/src/plugins/scenegraph/openvg/qsgopenvgcontext_p.h index 15d0b3f344..5e14049175 100644 --- a/src/plugins/scenegraph/openvg/qsgopenvgcontext_p.h +++ b/src/plugins/scenegraph/openvg/qsgopenvgcontext_p.h @@ -67,7 +67,7 @@ public: void invalidate() override; void renderNextFrame(QSGRenderer *renderer, uint fboId) override; QSGTexture *createTexture(const QImage &image, uint flags) const override; - QSGRenderer *createRenderer() override; + QSGRenderer *createRenderer(QSGRendererInterface::RenderMode renderMode = QSGRendererInterface::RenderMode2D) override; int maxTextureSize() const override; // QSGRendererInterface interface diff --git a/src/plugins/scenegraph/openvg/qsgopenvgrenderer.cpp b/src/plugins/scenegraph/openvg/qsgopenvgrenderer.cpp index acd4cf88dc..1720182ffb 100644 --- a/src/plugins/scenegraph/openvg/qsgopenvgrenderer.cpp +++ b/src/plugins/scenegraph/openvg/qsgopenvgrenderer.cpp @@ -60,17 +60,6 @@ QSGOpenVGRenderer::~QSGOpenVGRenderer() } -void QSGOpenVGRenderer::renderScene(uint fboId) -{ - Q_UNUSED(fboId) - class B : public QSGBindable - { - public: - void bind() const { } - } bindable; - QSGRenderer::renderScene(bindable); -} - void QSGOpenVGRenderer::render() { //Clear the window geometry with the clear color diff --git a/src/plugins/scenegraph/openvg/qsgopenvgrenderer_p.h b/src/plugins/scenegraph/openvg/qsgopenvgrenderer_p.h index 24cabd1b89..9b5470ec60 100644 --- a/src/plugins/scenegraph/openvg/qsgopenvgrenderer_p.h +++ b/src/plugins/scenegraph/openvg/qsgopenvgrenderer_p.h @@ -52,7 +52,6 @@ public: void nodeChanged(QSGNode *node, QSGNode::DirtyState state) override; - void renderScene(uint fboId = 0) final; void render() final; }; diff --git a/src/plugins/scenegraph/openvg/qsgopenvgtexture.cpp b/src/plugins/scenegraph/openvg/qsgopenvgtexture.cpp index dd2fdc7020..19a61b5789 100644 --- a/src/plugins/scenegraph/openvg/qsgopenvgtexture.cpp +++ b/src/plugins/scenegraph/openvg/qsgopenvgtexture.cpp @@ -58,9 +58,9 @@ QSGOpenVGTexture::~QSGOpenVGTexture() vgDestroyImage(m_image); } -int QSGOpenVGTexture::textureId() const +qint64 QSGOpenVGTexture::comparisonKey() const { - return static_cast<int>(m_image); + return qint64(static_cast<int>(m_image)); } QSize QSGOpenVGTexture::textureSize() const @@ -115,9 +115,4 @@ bool QSGOpenVGTexture::hasMipmaps() const return false; } -void QSGOpenVGTexture::bind() -{ - // No need to bind -} - QT_END_NAMESPACE diff --git a/src/plugins/scenegraph/openvg/qsgopenvgtexture.h b/src/plugins/scenegraph/openvg/qsgopenvgtexture.h index 523c9e690d..a097b1a102 100644 --- a/src/plugins/scenegraph/openvg/qsgopenvgtexture.h +++ b/src/plugins/scenegraph/openvg/qsgopenvgtexture.h @@ -52,14 +52,13 @@ public: QSGOpenVGTexture(const QImage &image, uint flags); ~QSGOpenVGTexture(); - int textureId() const override; + qint64 comparisonKey() const override; QSize textureSize() const override; bool hasAlphaChannel() const override; bool hasMipmaps() const override; - void bind() override; private: - VGImage m_image;; + VGImage m_image; }; QT_END_NAMESPACE |