aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph')
-rw-r--r--src/quick/scenegraph/coreapi/qsgtexture.cpp21
-rw-r--r--src/quick/scenegraph/coreapi/qsgtexture_mac.mm7
-rw-r--r--src/quick/scenegraph/coreapi/qsgtexture_platform.h20
3 files changed, 12 insertions, 36 deletions
diff --git a/src/quick/scenegraph/coreapi/qsgtexture.cpp b/src/quick/scenegraph/coreapi/qsgtexture.cpp
index f04f0a096e..e415d7852e 100644
--- a/src/quick/scenegraph/coreapi/qsgtexture.cpp
+++ b/src/quick/scenegraph/coreapi/qsgtexture.cpp
@@ -732,12 +732,7 @@ namespace QNativeInterface {
\return the OpenGL texture ID.
*/
-/*!
- \internal
- */
-QSGOpenGLTexture::~QSGOpenGLTexture()
-{
-}
+QT_DEFINE_NATIVE_INTERFACE(QSGOpenGLTexture);
/*!
Creates a new QSGTexture wrapping an existing OpenGL texture object.
@@ -802,12 +797,7 @@ namespace QNativeInterface {
\return the ID3D11Texture2D object.
*/
-/*!
- \internal
- */
-QSGD3D11Texture::~QSGD3D11Texture()
-{
-}
+QT_DEFINE_NATIVE_INTERFACE(QSGD3D11Texture);
/*!
Creates a new QSGTexture wrapping an existing Direct 3D 11 \a texture object.
@@ -927,12 +917,7 @@ namespace QNativeInterface {
\return the image layout.
*/
-/*!
- \internal
- */
-QSGVulkanTexture::~QSGVulkanTexture()
-{
-}
+QT_DEFINE_NATIVE_INTERFACE(QSGVulkanTexture);
/*!
Creates a new QSGTexture wrapping an existing Vulkan \a image object.
diff --git a/src/quick/scenegraph/coreapi/qsgtexture_mac.mm b/src/quick/scenegraph/coreapi/qsgtexture_mac.mm
index 55090d89df..9d009eb5cb 100644
--- a/src/quick/scenegraph/coreapi/qsgtexture_mac.mm
+++ b/src/quick/scenegraph/coreapi/qsgtexture_mac.mm
@@ -54,12 +54,7 @@ id<MTLTexture> QSGTexturePlatformMetal::nativeTexture() const
namespace QNativeInterface {
-/*!
- \internal
- */
-QSGMetalTexture::~QSGMetalTexture()
-{
-}
+QT_DEFINE_NATIVE_INTERFACE(QSGMetalTexture);
QSGTexture *QSGMetalTexture::fromNative(id<MTLTexture> texture,
QQuickWindow *window,
diff --git a/src/quick/scenegraph/coreapi/qsgtexture_platform.h b/src/quick/scenegraph/coreapi/qsgtexture_platform.h
index 0947e820ff..69011c2605 100644
--- a/src/quick/scenegraph/coreapi/qsgtexture_platform.h
+++ b/src/quick/scenegraph/coreapi/qsgtexture_platform.h
@@ -59,10 +59,9 @@ QT_BEGIN_NAMESPACE
namespace QNativeInterface {
#if QT_CONFIG(opengl) || defined(Q_CLANG_QDOC)
-class Q_QUICK_EXPORT QSGOpenGLTexture
+struct Q_QUICK_EXPORT QSGOpenGLTexture
{
-public:
- virtual ~QSGOpenGLTexture();
+ QT_DECLARE_NATIVE_INTERFACE(QSGOpenGLTexture)
virtual GLuint nativeTexture() const = 0;
static QSGTexture *fromNative(GLuint textureId,
QQuickWindow *window,
@@ -72,10 +71,9 @@ public:
#endif
#if defined(Q_OS_WIN) || defined(Q_CLANG_QDOC)
-class Q_QUICK_EXPORT QSGD3D11Texture
+struct Q_QUICK_EXPORT QSGD3D11Texture
{
-public:
- virtual ~QSGD3D11Texture();
+ QT_DECLARE_NATIVE_INTERFACE(QSGD3D11Texture)
virtual void *nativeTexture() const = 0;
static QSGTexture *fromNative(void *texture,
QQuickWindow *window,
@@ -85,10 +83,9 @@ public:
#endif
#if defined(__OBJC__) || defined(Q_CLANG_QDOC)
-class Q_QUICK_EXPORT QSGMetalTexture
+struct Q_QUICK_EXPORT QSGMetalTexture
{
-public:
- virtual ~QSGMetalTexture();
+ QT_DECLARE_NATIVE_INTERFACE(QSGMetalTexture)
virtual id<MTLTexture> nativeTexture() const = 0;
static QSGTexture *fromNative(id<MTLTexture> texture,
QQuickWindow *window,
@@ -98,10 +95,9 @@ public:
#endif
#if QT_CONFIG(vulkan) || defined(Q_CLANG_QDOC)
-class Q_QUICK_EXPORT QSGVulkanTexture
+struct Q_QUICK_EXPORT QSGVulkanTexture
{
-public:
- virtual ~QSGVulkanTexture();
+ QT_DECLARE_NATIVE_INTERFACE(QSGVulkanTexture)
virtual VkImage nativeImage() const = 0;
virtual VkImageLayout nativeImageLayout() const = 0;
static QSGTexture *fromNative(VkImage image,