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

Side by Side Diff: ui/compositor/compositor.cc

Issue 167973003: Remove the --ui-enable-threaded-compositing flag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | ui/compositor/compositor_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 271
272 ContextFactory::GetInstance()->RemoveCompositor(this); 272 ContextFactory::GetInstance()->RemoveCompositor(this);
273 } 273 }
274 274
275 // static 275 // static
276 void Compositor::Initialize() { 276 void Compositor::Initialize() {
277 #if defined(OS_CHROMEOS) 277 #if defined(OS_CHROMEOS)
278 bool use_thread = !CommandLine::ForCurrentProcess()->HasSwitch( 278 bool use_thread = !CommandLine::ForCurrentProcess()->HasSwitch(
279 switches::kUIDisableThreadedCompositing); 279 switches::kUIDisableThreadedCompositing);
280 #else 280 #else
281 bool use_thread = 281 bool use_thread = false;
282 CommandLine::ForCurrentProcess()->HasSwitch(
283 switches::kUIEnableThreadedCompositing) &&
284 !CommandLine::ForCurrentProcess()->HasSwitch(
285 switches::kUIDisableThreadedCompositing);
286 #endif 282 #endif
287 if (use_thread) { 283 if (use_thread) {
288 g_compositor_thread = new base::Thread("Browser Compositor"); 284 g_compositor_thread = new base::Thread("Browser Compositor");
289 g_compositor_thread->Start(); 285 g_compositor_thread->Start();
290 } 286 }
291 287
292 DCHECK(!g_compositor_initialized) << "Compositor initialized twice."; 288 DCHECK(!g_compositor_initialized) << "Compositor initialized twice.";
293 g_compositor_initialized = true; 289 g_compositor_initialized = true;
294 } 290 }
295 291
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 // CompositorObservers to be notified before starting another 555 // CompositorObservers to be notified before starting another
560 // draw cycle. 556 // draw cycle.
561 ScheduleDraw(); 557 ScheduleDraw();
562 } 558 }
563 FOR_EACH_OBSERVER(CompositorObserver, 559 FOR_EACH_OBSERVER(CompositorObserver,
564 observer_list_, 560 observer_list_,
565 OnCompositingEnded(this)); 561 OnCompositingEnded(this));
566 } 562 }
567 563
568 } // namespace ui 564 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | ui/compositor/compositor_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698