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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 11186039: Move CC switches to cc/switches.h. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update login_utils Created 8 years, 2 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
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 "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 552 matching lines...) Expand 10 before | Expand all | Expand 10 after
563 void RenderThreadImpl::EnsureWebKitInitialized() { 563 void RenderThreadImpl::EnsureWebKitInitialized() {
564 if (webkit_platform_support_.get()) 564 if (webkit_platform_support_.get())
565 return; 565 return;
566 566
567 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); 567 webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl);
568 WebKit::initialize(webkit_platform_support_.get()); 568 WebKit::initialize(webkit_platform_support_.get());
569 569
570 WebKit::WebCompositorSupport* compositor_support = 570 WebKit::WebCompositorSupport* compositor_support =
571 WebKit::Platform::current()->compositorSupport(); 571 WebKit::Platform::current()->compositorSupport();
572 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); 572 const CommandLine& command_line = *CommandLine::ForCurrentProcess();
573 compositor_support->setAcceleratedAnimationEnabled(
574 !command_line.HasSwitch(switches::kDisableThreadedAnimation));
575 compositor_support->setPerTilePaintingEnabled(
576 command_line.HasSwitch(switches::kEnablePerTilePainting));
577 compositor_support->setPartialSwapEnabled(
578 command_line.HasSwitch(switches::kEnablePartialSwap));
579 compositor_support->setPageScalePinchZoomEnabled(
580 command_line.HasSwitch(switches::kEnablePinchInCompositor));
581 573
582 // TODO(fsamuel): Guests don't currently support threaded compositing. 574 // TODO(fsamuel): Guests don't currently support threaded compositing.
583 // This should go away with the new design of the browser plugin. 575 // This should go away with the new design of the browser plugin.
584 // The new design can be tracked at: http://crbug.com/134492. 576 // The new design can be tracked at: http://crbug.com/134492.
585 bool is_guest = CommandLine::ForCurrentProcess()->HasSwitch( 577 bool is_guest = CommandLine::ForCurrentProcess()->HasSwitch(
586 switches::kGuestRenderer); 578 switches::kGuestRenderer);
587 bool enable = content::IsThreadedCompositingEnabled() && !is_guest; 579 bool enable = content::IsThreadedCompositingEnabled() && !is_guest;
588 if (enable) { 580 if (enable) {
589 compositor_thread_.reset(new CompositorThread(this)); 581 compositor_thread_.reset(new CompositorThread(this));
590 AddFilter(compositor_thread_->GetMessageFilter()); 582 AddFilter(compositor_thread_->GetMessageFilter());
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 1143
1152 scoped_refptr<base::MessageLoopProxy> 1144 scoped_refptr<base::MessageLoopProxy>
1153 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 1145 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
1154 DCHECK(message_loop() == MessageLoop::current()); 1146 DCHECK(message_loop() == MessageLoop::current());
1155 if (!file_thread_.get()) { 1147 if (!file_thread_.get()) {
1156 file_thread_.reset(new base::Thread("Renderer::FILE")); 1148 file_thread_.reset(new base::Thread("Renderer::FILE"));
1157 file_thread_->Start(); 1149 file_thread_->Start();
1158 } 1150 }
1159 return file_thread_->message_loop_proxy(); 1151 return file_thread_->message_loop_proxy();
1160 } 1152 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698