diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-10 05:19:41 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-10 05:19:41 +0000 |
commit | cd7ce3be4248527ffb12e6549970e22e8d4005f2 (patch) | |
tree | bc4f80ca925ea2c0ae21493f9ae48849cb7a70a6 /content/renderer/render_thread_impl.cc | |
parent | 82952a0b505d54c6b1563a868b0f0186f148b0c1 (diff) | |
download | chromium_src-cd7ce3be4248527ffb12e6549970e22e8d4005f2.zip chromium_src-cd7ce3be4248527ffb12e6549970e22e8d4005f2.tar.gz chromium_src-cd7ce3be4248527ffb12e6549970e22e8d4005f2.tar.bz2 |
Convert RenderThreadImpl compositor initialization to WebCompositorSupport
The static WebCompositor initialization routines are going away.
BUG=
Review URL: https://chromiumcodereview.appspot.com/10908164
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155667 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/renderer/render_thread_impl.cc')
-rw-r--r-- | content/renderer/render_thread_impl.cc | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index da3a5d1..aadcc5b 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -76,7 +76,8 @@ #include "media/base/media.h" #include "net/base/net_errors.h" #include "net/base/net_util.h" -#include "third_party/WebKit/Source/Platform/chromium/public/WebCompositor.h" +#include "third_party/WebKit/Source/Platform/chromium/public/Platform.h" +#include "third_party/WebKit/Source/Platform/chromium/public/WebCompositorSupport.h" #include "third_party/WebKit/Source/Platform/chromium/public/WebString.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebColorName.h" #include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h" @@ -326,13 +327,6 @@ void RenderThreadImpl::Init() { if (command_line.HasSwitch(switches::kEnableGpuBenchmarking)) RegisterExtension(content::GpuBenchmarkingExtension::Get()); - WebKit::WebCompositor::setAcceleratedAnimationEnabled( - !command_line.HasSwitch(switches::kDisableThreadedAnimation)); - WebKit::WebCompositor::setPerTilePaintingEnabled( - command_line.HasSwitch(switches::kEnablePerTilePainting)); - WebKit::WebCompositor::setPartialSwapEnabled( - command_line.HasSwitch(switches::kEnablePartialSwap)); - context_lost_cb_.reset(new GpuVDAContextLostCallback()); // Note that under Linux, the media library will normally already have @@ -378,7 +372,7 @@ RenderThreadImpl::~RenderThreadImpl() { } if (compositor_initialized_) { - WebKit::WebCompositor::shutdown(); + WebKit::Platform::current()->compositorSupport()->shutdown(); compositor_initialized_ = false; } if (compositor_thread_.get()) { @@ -569,6 +563,16 @@ void RenderThreadImpl::EnsureWebKitInitialized() { webkit_platform_support_.reset(new RendererWebKitPlatformSupportImpl); WebKit::initialize(webkit_platform_support_.get()); + WebKit::WebCompositorSupport* compositor_support = + WebKit::Platform::current()->compositorSupport(); + const CommandLine& command_line = *CommandLine::ForCurrentProcess(); + compositor_support->setAcceleratedAnimationEnabled( + !command_line.HasSwitch(switches::kDisableThreadedAnimation)); + compositor_support->setPerTilePaintingEnabled( + command_line.HasSwitch(switches::kEnablePerTilePainting)); + compositor_support->setPartialSwapEnabled( + command_line.HasSwitch(switches::kEnablePartialSwap)); + // TODO(fsamuel): Guests don't currently support threaded compositing. // This should go away with the new design of the browser plugin. // The new design can be tracked at: http://crbug.com/134492. @@ -578,9 +582,9 @@ void RenderThreadImpl::EnsureWebKitInitialized() { if (enable) { compositor_thread_.reset(new CompositorThread(this)); AddFilter(compositor_thread_->GetMessageFilter()); - WebKit::WebCompositor::initialize(compositor_thread_->GetWebThread()); + compositor_support->initialize(compositor_thread_->GetWebThread()); } else { - WebKit::WebCompositor::initialize(NULL); + compositor_support->initialize(NULL); } compositor_initialized_ = true; @@ -596,8 +600,6 @@ void RenderThreadImpl::EnsureWebKitInitialized() { RenderThreadImpl::RegisterSchemes(); - const CommandLine& command_line = *CommandLine::ForCurrentProcess(); - webkit_glue::EnableWebCoreLogChannels( command_line.GetSwitchValueASCII(switches::kWebCoreLogChannels)); |