aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/guilib/GUIImage.cpp14
-rw-r--r--xbmc/guilib/GUIImage.h6
2 files changed, 17 insertions, 3 deletions
diff --git a/xbmc/guilib/GUIImage.cpp b/xbmc/guilib/GUIImage.cpp
index 82d8775949..0a87c2e002 100644
--- a/xbmc/guilib/GUIImage.cpp
+++ b/xbmc/guilib/GUIImage.cpp
@@ -60,8 +60,19 @@ void CGUIImage::UpdateVisibility(const CGUIListItem *item)
AllocateOnDemand();
}
+void CGUIImage::UpdateDiffuseColor(const CGUIListItem* item)
+{
+ if (m_texture->SetDiffuseColor(m_diffuseColor, item))
+ {
+ MarkDirtyRegion();
+ }
+}
+
void CGUIImage::UpdateInfo(const CGUIListItem *item)
{
+ // Update the diffuse color. The texture diffuse color may depend on the current item
+ UpdateDiffuseColor(item);
+
if (m_info.IsConstant())
return; // nothing to do
@@ -156,9 +167,6 @@ void CGUIImage::Process(unsigned int currentTime, CDirtyRegionList &dirtyregions
MarkDirtyRegion();
}
- if (m_texture->SetDiffuseColor(m_diffuseColor))
- MarkDirtyRegion();
-
if (m_texture->Process(currentTime))
MarkDirtyRegion();
diff --git a/xbmc/guilib/GUIImage.h b/xbmc/guilib/GUIImage.h
index 8ce80a5a1c..e9e934767f 100644
--- a/xbmc/guilib/GUIImage.h
+++ b/xbmc/guilib/GUIImage.h
@@ -95,6 +95,12 @@ protected:
unsigned char GetFadeLevel(unsigned int time) const;
bool ProcessFading(CFadingTexture *texture, unsigned int frameTime, unsigned int currentTime);
+ /*!
+ * \brief Update the diffuse color based on the current item infos
+ * \param item the item to for info resolution
+ */
+ void UpdateDiffuseColor(const CGUIListItem* item);
+
bool m_bDynamicResourceAlloc;
// border + conditional info