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

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: Switch ui/compositor back to using compositorSupport() 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
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/render_view_impl.cc » ('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 "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 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
1162 1154
1163 scoped_refptr<base::MessageLoopProxy> 1155 scoped_refptr<base::MessageLoopProxy>
1164 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 1156 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
1165 DCHECK(message_loop() == MessageLoop::current()); 1157 DCHECK(message_loop() == MessageLoop::current());
1166 if (!file_thread_.get()) { 1158 if (!file_thread_.get()) {
1167 file_thread_.reset(new base::Thread("Renderer::FILE")); 1159 file_thread_.reset(new base::Thread("Renderer::FILE"));
1168 file_thread_->Start(); 1160 file_thread_->Start();
1169 } 1161 }
1170 return file_thread_->message_loop_proxy(); 1162 return file_thread_->message_loop_proxy();
1171 } 1163 }
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/render_view_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698