Skip to content
Browse files

Merge pull request #63 from fritsch/xvba-eden

Backport some fixes
  • Loading branch information...
2 parents 8278a6c + 73867cf commit 3e73af8a6552790e05e8518666f7f5a64d1e1b3a @FernetMenta committed Aug 4, 2012
View
4 xbmc/Application.cpp
@@ -2124,8 +2124,6 @@ void CApplication::Render()
g_Windowing.EndRender();
- g_TextureManager.FreeUnusedTextures();
-
// reset our info cache - we do this at the end of Render so that it is
// fresh for the next process(), or after a windowclose animation (where process()
// isn't called)
@@ -2164,6 +2162,8 @@ void CApplication::Render()
}
CTimeUtils::UpdateFrameTime(flip);
+ g_TextureManager.FreeUnusedTextures();
+
g_renderManager.UpdateResolution();
g_renderManager.ManageCaptures();
}
View
2 xbmc/filesystem/PluginDirectory.cpp
@@ -478,7 +478,7 @@ bool CPluginDirectory::WaitOnScriptResult(const CStdString &scriptPath, const CS
}
// check whether we should pop up the progress dialog
- if (!progressBar && XbmcThreads::SystemClockMillis() - startTime > timeBeforeProgressBar)
+ if (!progressBar && XbmcThreads::SystemClockMillis() - startTime > timeBeforeProgressBar && !g_windowManager.HasModalDialog())
{ // loading takes more then 1.5 secs, show a progress dialog
progressBar = (CGUIDialogProgress *)g_windowManager.GetWindow(WINDOW_DIALOG_PROGRESS);
View
3 xbmc/guilib/GUIFontTTFGL.cpp
@@ -24,6 +24,7 @@
#include "GUIFontTTFGL.h"
#include "GUIFontManager.h"
#include "Texture.h"
+#include "TextureManager.h"
#include "GraphicContext.h"
#include "gui3d.h"
#include "utils/log.h"
@@ -234,7 +235,7 @@ void CGUIFontTTFGL::DeleteHardwareTexture()
if (m_bTextureLoaded)
{
if (glIsTexture(m_nTexture))
- glDeleteTextures(1, (GLuint*) &m_nTexture);
+ g_TextureManager.ReleaseHwTexture(m_nTexture);
m_bTextureLoaded = false;
}
}
View
13 xbmc/guilib/TextureManager.cpp
@@ -457,6 +457,19 @@ void CGUITextureManager::FreeUnusedTextures()
for (ivecTextures i = m_unusedTextures.begin(); i != m_unusedTextures.end(); ++i)
delete *i;
m_unusedTextures.clear();
+
+#if defined(HAS_GL) || defined(HAS_GLES)
+ for (unsigned int i = 0; i < m_unusedHwTextures.size(); ++i)
+ {
+ glDeleteTextures(1, (GLuint*) &m_unusedHwTextures[i]);
+ }
+#endif
+ m_unusedHwTextures.clear();
+}
+
+void CGUITextureManager::ReleaseHwTexture(unsigned int texture)
+{
+ m_unusedHwTextures.push_back(texture);
}
void CGUITextureManager::Cleanup()
View
2 xbmc/guilib/TextureManager.h
@@ -124,9 +124,11 @@ class CGUITextureManager
void RemoveTexturePath(const CStdString &texturePath); ///< Remove a path from the paths to check when loading media
void FreeUnusedTextures(); ///< Free textures (called from app thread only)
+ void ReleaseHwTexture(unsigned int texture);
protected:
std::vector<CTextureMap*> m_vecTextures;
std::vector<CTextureMap*> m_unusedTextures;
+ std::vector<unsigned int> m_unusedHwTextures;
typedef std::vector<CTextureMap*>::iterator ivecTextures;
// we have 2 texture bundles (one for the base textures, one for the theme)
CTextureBundle m_TexBundle[2];
View
3 xbmc/interfaces/python/xbmcmodule/keyboard.cpp
@@ -92,6 +92,9 @@ namespace PYXBMC
if (!PyArg_ParseTuple(args, (char*)"|i", &autoClose)) return NULL;
+ if (g_windowManager.IsWindowActive(WINDOW_DIALOG_PROGRESS))
+ g_windowManager.CloseDialogs();
+
PyXBMCGUILock();
pKeyboard->Initialize();
pKeyboard->SetHeading(self->strHeading);

0 comments on commit 3e73af8

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