summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
Diffstat (limited to 'content')
-rw-r--r--content/app/content_main_runner.cc3
-rw-r--r--content/browser/browser_child_process_host_impl.cc3
-rw-r--r--content/browser/renderer_host/render_process_host_impl.cc3
-rw-r--r--content/public/common/content_switches.cc5
-rw-r--r--content/public/common/content_switches.h3
5 files changed, 17 insertions, 0 deletions
diff --git a/content/app/content_main_runner.cc b/content/app/content_main_runner.cc
index 6554d57..4f8195c 100644
--- a/content/app/content_main_runner.cc
+++ b/content/app/content_main_runner.cc
@@ -671,6 +671,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();
diff --git a/content/browser/browser_child_process_host_impl.cc b/content/browser/browser_child_process_host_impl.cc
index 780dc6a..76b85b2b 100644
--- a/content/browser/browser_child_process_host_impl.cc
+++ b/content/browser/browser_child_process_host_impl.cc
@@ -153,6 +153,9 @@ void BrowserChildProcessHostImpl::Launch(
#if defined(OS_POSIX)
switches::kChildCleanExit,
#endif
+#if defined(OS_WIN)
+ switches::kEnableHighResolutionTime,
+#endif
};
cmd_line->CopySwitchesFrom(browser_command_line, kForwardSwitches,
arraysize(kForwardSwitches));
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 2dd784a..b7f9dcb 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -932,6 +932,9 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
switches::kEnableGPUClientLogging,
switches::kEnableGpuClientTracing,
switches::kEnableGpuBenchmarking,
+#if defined(OS_WIN)
+ switches::kEnableHighResolutionTime,
+#endif
switches::kEnableMemoryBenchmarking,
switches::kEnableOverlayScrollbars,
switches::kEnableSkiaBenchmarking,
diff --git a/content/public/common/content_switches.cc b/content/public/common/content_switches.cc
index 5169ba4..582a345 100644
--- a/content/public/common/content_switches.cc
+++ b/content/public/common/content_switches.cc
@@ -399,6 +399,11 @@ const char kEnableGpuClientTracing[] = "enable-gpu-client-tracing";
const char kEnableHighDpiCompositingForFixedPosition[] =
"enable-high-dpi-fixed-position-compositing";
+#if defined(OS_WIN)
+// Use high resolution timers for TimeTicks.
+const char kEnableHighResolutionTime[] = "enable-high-resolution-time";
+#endif
+
// Enable HTML Imports
extern const char kEnableHTMLImports[] = "enable-html-imports";
diff --git a/content/public/common/content_switches.h b/content/public/common/content_switches.h
index 949400a..aec086f 100644
--- a/content/public/common/content_switches.h
+++ b/content/public/common/content_switches.h
@@ -123,6 +123,9 @@ CONTENT_EXPORT extern const char kEnableGestureTapHighlight[];
extern const char kEnableGpuBenchmarking[];
extern const char kEnableGpuClientTracing[];
CONTENT_EXPORT extern const char kEnableHighDpiCompositingForFixedPosition[];
+ #if defined(OS_WIN)
+extern const char kEnableHighResolutionTime[];
+#endif
extern const char kEnableHTMLImports[];
CONTENT_EXPORT extern const char kEnableInbandTextTracks[];
CONTENT_EXPORT extern const char kEnableLogging[];