aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickshadereffect.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2020-11-23 15:56:25 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2020-11-24 18:07:59 +0100
commit3b2dacbf3da0c9725a5408b0b956ef15cde3f947 (patch)
tree7d46dd24cfc6e121c95ca36725f8866441c8be71 /src/quick/items/qquickshadereffect.cpp
parent7a5c59f21fc68e3020c2acf0cd50146ef6a61005 (diff)
Empty the ShaderEffect content cache on releaseResources
Just use a function because the private and impl classes for QQuickShaderEffect do not have their own headers. Change-Id: If5070aeb8c2b07b9b7e2cf3e16071ee2af2e368b Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/quick/items/qquickshadereffect.cpp')
-rw-r--r--src/quick/items/qquickshadereffect.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quick/items/qquickshadereffect.cpp b/src/quick/items/qquickshadereffect.cpp
index b4d9f9f69d..5365ab071e 100644
--- a/src/quick/items/qquickshadereffect.cpp
+++ b/src/quick/items/qquickshadereffect.cpp
@@ -1158,6 +1158,11 @@ static inline QVariant getValueFromProperty(QObject *item, const QMetaObject *it
using QQuickShaderInfoCache = QHash<QUrl, QSGGuiThreadShaderEffectManager::ShaderInfo>;
Q_GLOBAL_STATIC(QQuickShaderInfoCache, shaderInfoCache)
+void qtquick_shadereffect_purge_gui_thread_shader_cache()
+{
+ shaderInfoCache()->clear();
+}
+
bool QQuickShaderEffectImpl::updateShader(Shader shaderType, const QUrl &fileUrl)
{
QSGGuiThreadShaderEffectManager *mgr = shaderEffectManager();