Commit c18236d0 authored by Clément Stenac's avatar Clément Stenac

Fix a warning

Add some timing to playlist 
parent 56d009ad
......@@ -262,7 +262,9 @@ enum
STATS_TIMER_PLAYLIST_WALK,
STATS_TIMER_INTERACTION,
STATS_TIMER_PREPARSE
STATS_TIMER_PREPARSE,
STATS_TIMER_SKINS_PLAYTREE_IMAGE,
};
struct stats_handler_t
......
......@@ -646,6 +646,8 @@ void CtrlTree::autoScroll()
void CtrlTree::makeImage()
{
stats_TimerStart( getIntf(), "[Skins] Playlist image",
STATS_TIMER_SKINS_PLAYTREE_IMAGE );
if( m_pImage )
{
delete m_pImage;
......@@ -655,6 +657,7 @@ void CtrlTree::makeImage()
const Position *pPos = getPosition();
if( !pPos )
{
stats_TimerStop( getIntf(), STATS_TIMER_SKINS_PLAYTREE_IMAGE );
return;
}
int width = pPos->getWidth();
......@@ -734,6 +737,7 @@ void CtrlTree::makeImage()
GenericBitmap *pText = m_rFont.drawString( *pStr, color, width - bitmapWidth * depth );
if( !pText )
{
stats_TimerStop( getIntf(), STATS_TIMER_SKINS_PLAYTREE_IMAGE );
return;
}
if( it->size() )
......@@ -774,6 +778,7 @@ void CtrlTree::makeImage()
it = m_rTree.getNextVisibleItem( it );
} while( it->m_deleted );
}
stats_TimerStop( getIntf(), STATS_TIMER_SKINS_PLAYTREE_IMAGE );
}
VarTree::Iterator CtrlTree::findItemAtPos( int pos )
......
......@@ -28,8 +28,8 @@ const string VarTree::m_type = "tree";
VarTree::VarTree( intf_thread_t *pIntf )
: Variable( pIntf ), m_id( 0 ), m_selected( false ), m_playing( false ),
m_expanded( false ), m_deleted( false ), m_readonly( false),
m_pData( NULL ), m_pParent( NULL )
m_expanded( false ), m_deleted( false ),
m_pData( NULL ), m_pParent( NULL ), m_readonly( false )
{
// Create the position variable
m_cPosition = VariablePtr( new VarPercent( pIntf ) );
......@@ -42,8 +42,8 @@ VarTree::VarTree( intf_thread_t *pIntf, VarTree *pParent, int id,
void *pData )
: Variable( pIntf ), m_id( id ), m_cString( rcString ),
m_selected( selected ), m_playing( playing ), m_expanded( expanded ),
m_deleted( false ), m_readonly( readonly ),
m_pData( pData ), m_pParent( pParent )
m_deleted( false ), m_pData( pData ), m_pParent( pParent ),
m_readonly( readonly )
{
// Create the position variable
m_cPosition = VariablePtr( new VarPercent( pIntf ) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment