aboutsummaryrefslogtreecommitdiff
path: root/guilib
diff options
context:
space:
mode:
authorjmarshallnz <jmarshallnz@svn>2010-08-09 06:43:37 +0000
committerjmarshallnz <jmarshallnz@svn>2010-08-09 06:43:37 +0000
commit25ce3b9cfd490af86e37213013cdcd3a7a99d801 (patch)
tree7deb46ff8cbe6d125d94a4848c426f0de928b32d /guilib
parentc6e6572e819fae7a10d80282bcf5b8d43605bed5 (diff)
changed, there's no reason to be timing skin loads unless under debug
(cherry picked from commit 46c72e3ba34c4b34b7c384ae1323e4cb318b8f22) git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/branches/Dharma@32620 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib')
-rw-r--r--guilib/GUIWindow.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/guilib/GUIWindow.cpp b/guilib/GUIWindow.cpp
index f22312bedb..6b7c0fa5b3 100644
--- a/guilib/GUIWindow.cpp
+++ b/guilib/GUIWindow.cpp
@@ -80,9 +80,10 @@ bool CGUIWindow::Load(const CStdString& strFileName, bool bContainsPath)
if (m_windowLoaded)
return true; // no point loading if it's already there
+#ifdef _DEBUG
int64_t start;
start = CurrentHostCounter();
-
+#endif
RESOLUTION resToUse = RES_INVALID;
CLog::Log(LOGINFO, "Loading skin file: %s", strFileName.c_str());
@@ -103,11 +104,12 @@ bool CGUIWindow::Load(const CStdString& strFileName, bool bContainsPath)
bool ret = LoadXML(strPath.c_str(), strLowerPath.c_str());
+#ifdef _DEBUG
int64_t end, freq;
end = CurrentHostCounter();
freq = CurrentHostFrequency();
CLog::Log(LOGDEBUG,"Load %s: %.2fms", GetProperty("xmlfile").c_str(), 1000.f * (end - start) / freq);
-
+#endif
return ret;
}
@@ -596,9 +598,10 @@ void CGUIWindow::AllocResources(bool forceLoad /*= FALSE */)
{
CSingleLock lock(g_graphicsContext);
+#ifdef _DEBUG
int64_t start;
start = CurrentHostCounter();
-
+#endif
// load skin xml fil
CStdString xmlFile = GetProperty("xmlfile");
bool bHasPath=false;
@@ -613,11 +616,12 @@ void CGUIWindow::AllocResources(bool forceLoad /*= FALSE */)
// and now allocate resources
CGUIControlGroup::AllocResources();
+#ifdef _DEBUG
int64_t end, freq;
end = CurrentHostCounter();
freq = CurrentHostFrequency();
CLog::Log(LOGDEBUG,"Alloc resources: %.2fms (%.2f ms skin load)", 1000.f * (end - start) / freq, 1000.f * (slend - start) / freq);
-
+#endif
m_bAllocated = true;
}