diff options
author | jmarshallnz <jmarshallnz@svn> | 2010-03-26 09:43:00 +0000 |
---|---|---|
committer | jmarshallnz <jmarshallnz@svn> | 2010-03-26 09:43:00 +0000 |
commit | adef801ce56c83e4798845db586deb743992e569 (patch) | |
tree | 64b814a5c5d67fc0112855ebb80bd19bff25f08c /guilib | |
parent | 6d22e83986fa752e550ff7ff839c0542eafb2860 (diff) |
added: Allow immediate deletion of resources via CGUIControl::FreeResources(true);
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@28827 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib')
44 files changed, 105 insertions, 105 deletions
diff --git a/guilib/GUIBaseContainer.cpp b/guilib/GUIBaseContainer.cpp index 475a9d6589..86aedaafe2 100644 --- a/guilib/GUIBaseContainer.cpp +++ b/guilib/GUIBaseContainer.cpp @@ -688,9 +688,9 @@ void CGUIBaseContainer::AllocResources() CalculateLayout(); } -void CGUIBaseContainer::FreeResources() +void CGUIBaseContainer::FreeResources(bool immediately) { - CGUIControl::FreeResources(); + CGUIControl::FreeResources(immediately); if (m_staticContent) { // free any static content Reset(); diff --git a/guilib/GUIBaseContainer.h b/guilib/GUIBaseContainer.h index 99e757ac84..c3b6c415ef 100644 --- a/guilib/GUIBaseContainer.h +++ b/guilib/GUIBaseContainer.h @@ -53,7 +53,7 @@ public: virtual bool OnMessage(CGUIMessage& message); virtual void SetFocus(bool bOnOff); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void UpdateVisibility(const CGUIListItem *item = NULL); virtual unsigned int GetRows() const; diff --git a/guilib/GUIBorderedImage.cpp b/guilib/GUIBorderedImage.cpp index 86de297c09..28ee2ffdfd 100644 --- a/guilib/GUIBorderedImage.cpp +++ b/guilib/GUIBorderedImage.cpp @@ -60,10 +60,10 @@ void CGUIBorderedImage::AllocResources() CGUIImage::AllocResources(); } -void CGUIBorderedImage::FreeResources() +void CGUIBorderedImage::FreeResources(bool immediately) { - m_borderImage.FreeResources(); - CGUIImage::FreeResources(); + m_borderImage.FreeResources(immediately); + CGUIImage::FreeResources(immediately); } void CGUIBorderedImage::DynamicResourceAlloc(bool bOnOff) diff --git a/guilib/GUIBorderedImage.h b/guilib/GUIBorderedImage.h index e264b53cd0..62e15ceb30 100644 --- a/guilib/GUIBorderedImage.h +++ b/guilib/GUIBorderedImage.h @@ -36,7 +36,7 @@ public: virtual void Render(); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); protected: diff --git a/guilib/GUIButtonControl.cpp b/guilib/GUIButtonControl.cpp index 8d6f74a72f..a56bd4ab6b 100644 --- a/guilib/GUIButtonControl.cpp +++ b/guilib/GUIButtonControl.cpp @@ -171,11 +171,11 @@ void CGUIButtonControl::AllocResources() m_height = m_imgFocus.GetHeight(); } -void CGUIButtonControl::FreeResources() +void CGUIButtonControl::FreeResources(bool immediately) { - CGUIControl::FreeResources(); - m_imgFocus.FreeResources(); - m_imgNoFocus.FreeResources(); + CGUIControl::FreeResources(immediately); + m_imgFocus.FreeResources(immediately); + m_imgNoFocus.FreeResources(immediately); } void CGUIButtonControl::DynamicResourceAlloc(bool bOnOff) diff --git a/guilib/GUIButtonControl.h b/guilib/GUIButtonControl.h index 6f42b507c3..fb7e3c1d3a 100644 --- a/guilib/GUIButtonControl.h +++ b/guilib/GUIButtonControl.h @@ -52,7 +52,7 @@ public: virtual bool OnAction(const CAction &action) ; virtual bool OnMessage(CGUIMessage& message); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual void SetInvalid(); virtual void SetPosition(float posX, float posY); diff --git a/guilib/GUIButtonScroller.cpp b/guilib/GUIButtonScroller.cpp index 3fd5380107..abbd31492b 100644 --- a/guilib/GUIButtonScroller.cpp +++ b/guilib/GUIButtonScroller.cpp @@ -292,11 +292,11 @@ void CGUIButtonScroller::AllocResources() SetActiveButton(0); } -void CGUIButtonScroller::FreeResources() +void CGUIButtonScroller::FreeResources(bool immediately) { - CGUIControl::FreeResources(); - m_imgFocus.FreeResources(); - m_imgNoFocus.FreeResources(); + CGUIControl::FreeResources(immediately); + m_imgFocus.FreeResources(immediately); + m_imgNoFocus.FreeResources(immediately); ClearButtons(); } diff --git a/guilib/GUIButtonScroller.h b/guilib/GUIButtonScroller.h index 1a405e253b..1f7c248659 100644 --- a/guilib/GUIButtonScroller.h +++ b/guilib/GUIButtonScroller.h @@ -68,7 +68,7 @@ public: virtual bool OnMouseOver(const CPoint &point); virtual void Render(); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual void SetInvalid(); void ClearButtons(); diff --git a/guilib/GUICheckMarkControl.cpp b/guilib/GUICheckMarkControl.cpp index 17cc96d251..3327c45b20 100644 --- a/guilib/GUICheckMarkControl.cpp +++ b/guilib/GUICheckMarkControl.cpp @@ -116,11 +116,11 @@ void CGUICheckMarkControl::AllocResources() m_imgCheckMarkNoFocus.AllocResources(); } -void CGUICheckMarkControl::FreeResources() +void CGUICheckMarkControl::FreeResources(bool immediately) { - CGUIControl::FreeResources(); - m_imgCheckMark.FreeResources(); - m_imgCheckMarkNoFocus.FreeResources(); + CGUIControl::FreeResources(immediately); + m_imgCheckMark.FreeResources(immediately); + m_imgCheckMarkNoFocus.FreeResources(immediately); } void CGUICheckMarkControl::DynamicResourceAlloc(bool bOnOff) diff --git a/guilib/GUICheckMarkControl.h b/guilib/GUICheckMarkControl.h index 3130dff42d..ab80395a89 100644 --- a/guilib/GUICheckMarkControl.h +++ b/guilib/GUICheckMarkControl.h @@ -48,7 +48,7 @@ public: virtual bool OnAction(const CAction &action) ; virtual bool OnMessage(CGUIMessage& message); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual void SetInvalid(); diff --git a/guilib/GUIControl.cpp b/guilib/GUIControl.cpp index 94b5755c27..d4b4d95374 100644 --- a/guilib/GUIControl.cpp +++ b/guilib/GUIControl.cpp @@ -109,7 +109,7 @@ void CGUIControl::AllocResources() m_bAllocated=true; } -void CGUIControl::FreeResources() +void CGUIControl::FreeResources(bool immediately) { if (m_bAllocated) { diff --git a/guilib/GUIControl.h b/guilib/GUIControl.h index ad80a04c4e..f1c2081e62 100644 --- a/guilib/GUIControl.h +++ b/guilib/GUIControl.h @@ -143,7 +143,7 @@ public: int GetParentID() const; virtual bool HasFocus() const; virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual bool IsDynamicallyAllocated() { return false; }; virtual bool CanFocus() const; diff --git a/guilib/GUIControlGroup.cpp b/guilib/GUIControlGroup.cpp index 4066b1b4cb..ad6f6c448a 100644 --- a/guilib/GUIControlGroup.cpp +++ b/guilib/GUIControlGroup.cpp @@ -78,13 +78,13 @@ void CGUIControlGroup::AllocResources() } } -void CGUIControlGroup::FreeResources() +void CGUIControlGroup::FreeResources(bool immediately) { - CGUIControl::FreeResources(); + CGUIControl::FreeResources(immediately); for (iControls it = m_children.begin(); it != m_children.end(); ++it) { CGUIControl *control = *it; - control->FreeResources(); + control->FreeResources(immediately); } } diff --git a/guilib/GUIControlGroup.h b/guilib/GUIControlGroup.h index 41a8826a68..6b9f331468 100644 --- a/guilib/GUIControlGroup.h +++ b/guilib/GUIControlGroup.h @@ -47,7 +47,7 @@ public: virtual bool SendControlMessage(CGUIMessage& message); virtual bool HasFocus() const; virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual bool CanFocus() const; diff --git a/guilib/GUIImage.cpp b/guilib/GUIImage.cpp index 7cf90622da..6f815c4411 100644 --- a/guilib/GUIImage.cpp +++ b/guilib/GUIImage.cpp @@ -204,10 +204,10 @@ void CGUIImage::FreeTextures(bool immediately /* = false */) m_fadingTextures.clear(); } -void CGUIImage::FreeResources() +void CGUIImage::FreeResources(bool immediately) { - FreeTextures(); - CGUIControl::FreeResources(); + FreeTextures(immediately); + CGUIControl::FreeResources(immediately); } void CGUIImage::SetInvalid() diff --git a/guilib/GUIImage.h b/guilib/GUIImage.h index 1712364e98..eb576fe266 100644 --- a/guilib/GUIImage.h +++ b/guilib/GUIImage.h @@ -72,7 +72,7 @@ public: virtual bool OnAction(const CAction &action) ; virtual bool OnMessage(CGUIMessage& message); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual bool IsDynamicallyAllocated() { return m_bDynamicResourceAlloc; }; virtual void SetInvalid(); diff --git a/guilib/GUIMoverControl.cpp b/guilib/GUIMoverControl.cpp index b2b53e1fef..d9f2465575 100644 --- a/guilib/GUIMoverControl.cpp +++ b/guilib/GUIMoverControl.cpp @@ -186,11 +186,11 @@ void CGUIMoverControl::AllocResources() SetHeight(height); } -void CGUIMoverControl::FreeResources() +void CGUIMoverControl::FreeResources(bool immediately) { - CGUIControl::FreeResources(); - m_imgFocus.FreeResources(); - m_imgNoFocus.FreeResources(); + CGUIControl::FreeResources(immediately); + m_imgFocus.FreeResources(immediately); + m_imgNoFocus.FreeResources(immediately); } void CGUIMoverControl::DynamicResourceAlloc(bool bOnOff) diff --git a/guilib/GUIMoverControl.h b/guilib/GUIMoverControl.h index b8424ad3a5..49050bbce8 100644 --- a/guilib/GUIMoverControl.h +++ b/guilib/GUIMoverControl.h @@ -67,7 +67,7 @@ public: virtual void OnLeft(); virtual void OnRight(); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual void SetInvalid(); virtual void SetPosition(float posX, float posY); diff --git a/guilib/GUIMultiImage.cpp b/guilib/GUIMultiImage.cpp index 8155cb93e5..21e1d243be 100644 --- a/guilib/GUIMultiImage.cpp +++ b/guilib/GUIMultiImage.cpp @@ -169,11 +169,11 @@ void CGUIMultiImage::AllocResources() m_image.SetFileName(m_files.size() ? m_files[0] : ""); } -void CGUIMultiImage::FreeResources() +void CGUIMultiImage::FreeResources(bool immediately) { - m_image.FreeResources(); + m_image.FreeResources(immediately); m_currentImage = 0; - CGUIControl::FreeResources(); + CGUIControl::FreeResources(immediately); } void CGUIMultiImage::DynamicResourceAlloc(bool bOnOff) diff --git a/guilib/GUIMultiImage.h b/guilib/GUIMultiImage.h index 491f46ef60..b947b6c034 100644 --- a/guilib/GUIMultiImage.h +++ b/guilib/GUIMultiImage.h @@ -50,7 +50,7 @@ public: virtual bool OnAction(const CAction &action); virtual bool OnMessage(CGUIMessage &message); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual bool IsDynamicallyAllocated() { return m_bDynamicResourceAlloc; }; virtual void SetInvalid(); diff --git a/guilib/GUIProgressControl.cpp b/guilib/GUIProgressControl.cpp index cdf18b0a1a..98f57fff79 100644 --- a/guilib/GUIProgressControl.cpp +++ b/guilib/GUIProgressControl.cpp @@ -202,14 +202,14 @@ float CGUIProgressControl::GetPercentage() const { return m_fPercent; } -void CGUIProgressControl::FreeResources() +void CGUIProgressControl::FreeResources(bool immediately) { - CGUIControl::FreeResources(); - m_guiBackground.FreeResources(); - m_guiMid.FreeResources(); - m_guiRight.FreeResources(); - m_guiLeft.FreeResources(); - m_guiOverlay.FreeResources(); + CGUIControl::FreeResources(immediately); + m_guiBackground.FreeResources(immediately); + m_guiMid.FreeResources(immediately); + m_guiRight.FreeResources(immediately); + m_guiLeft.FreeResources(immediately); + m_guiOverlay.FreeResources(immediately); } void CGUIProgressControl::DynamicResourceAlloc(bool bOnOff) diff --git a/guilib/GUIProgressControl.h b/guilib/GUIProgressControl.h index 21e69b78c4..8ceb553869 100644 --- a/guilib/GUIProgressControl.h +++ b/guilib/GUIProgressControl.h @@ -51,7 +51,7 @@ public: virtual void Render(); virtual bool CanFocus() const; virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual void SetInvalid(); virtual bool OnMessage(CGUIMessage& message); diff --git a/guilib/GUIRadioButtonControl.cpp b/guilib/GUIRadioButtonControl.cpp index 510b66e514..f8bccea3f6 100644 --- a/guilib/GUIRadioButtonControl.cpp +++ b/guilib/GUIRadioButtonControl.cpp @@ -81,11 +81,11 @@ void CGUIRadioButtonControl::AllocResources() SetPosition(m_posX, m_posY); } -void CGUIRadioButtonControl::FreeResources() +void CGUIRadioButtonControl::FreeResources(bool immediately) { - CGUIButtonControl::FreeResources(); - m_imgRadioOn.FreeResources(); - m_imgRadioOff.FreeResources(); + CGUIButtonControl::FreeResources(immediately); + m_imgRadioOn.FreeResources(immediately); + m_imgRadioOff.FreeResources(immediately); } void CGUIRadioButtonControl::DynamicResourceAlloc(bool bOnOff) diff --git a/guilib/GUIRadioButtonControl.h b/guilib/GUIRadioButtonControl.h index 4218d90c51..2c66febfb2 100644 --- a/guilib/GUIRadioButtonControl.h +++ b/guilib/GUIRadioButtonControl.h @@ -49,7 +49,7 @@ public: virtual bool OnAction(const CAction &action) ; virtual bool OnMessage(CGUIMessage& message); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual void SetInvalid(); virtual void SetPosition(float posX, float posY); diff --git a/guilib/GUIRenderingControl.cpp b/guilib/GUIRenderingControl.cpp index dc55c8a551..442f74163b 100644 --- a/guilib/GUIRenderingControl.cpp +++ b/guilib/GUIRenderingControl.cpp @@ -75,7 +75,7 @@ void CGUIRenderingControl::Render() CGUIControl::Render(); } -void CGUIRenderingControl::FreeResources() +void CGUIRenderingControl::FreeResources(bool immediately) { if (!m_addon) return; diff --git a/guilib/GUIRenderingControl.h b/guilib/GUIRenderingControl.h index 0d3afed1b4..8858c7dff3 100644 --- a/guilib/GUIRenderingControl.h +++ b/guilib/GUIRenderingControl.h @@ -32,7 +32,7 @@ public: virtual void Render(); virtual void UpdateVisibility(const CGUIListItem *item = NULL); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual bool CanFocus() const { return false; } virtual bool CanFocusFromPoint(const CPoint &point) const; void LoadAddon(const ADDON::AddonPtr &addon); diff --git a/guilib/GUIResizeControl.cpp b/guilib/GUIResizeControl.cpp index 3b77268d51..ca92594614 100644 --- a/guilib/GUIResizeControl.cpp +++ b/guilib/GUIResizeControl.cpp @@ -173,11 +173,11 @@ void CGUIResizeControl::AllocResources() m_height = m_imgFocus.GetHeight(); } -void CGUIResizeControl::FreeResources() +void CGUIResizeControl::FreeResources(bool immediately) { - CGUIControl::FreeResources(); - m_imgFocus.FreeResources(); - m_imgNoFocus.FreeResources(); + CGUIControl::FreeResources(immediately); + m_imgFocus.FreeResources(immediately); + m_imgNoFocus.FreeResources(immediately); } void CGUIResizeControl::DynamicResourceAlloc(bool bOnOff) diff --git a/guilib/GUIResizeControl.h b/guilib/GUIResizeControl.h index aaa9343756..b28a12f02b 100644 --- a/guilib/GUIResizeControl.h +++ b/guilib/GUIResizeControl.h @@ -59,7 +59,7 @@ public: virtual void OnLeft(); virtual void OnRight(); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual void SetInvalid(); virtual void SetPosition(float posX, float posY); diff --git a/guilib/GUIScrollBarControl.cpp b/guilib/GUIScrollBarControl.cpp index 3d661e522d..42ddbaa014 100644 --- a/guilib/GUIScrollBarControl.cpp +++ b/guilib/GUIScrollBarControl.cpp @@ -149,14 +149,14 @@ void CGUIScrollBar::SetValue(int value) SetInvalid(); } -void CGUIScrollBar::FreeResources() +void CGUIScrollBar::FreeResources(bool immediately) { - CGUIControl::FreeResources(); - m_guiBackground.FreeResources(); - m_guiBarNoFocus.FreeResources(); - m_guiBarFocus.FreeResources(); - m_guiNibNoFocus.FreeResources(); - m_guiNibFocus.FreeResources(); + CGUIControl::FreeResources(immediately); + m_guiBackground.FreeResources(immediately); + m_guiBarNoFocus.FreeResources(immediately); + m_guiBarFocus.FreeResources(immediately); + m_guiNibNoFocus.FreeResources(immediately); + m_guiNibFocus.FreeResources(immediately); } void CGUIScrollBar::DynamicResourceAlloc(bool bOnOff) diff --git a/guilib/GUIScrollBarControl.h b/guilib/GUIScrollBarControl.h index 688811da91..c26db1567d 100644 --- a/guilib/GUIScrollBarControl.h +++ b/guilib/GUIScrollBarControl.h @@ -52,7 +52,7 @@ public: virtual void Render(); virtual bool OnAction(const CAction &action); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual void SetInvalid(); virtual void SetRange(int pageSize, int numItems); diff --git a/guilib/GUISelectButtonControl.cpp b/guilib/GUISelectButtonControl.cpp index e614336a3c..7dd9597aaa 100644 --- a/guilib/GUISelectButtonControl.cpp +++ b/guilib/GUISelectButtonControl.cpp @@ -226,17 +226,17 @@ bool CGUISelectButtonControl::OnAction(const CAction &action) } } -void CGUISelectButtonControl::FreeResources() +void CGUISelectButtonControl::FreeResources(bool immediately) { - CGUIButtonControl::FreeResources(); + CGUIButtonControl::FreeResources(immediately); - m_imgBackground.FreeResources(); + m_imgBackground.FreeResources(immediately); - m_imgLeft.FreeResources(); - m_imgLeftFocus.FreeResources(); + m_imgLeft.FreeResources(immediately); + m_imgLeftFocus.FreeResources(immediately); - m_imgRight.FreeResources(); - m_imgRightFocus.FreeResources(); + m_imgRight.FreeResources(immediately); + m_imgRightFocus.FreeResources(immediately); m_bShowSelect = false; } diff --git a/guilib/GUISelectButtonControl.h b/guilib/GUISelectButtonControl.h index 76604c5877..519b0af265 100644 --- a/guilib/GUISelectButtonControl.h +++ b/guilib/GUISelectButtonControl.h @@ -107,7 +107,7 @@ public: virtual bool OnMouseOver(const CPoint &point); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual void SetInvalid(); virtual void SetPosition(float posX, float posY); diff --git a/guilib/GUISettingsSliderControl.cpp b/guilib/GUISettingsSliderControl.cpp index cb3fd15da6..6bfa9b743d 100644 --- a/guilib/GUISettingsSliderControl.cpp +++ b/guilib/GUISettingsSliderControl.cpp @@ -57,10 +57,10 @@ bool CGUISettingsSliderControl::OnAction(const CAction &action) return CGUISliderControl::OnAction(action); } -void CGUISettingsSliderControl::FreeResources() +void CGUISettingsSliderControl::FreeResources(bool immediately) { - CGUISliderControl::FreeResources(); - m_buttonControl.FreeResources(); + CGUISliderControl::FreeResources(immediately); + m_buttonControl.FreeResources(immediately); } void CGUISettingsSliderControl::DynamicResourceAlloc(bool bOnOff) diff --git a/guilib/GUISettingsSliderControl.h b/guilib/GUISettingsSliderControl.h index 951851ffb2..42ee3605c6 100644 --- a/guilib/GUISettingsSliderControl.h +++ b/guilib/GUISettingsSliderControl.h @@ -51,7 +51,7 @@ public: virtual void Render(); virtual bool OnAction(const CAction &action); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual void SetInvalid(); virtual void SetPosition(float posX, float posY); diff --git a/guilib/GUISliderControl.cpp b/guilib/GUISliderControl.cpp index 47516e84b3..e09595748c 100644 --- a/guilib/GUISliderControl.cpp +++ b/guilib/GUISliderControl.cpp @@ -234,12 +234,12 @@ void CGUISliderControl::SetFloatRange(float fStart, float fEnd) } } -void CGUISliderControl::FreeResources() +void CGUISliderControl::FreeResources(bool immediately) { - CGUIControl::FreeResources(); - m_guiBackground.FreeResources(); - m_guiMid.FreeResources(); - m_guiMidFocus.FreeResources(); + CGUIControl::FreeResources(immediately); + m_guiBackground.FreeResources(immediately); + m_guiMid.FreeResources(immediately); + m_guiMidFocus.FreeResources(immediately); } void CGUISliderControl::DynamicResourceAlloc(bool bOnOff) diff --git a/guilib/GUISliderControl.h b/guilib/GUISliderControl.h index 4a2d8dc978..e90cf5ece4 100644 --- a/guilib/GUISliderControl.h +++ b/guilib/GUISliderControl.h @@ -51,7 +51,7 @@ public: virtual void Render(); virtual bool OnAction(const CAction &action); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual void SetInvalid(); virtual void SetRange(int iStart, int iEnd); diff --git a/guilib/GUISpinControl.cpp b/guilib/GUISpinControl.cpp index f57ee9423d..d1d78137e7 100644 --- a/guilib/GUISpinControl.cpp +++ b/guilib/GUISpinControl.cpp @@ -318,13 +318,13 @@ void CGUISpinControl::AllocResources() m_imgspinUpFocus.SetPosition(m_posX + m_imgspinDownFocus.GetWidth(), m_posY); } -void CGUISpinControl::FreeResources() +void CGUISpinControl::FreeResources(bool immediately) { - CGUIControl::FreeResources(); - m_imgspinUp.FreeResources(); - m_imgspinUpFocus.FreeResources(); - m_imgspinDown.FreeResources(); - m_imgspinDownFocus.FreeResources(); + CGUIControl::FreeResources(immediately); + m_imgspinUp.FreeResources(immediately); + m_imgspinUpFocus.FreeResources(immediately); + m_imgspinDown.FreeResources(immediately); + m_imgspinDownFocus.FreeResources(immediately); m_iTypedPos = 0; strcpy(m_szTyped, ""); } diff --git a/guilib/GUISpinControl.h b/guilib/GUISpinControl.h index 27db78d7e5..c1a983474a 100644 --- a/guilib/GUISpinControl.h +++ b/guilib/GUISpinControl.h @@ -57,7 +57,7 @@ public: virtual bool OnMouseOver(const CPoint &point); virtual bool OnMessage(CGUIMessage& message); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual void SetInvalid(); virtual void SetPosition(float posX, float posY); diff --git a/guilib/GUISpinControlEx.cpp b/guilib/GUISpinControlEx.cpp index 4c5f53cebb..23e0cec459 100644 --- a/guilib/GUISpinControlEx.cpp +++ b/guilib/GUISpinControlEx.cpp @@ -43,10 +43,10 @@ void CGUISpinControlEx::AllocResources() m_height = GetSpinHeight(); } -void CGUISpinControlEx::FreeResources() +void CGUISpinControlEx::FreeResources(bool immediately) { - CGUISpinControl::FreeResources(); - m_buttonControl.FreeResources(); + CGUISpinControl::FreeResources(immediately); + m_buttonControl.FreeResources(immediately); } void CGUISpinControlEx::DynamicResourceAlloc(bool bOnOff) diff --git a/guilib/GUISpinControlEx.h b/guilib/GUISpinControlEx.h index 8f243fda85..19db83e652 100644 --- a/guilib/GUISpinControlEx.h +++ b/guilib/GUISpinControlEx.h @@ -50,7 +50,7 @@ public: virtual float GetHeight() const { return m_buttonControl.GetHeight();}; virtual void SetHeight(float height); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual void SetInvalid(); const CStdString GetCurrentLabel() const; diff --git a/guilib/GUIToggleButtonControl.cpp b/guilib/GUIToggleButtonControl.cpp index a29efa0447..bd0f80bdd6 100644 --- a/guilib/GUIToggleButtonControl.cpp +++ b/guilib/GUIToggleButtonControl.cpp @@ -76,10 +76,10 @@ void CGUIToggleButtonControl::AllocResources() m_selectButton.AllocResources(); } -void CGUIToggleButtonControl::FreeResources() +void CGUIToggleButtonControl::FreeResources(bool immediately) { - CGUIButtonControl::FreeResources(); - m_selectButton.FreeResources(); + CGUIButtonControl::FreeResources(immediately); + m_selectButton.FreeResources(immediately); } void CGUIToggleButtonControl::DynamicResourceAlloc(bool bOnOff) diff --git a/guilib/GUIToggleButtonControl.h b/guilib/GUIToggleButtonControl.h index 61a4676646..adea066dc9 100644 --- a/guilib/GUIToggleButtonControl.h +++ b/guilib/GUIToggleButtonControl.h @@ -45,7 +45,7 @@ public: virtual void Render(); virtual bool OnAction(const CAction &action); virtual void AllocResources(); - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void DynamicResourceAlloc(bool bOnOff); virtual void SetInvalid(); virtual void SetPosition(float posX, float posY); diff --git a/guilib/GUIVisualisationControl.cpp b/guilib/GUIVisualisationControl.cpp index 110ee88635..5953e5ab43 100644 --- a/guilib/GUIVisualisationControl.cpp +++ b/guilib/GUIVisualisationControl.cpp @@ -36,7 +36,7 @@ void CGUIVisualisationControl::Render() CGUIRenderingControl::Render(); } -void CGUIVisualisationControl::FreeResources() +void CGUIVisualisationControl::FreeResources(bool immediately) { // tell our app that we're going if (!m_addon) @@ -45,7 +45,7 @@ void CGUIVisualisationControl::FreeResources() CGUIMessage msg(GUI_MSG_VISUALISATION_UNLOADING, m_controlID, 0); g_windowManager.SendMessage(msg); CLog::Log(LOGDEBUG, "FreeVisualisation() started"); - CGUIRenderingControl::FreeResources(); + CGUIRenderingControl::FreeResources(immediately); CLog::Log(LOGDEBUG, "FreeVisualisation() done"); } diff --git a/guilib/GUIVisualisationControl.h b/guilib/GUIVisualisationControl.h index e782f6a945..3d0a76163a 100644 --- a/guilib/GUIVisualisationControl.h +++ b/guilib/GUIVisualisationControl.h @@ -28,6 +28,6 @@ public: CGUIVisualisationControl(int parentID, int controlID, float posX, float posY, float width, float height); CGUIVisualisationControl(const CGUIVisualisationControl &from); virtual CGUIVisualisationControl *Clone() const { return new CGUIVisualisationControl(*this); }; //TODO check for naughties - virtual void FreeResources(); + virtual void FreeResources(bool immediately = false); virtual void Render(); }; |