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

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

Issue 10916279: Chromium compositor change implementing page-scale driven pinch-zoom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Rebaselined to 160422. 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 | Annotate | Revision Log
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/render_view_impl.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 "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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after
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( 573 compositor_support->setAcceleratedAnimationEnabled(
574 !command_line.HasSwitch(switches::kDisableThreadedAnimation)); 574 !command_line.HasSwitch(switches::kDisableThreadedAnimation));
575 compositor_support->setPerTilePaintingEnabled( 575 compositor_support->setPerTilePaintingEnabled(
576 command_line.HasSwitch(switches::kEnablePerTilePainting)); 576 command_line.HasSwitch(switches::kEnablePerTilePainting));
577 compositor_support->setPartialSwapEnabled( 577 compositor_support->setPartialSwapEnabled(
578 command_line.HasSwitch(switches::kEnablePartialSwap)); 578 command_line.HasSwitch(switches::kEnablePartialSwap));
579 compositor_support->setPageScalePinchZoomEnabled(
580 command_line.HasSwitch(switches::kEnablePinchInCompositor));
579 581
580 // TODO(fsamuel): Guests don't currently support threaded compositing. 582 // TODO(fsamuel): Guests don't currently support threaded compositing.
581 // This should go away with the new design of the browser plugin. 583 // This should go away with the new design of the browser plugin.
582 // The new design can be tracked at: http://crbug.com/134492. 584 // The new design can be tracked at: http://crbug.com/134492.
583 bool is_guest = CommandLine::ForCurrentProcess()->HasSwitch( 585 bool is_guest = CommandLine::ForCurrentProcess()->HasSwitch(
584 switches::kGuestRenderer); 586 switches::kGuestRenderer);
585 bool enable = content::IsThreadedCompositingEnabled() && !is_guest; 587 bool enable = content::IsThreadedCompositingEnabled() && !is_guest;
586 if (enable) { 588 if (enable) {
587 compositor_thread_.reset(new CompositorThread(this)); 589 compositor_thread_.reset(new CompositorThread(this));
588 AddFilter(compositor_thread_->GetMessageFilter()); 590 AddFilter(compositor_thread_->GetMessageFilter());
(...skipping 559 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 1150
1149 scoped_refptr<base::MessageLoopProxy> 1151 scoped_refptr<base::MessageLoopProxy>
1150 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 1152 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
1151 DCHECK(message_loop() == MessageLoop::current()); 1153 DCHECK(message_loop() == MessageLoop::current());
1152 if (!file_thread_.get()) { 1154 if (!file_thread_.get()) {
1153 file_thread_.reset(new base::Thread("Renderer::FILE")); 1155 file_thread_.reset(new base::Thread("Renderer::FILE"));
1154 file_thread_->Start(); 1156 file_thread_->Start();
1155 } 1157 }
1156 return file_thread_->message_loop_proxy(); 1158 return file_thread_->message_loop_proxy();
1157 } 1159 }
OLDNEW
« no previous file with comments | « content/public/common/content_switches.cc ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698