aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
authorPaolo Angelelli <paolo.angelelli@qt.io>2016-12-29 11:43:27 +0100
committerAndy Nichols <andy.nichols@qt.io>2017-01-24 09:02:52 +0000
commit94f6071b8a36501d9da516f2bf0f251147c8b934 (patch)
tree8d19a62c5f1067023bc6c008df3f9261c320d9d4 /src/plugins
parent432eb3344b0581ea1915840365b71376388a75b2 (diff)
Fix qtdeclarative compilation
On ubuntu 14.04 building qtdeclarative from the dev branch is impossible due to various errors in the openvg plugin. Change-Id: I1f2d7d61c36428e64cf3248e550ac5c4f0baa4b0 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/scenegraph/openvg/openvg.pro1
-rw-r--r--src/plugins/scenegraph/openvg/qopenvgoffscreensurface.cpp5
-rw-r--r--src/plugins/scenegraph/openvg/qsgopenvgcontext.cpp4
-rw-r--r--src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.cpp73
-rw-r--r--src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.h32
5 files changed, 93 insertions, 22 deletions
diff --git a/src/plugins/scenegraph/openvg/openvg.pro b/src/plugins/scenegraph/openvg/openvg.pro
index 8a58796a05..6d5b190b37 100644
--- a/src/plugins/scenegraph/openvg/openvg.pro
+++ b/src/plugins/scenegraph/openvg/openvg.pro
@@ -10,6 +10,7 @@ QMAKE_TARGET_PRODUCT = "Qt Quick OpenVG Renderer (Qt $$QT_VERSION)"
QMAKE_TARGET_DESCRIPTION = "Quick OpenVG Renderer for Qt."
QMAKE_USE += openvg
+CONFIG += egl
OTHER_FILES += $$PWD/openvg.json
diff --git a/src/plugins/scenegraph/openvg/qopenvgoffscreensurface.cpp b/src/plugins/scenegraph/openvg/qopenvgoffscreensurface.cpp
index 80af227fb4..1f2709e06c 100644
--- a/src/plugins/scenegraph/openvg/qopenvgoffscreensurface.cpp
+++ b/src/plugins/scenegraph/openvg/qopenvgoffscreensurface.cpp
@@ -37,10 +37,11 @@
**
****************************************************************************/
+#include <QDebug>
#include "qopenvgoffscreensurface.h"
#include <QtGui/QImage>
-#include <QDebug>
+
QT_BEGIN_NAMESPACE
@@ -71,7 +72,7 @@ QOpenVGOffscreenSurface::QOpenVGOffscreenSurface(const QSize &size)
m_renderTarget = eglCreatePbufferFromClientBuffer(m_display,
EGL_OPENVG_IMAGE,
- (EGLClientBuffer)m_image,
+ reinterpret_cast<EGLClientBuffer>(uintptr_t(m_image)),
pbufferConfig,
0);
if (m_renderTarget == EGL_NO_SURFACE)
diff --git a/src/plugins/scenegraph/openvg/qsgopenvgcontext.cpp b/src/plugins/scenegraph/openvg/qsgopenvgcontext.cpp
index 22a80c62e8..41fce7c7fc 100644
--- a/src/plugins/scenegraph/openvg/qsgopenvgcontext.cpp
+++ b/src/plugins/scenegraph/openvg/qsgopenvgcontext.cpp
@@ -39,8 +39,6 @@
#include "qsgopenvgcontext_p.h"
#include "qsgopenvgrenderer_p.h"
-#include "qsgopenvginternalrectanglenode.h"
-#include "qsgopenvginternalimagenode.h"
#include "qsgopenvgpublicnodes.h"
#include "qsgopenvgtexture.h"
#include "qsgopenvglayer.h"
@@ -52,6 +50,8 @@
#include "qopenvgcontext_p.h"
#include <private/qsgrenderer_p.h>
+#include "qsgopenvginternalrectanglenode.h"
+#include "qsgopenvginternalimagenode.h"
// polish, animations, sync, render and swap in the render loop
Q_LOGGING_CATEGORY(QSG_OPENVG_LOG_TIME_RENDERLOOP, "qt.scenegraph.time.renderloop")
diff --git a/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.cpp b/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.cpp
index 1afc5ea7ca..e45b79706b 100644
--- a/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.cpp
+++ b/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.cpp
@@ -39,6 +39,8 @@
#include "qsgopenvgpublicnodes.h"
#include "qsgopenvghelpers.h"
+#include <VG/openvg.h>
+#include <QtGui/QPixmap>
QT_BEGIN_NAMESPACE
@@ -66,6 +68,11 @@ void QSGOpenVGRectangleNode::setRect(const QRectF &rect)
markDirty(DirtyMaterial);
}
+QRectF QSGOpenVGRectangleNode::rect() const
+{
+ return m_rect;
+}
+
void QSGOpenVGRectangleNode::setColor(const QColor &color)
{
m_color = color;
@@ -73,6 +80,11 @@ void QSGOpenVGRectangleNode::setColor(const QColor &color)
markDirty(DirtyMaterial);
}
+QColor QSGOpenVGRectangleNode::color() const
+{
+ return m_color;
+}
+
void QSGOpenVGRectangleNode::setTransform(const QOpenVGMatrix &transform)
{
// if there transform matrix is not affine, regenerate the path
@@ -177,12 +189,58 @@ QSGOpenVGImageNode::~QSGOpenVGImageNode()
}
}
+void QSGOpenVGImageNode::setRect(const QRectF &rect)
+{
+ m_rect = rect;
+ markDirty(DirtyMaterial);
+}
+
+QRectF QSGOpenVGImageNode::rect() const
+{
+ return m_rect;
+}
+
+void QSGOpenVGImageNode::setSourceRect(const QRectF &r)
+{
+ m_sourceRect = r;
+}
+
+QRectF QSGOpenVGImageNode::sourceRect() const
+{
+ return m_sourceRect;
+}
+
void QSGOpenVGImageNode::setTexture(QSGTexture *texture)
{
m_texture = texture;
markDirty(DirtyMaterial);
}
+QSGTexture *QSGOpenVGImageNode::texture() const
+{
+ return m_texture;
+}
+
+void QSGOpenVGImageNode::setFiltering(QSGTexture::Filtering filtering)
+{
+ m_filtering = filtering;
+ markDirty(DirtyMaterial);
+}
+
+QSGTexture::Filtering QSGOpenVGImageNode::filtering() const
+{
+ return m_filtering;
+}
+
+void QSGOpenVGImageNode::setMipmapFiltering(QSGTexture::Filtering)
+{
+}
+
+QSGTexture::Filtering QSGOpenVGImageNode::mipmapFiltering() const
+{
+ return QSGTexture::None;
+}
+
void QSGOpenVGImageNode::setTextureCoordinatesTransform(QSGImageNode::TextureCoordinatesTransformMode transformNode)
{
if (m_transformMode == transformNode)
@@ -191,6 +249,21 @@ void QSGOpenVGImageNode::setTextureCoordinatesTransform(QSGImageNode::TextureCoo
markDirty(DirtyGeometry);
}
+QSGImageNode::TextureCoordinatesTransformMode QSGOpenVGImageNode::textureCoordinatesTransform() const
+{
+ return m_transformMode;
+}
+
+void QSGOpenVGImageNode::setOwnsTexture(bool owns)
+{
+ m_owns = owns;
+}
+
+bool QSGOpenVGImageNode::ownsTexture() const
+{
+ return m_owns;
+}
+
void QSGOpenVGImageNode::render()
{
if (!m_texture) {
diff --git a/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.h b/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.h
index 34c8e50615..8e12c27824 100644
--- a/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.h
+++ b/src/plugins/scenegraph/openvg/qsgopenvgpublicnodes.h
@@ -44,10 +44,6 @@
#include <QtQuick/qsgimagenode.h>
#include <QtQuick/qsgninepatchnode.h>
-#include <QtGui/QPixmap>
-
-#include <VG/openvg.h>
-
#include "qsgopenvgrenderable.h"
QT_BEGIN_NAMESPACE
@@ -59,10 +55,10 @@ public:
~QSGOpenVGRectangleNode();
void setRect(const QRectF &rect) override;
- QRectF rect() const override { return m_rect; }
+ QRectF rect() const override;
void setColor(const QColor &color) override;
- QColor color() const override { return m_color; }
+ QColor color() const override;
void setTransform(const QOpenVGMatrix &transform) override;
@@ -86,26 +82,26 @@ public:
QSGOpenVGImageNode();
~QSGOpenVGImageNode();
- void setRect(const QRectF &rect) override { m_rect = rect; markDirty(DirtyMaterial); }
- QRectF rect() const override { return m_rect; }
+ void setRect(const QRectF &rect) override;
+ QRectF rect() const override;
- void setSourceRect(const QRectF &r) override { m_sourceRect = r; }
- QRectF sourceRect() const override { return m_sourceRect; }
+ void setSourceRect(const QRectF &r) override;
+ QRectF sourceRect() const override;
void setTexture(QSGTexture *texture) override;
- QSGTexture *texture() const override { return m_texture; }
+ QSGTexture *texture() const override;
- void setFiltering(QSGTexture::Filtering filtering) override { m_filtering = filtering; markDirty(DirtyMaterial); }
- QSGTexture::Filtering filtering() const override { return m_filtering; }
+ void setFiltering(QSGTexture::Filtering filtering) override;
+ QSGTexture::Filtering filtering() const override;
- void setMipmapFiltering(QSGTexture::Filtering) override { }
- QSGTexture::Filtering mipmapFiltering() const override { return QSGTexture::None; }
+ void setMipmapFiltering(QSGTexture::Filtering) override;
+ QSGTexture::Filtering mipmapFiltering() const override;
void setTextureCoordinatesTransform(TextureCoordinatesTransformMode transformNode) override;
- TextureCoordinatesTransformMode textureCoordinatesTransform() const override { return m_transformMode; }
+ TextureCoordinatesTransformMode textureCoordinatesTransform() const override;
- void setOwnsTexture(bool owns) override { m_owns = owns; }
- bool ownsTexture() const override { return m_owns; }
+ void setOwnsTexture(bool owns) override;
+ bool ownsTexture() const override;
void render() override;