Skip to content
This repository
Browse code

Merge pull request #2045 from jmarshallnz/hasprocessed

tag animations as ready to go once processed once, not when rendered once
  • Loading branch information...
commit fa4eb438f79ae49dd39bc86e0ba194177d6ed975 2 parents d27da6c + 1278e07
authored April 06, 2013
2  xbmc/dialogs/GUIDialogProgress.cpp
@@ -88,7 +88,7 @@ void CGUIDialogProgress::StartModal()
88 88
     // we must be running from fullscreen video or similar where the
89 89
     // calling thread handles rendering (ie not main app thread) but
90 90
     // is waiting on this routine before rendering begins
91  
-    if (!m_hasRendered)
  91
+    if (!HasProcessed())
92 92
       break;
93 93
   }
94 94
 }
4  xbmc/guilib/GUIControl.h
@@ -84,7 +84,7 @@ class CGUIControl
84 84
   virtual void DoRender();
85 85
   virtual void Render();
86 86
 
87  
-  bool HasRendered() const { return m_hasRendered; };
  87
+  bool HasProcessed() const { return m_hasProcessed; };
88 88
 
89 89
   // OnAction() is called by our window when we are the focused control.
90 90
   // We should process any control-specific actions in the derived classes,
@@ -343,7 +343,7 @@ class CGUIControl
343 343
   bool m_visibleFromSkinCondition;
344 344
   bool m_forceHidden;       // set from the code when a hidden operation is given - overrides m_visible
345 345
   CGUIInfoBool m_allowHiddenFocus;
346  
-  bool m_hasRendered;
  346
+  bool m_hasProcessed;
347 347
   // enable/disable state
348 348
   unsigned int m_enableCondition;
349 349
   bool m_enabled;
2  xbmc/guilib/GUIDialog.cpp
@@ -234,7 +234,7 @@ void CGUIDialog::FrameMove()
234 234
   { // check if our timer is running
235 235
     if (!m_showStartTime)
236 236
     {
237  
-      if (HasRendered()) // start timer
  237
+      if (HasProcessed()) // start timer
238 238
         m_showStartTime = CTimeUtils::GetFrameTime();
239 239
     }
240 240
     else
4  xbmc/guilib/GUIImage.cpp
@@ -68,7 +68,7 @@ void CGUIImage::UpdateInfo(const CGUIListItem *item)
68 68
     return; // nothing to do
69 69
 
70 70
   // don't allow image to change while animating out
71  
-  if (HasRendered() && IsAnimating(ANIM_TYPE_HIDDEN) && !IsVisibleFromSkin())
  71
+  if (HasProcessed() && IsAnimating(ANIM_TYPE_HIDDEN) && !IsVisibleFromSkin())
72 72
     return;
73 73
 
74 74
   if (item)
@@ -253,7 +253,7 @@ void CGUIImage::FreeResourcesButNotAnims()
253 253
 {
254 254
   FreeTextures();
255 255
   m_bAllocated=false;
256  
-  m_hasRendered = false;
  256
+  m_hasProcessed = false;
257 257
 }
258 258
 
259 259
 void CGUIImage::DynamicResourceAlloc(bool bOnOff)
4  xbmc/guilib/GUIWindow.cpp
@@ -492,7 +492,7 @@ void CGUIWindow::OnInitWindow()
492 492
     g_audioManager.PlayWindowSound(GetID(), SOUND_INIT);
493 493
 
494 494
   // set our rendered state
495  
-  m_hasRendered = false;
  495
+  m_hasProcessed = false;
496 496
   m_closing = false;
497 497
   m_active = true;
498 498
   ResetAnimations();  // we need to reset our animations as those windows that don't dynamically allocate
@@ -818,7 +818,7 @@ bool CGUIWindow::CheckAnimation(ANIMATION_TYPE animType)
818 818
   // special cases first
819 819
   if (animType == ANIM_TYPE_WINDOW_CLOSE)
820 820
   {
821  
-    if (!m_bAllocated || !m_hasRendered) // can't render an animation if we aren't allocated or haven't rendered
  821
+    if (!m_bAllocated || !HasProcessed()) // can't process an animation if we aren't allocated or haven't processed
822 822
       return false;
823 823
     // make sure we update our visibility prior to queuing the window close anim
824 824
     for (unsigned int i = 0; i < m_children.size(); i++)
4  xbmc/pictures/GUIWindowSlideShow.cpp
@@ -391,8 +391,8 @@ void CGUIWindowSlideShow::Process(unsigned int currentTime, CDirtyRegionList &re
391 391
   int iSlides = m_slides->Size();
392 392
   if (!iSlides) return ;
393 393
 
394  
-  // if we haven't rendered yet, we should mark the whole screen
395  
-  if (!m_hasRendered)
  394
+  // if we haven't processed yet, we should mark the whole screen
  395
+  if (!HasProcessed())
396 396
     regions.push_back(CRect(0.0f, 0.0f, (float)g_graphicsContext.GetWidth(), (float)g_graphicsContext.GetHeight()));
397 397
 
398 398
   if (m_iNextSlide < 0 || m_iNextSlide >= m_slides->Size())

1 note on commit fa4eb43

Matthias Kortstiege
Collaborator

Breaks build (at least on Linux). Looks like a good bunch of m_hasRendered references were left out in GUIControl.cpp

Please sign in to comment.
Something went wrong with that request. Please try again.