aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/scenegraph/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/quick/scenegraph/util')
-rw-r--r--src/quick/scenegraph/util/qsgopenglatlastexture.cpp4
-rw-r--r--src/quick/scenegraph/util/qsgopenglatlastexture_p.h4
-rw-r--r--src/quick/scenegraph/util/qsgplaintexture.cpp6
-rw-r--r--src/quick/scenegraph/util/qsgplaintexture_p.h2
-rw-r--r--src/quick/scenegraph/util/qsgrhiatlastexture.cpp4
-rw-r--r--src/quick/scenegraph/util/qsgrhiatlastexture_p.h2
-rw-r--r--src/quick/scenegraph/util/qsgtexturematerial.cpp2
7 files changed, 12 insertions, 12 deletions
diff --git a/src/quick/scenegraph/util/qsgopenglatlastexture.cpp b/src/quick/scenegraph/util/qsgopenglatlastexture.cpp
index 94f77c8a08..f9bc0a552c 100644
--- a/src/quick/scenegraph/util/qsgopenglatlastexture.cpp
+++ b/src/quick/scenegraph/util/qsgopenglatlastexture.cpp
@@ -522,7 +522,7 @@ TextureBase::~TextureBase()
m_atlas->remove(this);
}
-int TextureBase::comparisonKey() const
+qint64 TextureBase::comparisonKey() const
{
// We need special care here: a typical comparisonKey() implementation
// returns a unique result when there is no underlying texture yet. This is
@@ -532,7 +532,7 @@ int TextureBase::comparisonKey() const
// base the comparison on the atlas ptr; this way textures for the same
// atlas are considered equal
- return int(qintptr(m_atlas));
+ return qint64(m_atlas);
}
void TextureBase::bind()
diff --git a/src/quick/scenegraph/util/qsgopenglatlastexture_p.h b/src/quick/scenegraph/util/qsgopenglatlastexture_p.h
index a81c62ad63..d9d9d3175e 100644
--- a/src/quick/scenegraph/util/qsgopenglatlastexture_p.h
+++ b/src/quick/scenegraph/util/qsgopenglatlastexture_p.h
@@ -103,7 +103,7 @@ public:
void invalidate();
- int comparisonKey() const { return m_texture_id; }
+ qint64 comparisonKey() const { return m_texture_id; }
int textureId() const;
void bind(QSGTexture::Filtering filtering);
@@ -159,7 +159,7 @@ public:
TextureBase(AtlasBase *atlas, const QRect &textureRect);
~TextureBase();
- int comparisonKey() const override;
+ qint64 comparisonKey() const override;
int textureId() const override { return m_atlas->textureId(); }
bool isAtlasTexture() const override { return true; }
diff --git a/src/quick/scenegraph/util/qsgplaintexture.cpp b/src/quick/scenegraph/util/qsgplaintexture.cpp
index 93448d7738..35d204fed2 100644
--- a/src/quick/scenegraph/util/qsgplaintexture.cpp
+++ b/src/quick/scenegraph/util/qsgplaintexture.cpp
@@ -304,17 +304,17 @@ void QSGPlainTexture::setTextureFromNativeObject(QRhi *rhi, QQuickWindow::Native
setTexture(t);
}
-int QSGPlainTexture::comparisonKey() const
+qint64 QSGPlainTexture::comparisonKey() const
{
// not textureId() as that would create an id when not yet done - that's not wanted here
if (m_texture_id)
return m_texture_id;
if (m_texture)
- return int(qintptr(m_texture));
+ return qint64(m_texture);
// two textures (and so materials) with not-yet-created texture underneath are never equal
- return int(qintptr(this));
+ return qint64(this);
}
QRhiTexture *QSGPlainTexture::rhiTexture() const
diff --git a/src/quick/scenegraph/util/qsgplaintexture_p.h b/src/quick/scenegraph/util/qsgplaintexture_p.h
index fed464a0b4..3589bdbcf7 100644
--- a/src/quick/scenegraph/util/qsgplaintexture_p.h
+++ b/src/quick/scenegraph/util/qsgplaintexture_p.h
@@ -83,7 +83,7 @@ public:
void setImage(const QImage &image);
const QImage &image() { return m_image; }
- int comparisonKey() const override;
+ qint64 comparisonKey() const override;
void bind() override;
diff --git a/src/quick/scenegraph/util/qsgrhiatlastexture.cpp b/src/quick/scenegraph/util/qsgrhiatlastexture.cpp
index 2935c61e7e..e7430a47d4 100644
--- a/src/quick/scenegraph/util/qsgrhiatlastexture.cpp
+++ b/src/quick/scenegraph/util/qsgrhiatlastexture.cpp
@@ -381,7 +381,7 @@ TextureBase::~TextureBase()
m_atlas->remove(this);
}
-int TextureBase::comparisonKey() const
+qint64 TextureBase::comparisonKey() const
{
// We need special care here: a typical comparisonKey() implementation
// returns a unique result when there is no underlying texture yet. This is
@@ -391,7 +391,7 @@ int TextureBase::comparisonKey() const
// base the comparison on the atlas ptr; this way textures for the same
// atlas are considered equal
- return int(qintptr(m_atlas));
+ return qint64(m_atlas);
}
QRhiTexture *TextureBase::rhiTexture() const
diff --git a/src/quick/scenegraph/util/qsgrhiatlastexture_p.h b/src/quick/scenegraph/util/qsgrhiatlastexture_p.h
index 739498f137..0ef14c1ce0 100644
--- a/src/quick/scenegraph/util/qsgrhiatlastexture_p.h
+++ b/src/quick/scenegraph/util/qsgrhiatlastexture_p.h
@@ -157,7 +157,7 @@ public:
TextureBase(AtlasBase *atlas, const QRect &textureRect);
~TextureBase();
- int comparisonKey() const override;
+ qint64 comparisonKey() const override;
int textureId() const override { return 0; } // not used
void bind() override { } // not used
QRhiTexture *rhiTexture() const override;
diff --git a/src/quick/scenegraph/util/qsgtexturematerial.cpp b/src/quick/scenegraph/util/qsgtexturematerial.cpp
index e6311fc652..c2fe0364b3 100644
--- a/src/quick/scenegraph/util/qsgtexturematerial.cpp
+++ b/src/quick/scenegraph/util/qsgtexturematerial.cpp
@@ -378,7 +378,7 @@ int QSGOpaqueTextureMaterial::compare(const QSGMaterial *o) const
{
Q_ASSERT(o && type() == o->type());
const QSGOpaqueTextureMaterial *other = static_cast<const QSGOpaqueTextureMaterial *>(o);
- if (int diff = m_texture->comparisonKey() - other->texture()->comparisonKey())
+ if (qint64 diff = m_texture->comparisonKey() - other->texture()->comparisonKey())
return diff;
return int(m_filtering) - int(other->m_filtering);
}