summaryrefslogtreecommitdiffstats
path: root/content/app
diff options
context:
space:
mode:
authorsimonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-10 23:36:08 +0000
committersimonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-10 23:36:08 +0000
commitc8e8cb94373c68f39a82e920c469c25f65b9cf5b (patch)
treec5daf2c91ebf056ff98cb506e47df6c4b1a656a1 /content/app
parent61fa77f89e6835141b114528821b214496c2501e (diff)
downloadchromium_src-c8e8cb94373c68f39a82e920c469c25f65b9cf5b.zip
chromium_src-c8e8cb94373c68f39a82e920c469c25f65b9cf5b.tar.gz
chromium_src-c8e8cb94373c68f39a82e920c469c25f65b9cf5b.tar.bz2
Enable high resolution time for TimeTicks::Now on Windows Canary
This should be unnoticeable, except for improved resolution in places such as window.performance.now(). The feature is enabled if the user is running Canary channel or has manually specified the --enable-high-resolution-time flag. This will only work if the CPU has a non-stop TSC and isn't a broken Athlon processor. UMA data show this is a safe combination. The flag is propagated to renderer processes so that they know to enable it too. BUG=158234 Review URL: https://chromiumcodereview.appspot.com/23147002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222396 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/app')
-rw-r--r--content/app/content_main_runner.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 9fc34c2..7bfc37b 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -686,6 +686,9 @@ class ContentMainRunnerImpl : public ContentMainRunner {
MachBroker::ChildSendTaskPortToParent();
}
#elif defined(OS_WIN)
+ if (command_line.HasSwitch(switches::kEnableHighResolutionTime))
+ base::TimeTicks::SetNowIsHighResNowIfSupported();
+
// This must be done early enough since some helper functions like
// IsTouchEnabled, needed to load resources, may call into the theme dll.
EnableThemeSupportOnAllWindowStations();