Have GUITextBox cache resulting transform in process
authorTobias Arrskog <topfs2@xbmc.org>
Tue, 31 May 2011 17:29:11 +0000 (19:29 +0200)
committerJonathan Marshall <jmarshall@never.you.mind>
Thu, 16 Jun 2011 04:00:02 +0000 (16:00 +1200)
xbmc/guilib/GUITextBox.cpp
xbmc/guilib/GUITextBox.h

index 2223d9a..fdee9aa 100644 (file)
@@ -115,7 +115,7 @@ void CGUITextBox::DoProcess(unsigned int currentTime, CDirtyRegionList &dirtyreg
   {
     m_autoScrollRepeatAnim->Animate(m_renderTime, true);
     m_autoScrollRepeatAnim->RenderAnimation(m_textMatrix);
-    g_graphicsContext.AddTransform(m_textMatrix);
+    m_cachedTextMatrix = g_graphicsContext.AddTransform(m_textMatrix);
   }
 
   CGUIControl::DoProcess(currentTime, dirtyregions);
@@ -145,7 +145,7 @@ void CGUITextBox::DoRender()
 {
   // render the repeat anim as appropriate
   if (m_autoScrollRepeatAnim)
-    g_graphicsContext.AddTransform(m_textMatrix);
+    g_graphicsContext.SetTransform(m_cachedTextMatrix);
 
   CGUIControl::DoRender();
 
index 5b560e4..e25bd4d 100644 (file)
@@ -87,6 +87,7 @@ protected:
   CLabelInfo m_label;
 
   TransformMatrix m_textMatrix;
+  TransformMatrix m_cachedTextMatrix;
 
   // autoscrolling
   int          m_autoScrollCondition;