diff options
author | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-05 15:58:35 +0000 |
---|---|---|
committer | dmaclach@chromium.org <dmaclach@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-05 15:58:35 +0000 |
commit | 47bef9efe2822bd69c6fab6916621b90537c42bc (patch) | |
tree | 3a175919fcc2ff32de4b4fdb3ca580b1c57f9255 | |
parent | 8f729a688705f41ba37485807c239132fffc3bcf (diff) | |
download | chromium_src-47bef9efe2822bd69c6fab6916621b90537c42bc.zip chromium_src-47bef9efe2822bd69c6fab6916621b90537c42bc.tar.gz chromium_src-47bef9efe2822bd69c6fab6916621b90537c42bc.tar.bz2 |
Speed enhancement for Remoting on Low end machines.
Only use multiple processors when we have the computing power available to do so.
BUG=99179
TEST=See bug
Review URL: http://codereview.chromium.org/8144007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104106 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | remoting/base/encoder_vp8.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/remoting/base/encoder_vp8.cc b/remoting/base/encoder_vp8.cc index eea1a52..42369e8 100644 --- a/remoting/base/encoder_vp8.cc +++ b/remoting/base/encoder_vp8.cc @@ -5,6 +5,7 @@ #include "remoting/base/encoder_vp8.h" #include "base/logging.h" +#include "base/sys_info.h" #include "media/base/yuv_convert.h" #include "remoting/base/capture_data.h" #include "remoting/base/util.h" @@ -110,9 +111,11 @@ bool EncoderVp8::Init(const SkISize& size) { // encoding. config.g_profile = 2; - // Using 2 threads would give a great boost in performance in most systems - // while hurting single core systems just a little bit. - config.g_threads = 2; + // Using 2 threads gives a great boost in performance for most systems with + // adequate processing power. NB: Going to multiple threads on low end + // windows systems can really hurt performance. + // http://crbug.com/99179 + config.g_threads = (base::SysInfo::NumberOfProcessors() > 2) ? 2 : 1; config.rc_min_quantizer = 20; config.rc_max_quantizer = 30; config.g_timebase.num = 1; |