diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-08-21 14:26:09 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-08-21 14:30:29 +0200 |
commit | cc1b216c52d42964c9ac816302414cc6ec376dfe (patch) | |
tree | 4e282f89572881e963ca4aaf1f1dae44ec2d334a /src/quick/items/qquickshadereffectnode.cpp | |
parent | 0fadb710e5639dac9f17d6655eb9edeaadbcbc33 (diff) | |
parent | 0af61d773fc7263573afc6b7a973451783bf7424 (diff) |
Merge branch 'origin/5.4' into dev
This merges 0af61d773fc7263573afc6b7a973451783bf7424 since there is a
circular dependency introduced with a111b1b108f2d3344cb2b2b677e738fd9dd68945
in qtquickcontrols.
Change-Id: Ia4fcad8df69326fba3f6b5927151e9d98206e872
Diffstat (limited to 'src/quick/items/qquickshadereffectnode.cpp')
-rw-r--r-- | src/quick/items/qquickshadereffectnode.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/quick/items/qquickshadereffectnode.cpp b/src/quick/items/qquickshadereffectnode.cpp index d7bd5e5a4b..377f78ddb4 100644 --- a/src/quick/items/qquickshadereffectnode.cpp +++ b/src/quick/items/qquickshadereffectnode.cpp @@ -329,6 +329,11 @@ bool QQuickShaderEffectMaterialKey::operator == (const QQuickShaderEffectMateria return true; } +bool QQuickShaderEffectMaterialKey::operator != (const QQuickShaderEffectMaterialKey &other) const +{ + return !(*this == other); +} + uint qHash(const QQuickShaderEffectMaterialKey &key) { uint hash = qHash((void *)key.className); @@ -381,9 +386,13 @@ bool QQuickShaderEffectMaterial::UniformData::operator == (const UniformData &ot int QQuickShaderEffectMaterial::compare(const QSGMaterial *o) const { const QQuickShaderEffectMaterial *other = static_cast<const QQuickShaderEffectMaterial *>(o); + if (!supportsAtlasTextures || !other->supportsAtlasTextures) + return 1; + if (bool(flags() & QSGMaterial::RequiresFullMatrix) || bool(other->flags() & QSGMaterial::RequiresFullMatrix)) + return 1; if (cullMode != other->cullMode) return 1; - if (supportsAtlasTextures != other->supportsAtlasTextures) + if (m_source != other->m_source) return 1; for (int shaderType = 0; shaderType < QQuickShaderEffectMaterialKey::ShaderTypeCount; ++shaderType) { if (uniforms[shaderType] != other->uniforms[shaderType]) |