OLD | NEW |
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 560 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
571 | 571 |
572 WebKit::WebCompositorSupport* compositor_support = | 572 WebKit::WebCompositorSupport* compositor_support = |
573 WebKit::Platform::current()->compositorSupport(); | 573 WebKit::Platform::current()->compositorSupport(); |
574 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 574 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
575 compositor_support->setAcceleratedAnimationEnabled( | 575 compositor_support->setAcceleratedAnimationEnabled( |
576 !command_line.HasSwitch(switches::kDisableThreadedAnimation)); | 576 !command_line.HasSwitch(switches::kDisableThreadedAnimation)); |
577 compositor_support->setPerTilePaintingEnabled( | 577 compositor_support->setPerTilePaintingEnabled( |
578 command_line.HasSwitch(switches::kEnablePerTilePainting)); | 578 command_line.HasSwitch(switches::kEnablePerTilePainting)); |
579 compositor_support->setPartialSwapEnabled( | 579 compositor_support->setPartialSwapEnabled( |
580 command_line.HasSwitch(switches::kEnablePartialSwap)); | 580 command_line.HasSwitch(switches::kEnablePartialSwap)); |
| 581 compositor_support->setPageScalePinchZoomEnabled( |
| 582 command_line.HasSwitch(switches::kEnablePinchInCompositor)); |
581 | 583 |
582 // TODO(fsamuel): Guests don't currently support threaded compositing. | 584 // TODO(fsamuel): Guests don't currently support threaded compositing. |
583 // This should go away with the new design of the browser plugin. | 585 // This should go away with the new design of the browser plugin. |
584 // The new design can be tracked at: http://crbug.com/134492. | 586 // The new design can be tracked at: http://crbug.com/134492. |
585 bool is_guest = CommandLine::ForCurrentProcess()->HasSwitch( | 587 bool is_guest = CommandLine::ForCurrentProcess()->HasSwitch( |
586 switches::kGuestRenderer); | 588 switches::kGuestRenderer); |
587 bool enable = content::IsThreadedCompositingEnabled() && !is_guest; | 589 bool enable = content::IsThreadedCompositingEnabled() && !is_guest; |
588 if (enable) { | 590 if (enable) { |
589 compositor_thread_.reset(new CompositorThread(this)); | 591 compositor_thread_.reset(new CompositorThread(this)); |
590 AddFilter(compositor_thread_->GetMessageFilter()); | 592 AddFilter(compositor_thread_->GetMessageFilter()); |
(...skipping 555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1146 | 1148 |
1147 scoped_refptr<base::MessageLoopProxy> | 1149 scoped_refptr<base::MessageLoopProxy> |
1148 RenderThreadImpl::GetFileThreadMessageLoopProxy() { | 1150 RenderThreadImpl::GetFileThreadMessageLoopProxy() { |
1149 DCHECK(message_loop() == MessageLoop::current()); | 1151 DCHECK(message_loop() == MessageLoop::current()); |
1150 if (!file_thread_.get()) { | 1152 if (!file_thread_.get()) { |
1151 file_thread_.reset(new base::Thread("Renderer::FILE")); | 1153 file_thread_.reset(new base::Thread("Renderer::FILE")); |
1152 file_thread_->Start(); | 1154 file_thread_->Start(); |
1153 } | 1155 } |
1154 return file_thread_->message_loop_proxy(); | 1156 return file_thread_->message_loop_proxy(); |
1155 } | 1157 } |
OLD | NEW |