summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-10-28 11:22:42 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-10-28 11:05:47 +0000
commit717f56999939bb9c1aeb88c959afdafb4ada02cc (patch)
tree67e8f90362bf5d1e438e4c6a5a09220022a5bc6a
parent4641d0d1c903208fd769251f2aa2f829f0eecd38 (diff)
Add namespace to the specialized QSG nodes
Add QtWebEngineCore namespace to classes I missed earlier. Change-Id: Ia40b03c58e0aec858e8fbe9a8fdb532349353046 Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
-rw-r--r--src/core/stream_video_node.cpp4
-rw-r--r--src/core/stream_video_node.h11
-rw-r--r--src/core/yuv_video_node.cpp4
-rw-r--r--src/core/yuv_video_node.h14
4 files changed, 24 insertions, 9 deletions
diff --git a/src/core/stream_video_node.cpp b/src/core/stream_video_node.cpp
index a5a6041f3..7481d49ed 100644
--- a/src/core/stream_video_node.cpp
+++ b/src/core/stream_video_node.cpp
@@ -38,6 +38,8 @@
#include <QtQuick/qsgtexture.h>
+namespace QtWebEngineCore {
+
class StreamVideoMaterialShader : public QSGMaterialShader
{
public:
@@ -141,3 +143,5 @@ void StreamVideoNode::setTextureMatrix(const QMatrix4x4 &matrix)
{
m_material->m_texMatrix = matrix;
}
+
+} // namespace
diff --git a/src/core/stream_video_node.h b/src/core/stream_video_node.h
index f808bb609..bd2c3408a 100644
--- a/src/core/stream_video_node.h
+++ b/src/core/stream_video_node.h
@@ -40,9 +40,9 @@
#include <QtQuick/qsgmaterial.h>
#include <QtQuick/qsgnode.h>
-QT_BEGIN_NAMESPACE
-class QSGTexture;
-QT_END_NAMESPACE
+QT_FORWARD_DECLARE_CLASS(QSGTexture)
+
+namespace QtWebEngineCore {
// These classes duplicate, QtQuick style, the logic of GLRenderer::DrawStreamVideoQuad.
// Their behavior should stay as close as possible to GLRenderer.
@@ -52,7 +52,8 @@ class StreamVideoMaterial : public QSGMaterial
public:
StreamVideoMaterial(QSGTexture *texture);
- virtual QSGMaterialType *type() const Q_DECL_OVERRIDE{
+ virtual QSGMaterialType *type() const Q_DECL_OVERRIDE
+ {
static QSGMaterialType theType;
return &theType;
}
@@ -75,4 +76,6 @@ private:
StreamVideoMaterial *m_material;
};
+} // namespace
+
#endif // STREAM_VIDEO_NODE_H
diff --git a/src/core/yuv_video_node.cpp b/src/core/yuv_video_node.cpp
index 815ea7d51..7deeb5802 100644
--- a/src/core/yuv_video_node.cpp
+++ b/src/core/yuv_video_node.cpp
@@ -40,6 +40,8 @@
#include <QtGui/qopenglfunctions.h>
#include <QtQuick/qsgtexture.h>
+namespace QtWebEngineCore {
+
class YUVVideoMaterialShader : public QSGMaterialShader
{
public:
@@ -369,3 +371,5 @@ void YUVVideoNode::setRect(const QRectF &rect)
{
QSGGeometry::updateTexturedRectGeometry(geometry(), rect, QRectF(0, 0, 1, 1));
}
+
+} // namespace
diff --git a/src/core/yuv_video_node.h b/src/core/yuv_video_node.h
index 457c2c7fe..5b13879d3 100644
--- a/src/core/yuv_video_node.h
+++ b/src/core/yuv_video_node.h
@@ -40,9 +40,9 @@
#include <QtQuick/qsgmaterial.h>
#include <QtQuick/qsgnode.h>
-QT_BEGIN_NAMESPACE
-class QSGTexture;
-QT_END_NAMESPACE
+QT_FORWARD_DECLARE_CLASS(QSGTexture)
+
+namespace QtWebEngineCore {
// These classes duplicate, QtQuick style, the logic of GLRenderer::DrawYUVVideoQuad.
// Their behavior should stay as close as possible to GLRenderer.
@@ -59,7 +59,8 @@ public:
const QRectF &yaTexCoordRect, const QRectF &uvTexCoordRect, const QSizeF &yaTexSize, const QSizeF &uvTexSize,
ColorSpace colorspace);
- virtual QSGMaterialType *type() const Q_DECL_OVERRIDE {
+ virtual QSGMaterialType *type() const Q_DECL_OVERRIDE
+ {
static QSGMaterialType theType;
return &theType;
}
@@ -85,7 +86,8 @@ public:
const QRectF &yaTexCoordRect, const QRectF &uvTexCoordRect, const QSizeF &yaTexSize, const QSizeF &uvTexSize,
ColorSpace colorspace);
- virtual QSGMaterialType *type() const Q_DECL_OVERRIDE{
+ virtual QSGMaterialType *type() const Q_DECL_OVERRIDE
+ {
static QSGMaterialType theType;
return &theType;
}
@@ -109,4 +111,6 @@ private:
YUVVideoMaterial *m_material;
};
+} // namespace
+
#endif // YUV_VIDEO_NODE_H