From: Rafaël Carré Date: Sun, 17 Jan 2010 10:09:46 +0000 (+0100) Subject: qt4: Don't update art when it hasn't changed X-Git-Tag: 1.1.0-ff~1160 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=5c66bbbf5285dcc3fe57bf0f682deb37e001c766;p=vlc qt4: Don't update art when it hasn't changed This gives a use to the otherwise useless artUrl variable This prevents qt4 interface from consuming 100% of CPU when art image has to be scaled from a big source picture --- diff --git a/modules/gui/qt4/input_manager.cpp b/modules/gui/qt4/input_manager.cpp index 1650d4e90c..b6af6b3ffb 100644 --- a/modules/gui/qt4/input_manager.cpp +++ b/modules/gui/qt4/input_manager.cpp @@ -614,8 +614,13 @@ void InputManager::UpdateArt() url = url.replace( "attachment://", "" ); } + /* the art hasn't changed, no need to update */ + if(artUrl == url) + return; + /* Update Art meta */ - emit artChanged( url ); + artUrl = url; + emit artChanged( artUrl ); } inline void InputManager::UpdateStats()