aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/adaptations/software
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-04-07 15:20:58 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-04-16 09:59:09 +0200
commit76f783c23fa2fd11c5cef6031f59ad5a1a6c7545 (patch)
tree97eef491e96087bb6d0fffecfda8ce8e59df9117 /src/quick/scenegraph/adaptations/software
parent136058c794c69266e5c4f7ec4f042ef193aaa304 (diff)
Make comparisonKey() a pure virtual in QSGTexture
In Qt 5.14 this was a virtual in QSGTexturePrivate due to having had to maintain binary compatibility. In 6.0 it becomes a pure virtual in QSGTexture. Task-number: QTBUG-82997 Change-Id: I26a42169b071fe8d413f5c89ef45850fa7222006 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/scenegraph/adaptations/software')
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp4
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarelayer_p.h10
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaptexture.cpp6
-rw-r--r--src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaptexture_p.h12
4 files changed, 7 insertions, 25 deletions
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp
index 683ccb60c2..ffeb55c7ef 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer.cpp
@@ -45,7 +45,7 @@
QT_BEGIN_NAMESPACE
QSGSoftwareLayer::QSGSoftwareLayer(QSGRenderContext *renderContext)
- : QSGLayer(*(new QSGSoftwareLayerPrivate))
+ : QSGLayer(*(new QSGTexturePrivate))
, m_item(nullptr)
, m_context(renderContext)
, m_renderer(nullptr)
@@ -70,7 +70,7 @@ int QSGSoftwareLayer::textureId() const
return 0;
}
-int QSGSoftwareLayerPrivate::comparisonKey() const
+int QSGSoftwareLayer::comparisonKey() const
{
return 0;
}
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer_p.h b/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer_p.h
index 1859e14514..4961c91c1c 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer_p.h
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarelayer_p.h
@@ -58,11 +58,9 @@
QT_BEGIN_NAMESPACE
class QSGSoftwarePixmapRenderer;
-class QSGSoftwareLayerPrivate;
class QSGSoftwareLayer : public QSGLayer
{
- Q_DECLARE_PRIVATE(QSGSoftwareLayer)
Q_OBJECT
public:
QSGSoftwareLayer(QSGRenderContext *renderContext);
@@ -72,6 +70,7 @@ public:
// QSGTexture interface
public:
+ int comparisonKey() const override;
int textureId() const override;
QSize textureSize() const override;
bool hasAlphaChannel() const override;
@@ -120,13 +119,6 @@ private:
bool m_dirtyTexture;
};
-class QSGSoftwareLayerPrivate : public QSGTexturePrivate
-{
- Q_DECLARE_PUBLIC(QSGSoftwareLayer)
-public:
- int comparisonKey() const override;
-};
-
QT_END_NAMESPACE
#endif // QSGSOFTWARELAYER_H
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaptexture.cpp b/src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaptexture.cpp
index 82a48d80ca..7a3be61cc0 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaptexture.cpp
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaptexture.cpp
@@ -43,7 +43,6 @@
QT_BEGIN_NAMESPACE
QSGSoftwarePixmapTexture::QSGSoftwarePixmapTexture(const QImage &image, uint flags)
- : QSGTexture(*(new QSGSoftwarePixmapTexturePrivate))
{
// Prevent pixmap format conversion to reduce memory consumption
// and surprises in calling code. (See QTBUG-47328)
@@ -57,8 +56,7 @@ QSGSoftwarePixmapTexture::QSGSoftwarePixmapTexture(const QImage &image, uint fla
}
QSGSoftwarePixmapTexture::QSGSoftwarePixmapTexture(const QPixmap &pixmap)
- : QSGTexture(*(new QSGSoftwarePixmapTexturePrivate)),
- m_pixmap(pixmap)
+ : m_pixmap(pixmap)
{
}
@@ -87,7 +85,7 @@ void QSGSoftwarePixmapTexture::bind()
Q_UNREACHABLE();
}
-int QSGSoftwarePixmapTexturePrivate::comparisonKey() const
+int QSGSoftwarePixmapTexture::comparisonKey() const
{
return 0;
}
diff --git a/src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaptexture_p.h b/src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaptexture_p.h
index baa62d93de..dda1358124 100644
--- a/src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaptexture_p.h
+++ b/src/quick/scenegraph/adaptations/software/qsgsoftwarepixmaptexture_p.h
@@ -56,16 +56,15 @@
QT_BEGIN_NAMESPACE
-class QSGSoftwarePixmapTexturePrivate;
-
class QSGSoftwarePixmapTexture : public QSGTexture
{
Q_OBJECT
- Q_DECLARE_PRIVATE(QSGSoftwarePixmapTexture)
+
public:
QSGSoftwarePixmapTexture(const QImage &image, uint flags);
QSGSoftwarePixmapTexture(const QPixmap &pixmap);
+ int comparisonKey() const override;
int textureId() const override;
QSize textureSize() const override;
bool hasAlphaChannel() const override;
@@ -78,13 +77,6 @@ private:
QPixmap m_pixmap;
};
-class QSGSoftwarePixmapTexturePrivate : public QSGTexturePrivate
-{
- Q_DECLARE_PUBLIC(QSGSoftwarePixmapTexture)
-public:
- int comparisonKey() const override;
-};
-
QT_END_NAMESPACE
#endif // QSGSOFTWAREPIXMAPTEXTURE_H