diff options
| author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2010-12-21 13:36:46 +0100 |
|---|---|---|
| committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2010-12-21 13:36:46 +0100 |
| commit | 0783353952758777b1935a9ae068e2201b486a97 (patch) | |
| tree | b1e7fcddceb66868a50147ed83cb9738f62806b0 | |
| parent | c69e112c892dbb017a83189dba56884b0717b171 (diff) | |
Renamed ShaderEffectSource's static property to live.
| -rw-r--r-- | src/effects/shadereffectitem.cpp | 13 | ||||
| -rw-r--r-- | src/effects/shadereffectitem.h | 10 |
2 files changed, 12 insertions, 11 deletions
diff --git a/src/effects/shadereffectitem.cpp b/src/effects/shadereffectitem.cpp index de5bd83..620886b 100644 --- a/src/effects/shadereffectitem.cpp +++ b/src/effects/shadereffectitem.cpp @@ -189,7 +189,7 @@ ShaderEffectSource::ShaderEffectSource(QObject *parent) , m_dirtySceneGraph(true) , m_multisamplingSupported(false) , m_checkedForMultisamplingSupport(false) - , m_static(false) + , m_live(true) , m_hideOriginal(true) { m_context = QSGContext::current; @@ -322,12 +322,13 @@ void ShaderEffectSource::setTextureSize(const QSize &size) emit repaintRequired(); } -void ShaderEffectSource::setStatic(bool s) +void ShaderEffectSource::setLive(bool s) { - if (s == m_static) + if (s == m_live) return; - m_static = s; - emit staticChanged(); + m_live = s; + + emit liveChanged(); emit repaintRequired(); } @@ -425,7 +426,7 @@ void ShaderEffectSource::update() Q_ASSERT(m_refs); QxItemPrivate *src = m_sourceItem ? QxItemPrivate::get(m_sourceItem) : 0; Node::DirtyFlags dirtyFlags = src ? src->transformNode.dirtyFlags() : Node::DirtyFlags(0); - if (!m_dirtyTexture && (!(m_dirtySceneGraph || dirtyFlags) || m_static)) + if (!m_dirtyTexture && (!(m_dirtySceneGraph || dirtyFlags) || !m_live)) return; if (m_sourceItem) { Q_ASSERT(m_hideOriginal == (m_renderer->rootNode() != 0)); diff --git a/src/effects/shadereffectitem.h b/src/effects/shadereffectitem.h index 1aa5c5c..db489e3 100644 --- a/src/effects/shadereffectitem.h +++ b/src/effects/shadereffectitem.h @@ -69,7 +69,7 @@ class ShaderEffectSource : public QObject Q_PROPERTY(QSize textureSize READ textureSize WRITE setTextureSize NOTIFY textureSizeChanged) Q_PROPERTY(int width READ width NOTIFY widthChanged) Q_PROPERTY(int height READ height NOTIFY heightChanged) - Q_PROPERTY(bool static READ isStatic WRITE setStatic NOTIFY staticChanged) + Q_PROPERTY(bool live READ isLive WRITE setLive NOTIFY liveChanged) Q_PROPERTY(bool hideOriginal READ hideOriginal WRITE setHideOriginal NOTIFY hideOriginalChanged) Q_PROPERTY(bool active READ isActive NOTIFY activeChanged) Q_ENUMS(FilterMode) @@ -122,8 +122,8 @@ public: int width() const { return m_size.width(); } int height() const { return m_size.height(); } - bool isStatic() const { return m_static; } - void setStatic(bool s); + bool isLive() const { return m_live; } + void setLive(bool s); bool hideOriginal() const { return m_hideOriginal; } void setHideOriginal(bool hide); @@ -149,7 +149,7 @@ Q_SIGNALS: void textureSizeChanged(); void widthChanged(); void heightChanged(); - void staticChanged(); + void liveChanged(); void hideOriginalChanged(); void activeChanged(); @@ -182,7 +182,7 @@ private: uint m_dirtySceneGraph : 1; // Causes update if not static. uint m_multisamplingSupported : 1; uint m_checkedForMultisamplingSupport : 1; - uint m_static : 1; + uint m_live : 1; uint m_hideOriginal : 1; }; |
