Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(32)

Unified Diff: ui/compositor/compositor.cc

Issue 12088092: CrOS: Enable threaded UI compositor by default. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep for enable flag for other platforms. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/compositor_switches.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/compositor.cc
diff --git a/ui/compositor/compositor.cc b/ui/compositor/compositor.cc
index 56b5eb4d9629f3efb3e452475cf08bc1902c5b69..839036671730222649190c0a9cb64591171a6f79 100644
--- a/ui/compositor/compositor.cc
+++ b/ui/compositor/compositor.cc
@@ -535,7 +535,17 @@ Compositor::~Compositor() {
}
// static
-void Compositor::Initialize(bool use_thread) {
+void Compositor::Initialize() {
+#if defined(OS_CHROMEOS)
+ bool use_thread = !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kUIDisableThreadedCompositing);
+#else
+ bool use_thread =
+ CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kUIEnableThreadedCompositing) &&
+ !CommandLine::ForCurrentProcess()->HasSwitch(
+ switches::kUIDisableThreadedCompositing);
+#endif
if (use_thread) {
g_compositor_thread = new base::Thread("Browser Compositor");
g_compositor_thread->Start();
« no previous file with comments | « ui/compositor/compositor.h ('k') | ui/compositor/compositor_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698