Commit 12eb990f authored by vollick's avatar vollick Committed by Commit bot

Partial revert of 'Refactor CompositorWorkerManager'

This is a partial revert of:
https://codereview.chromium.org/1449953002

Most of that CL is inactive code, but it did change the way the
compositor thread was created. Instead of a base::Thread, I'd used a
WebThreadImplForWorkerScheduler and this seems to have had some
performance impact. While I try to figure out why, this CL should get
us back to our prior performance.

BUG=565789

Review URL: https://codereview.chromium.org/1550093002

Cr-Commit-Position: refs/heads/master@{#367051}
parent a3c693e2
...@@ -1150,18 +1150,18 @@ void RenderThreadImpl::InitializeCompositorThread() { ...@@ -1150,18 +1150,18 @@ void RenderThreadImpl::InitializeCompositorThread() {
} }
#endif #endif
if (!compositor_task_runner_.get()) { if (!compositor_task_runner_.get()) {
base::Thread::Options options;
compositor_thread_.reset(new base::Thread("Compositor"));
base::Thread::Options compositor_thread_options;
#if defined(OS_ANDROID) #if defined(OS_ANDROID)
options.priority = base::ThreadPriority::DISPLAY; compositor_thread_options.priority = base::ThreadPriority::DISPLAY;
#endif #endif
compositor_thread_ = compositor_thread_->StartWithOptions(compositor_thread_options);
blink_platform_impl_->createThreadWithOptions("Compositor", options); compositor_task_runner_ = compositor_thread_->task_runner();
compositor_task_runner_ = compositor_thread_->TaskRunner();
compositor_task_runner_->PostTask( compositor_task_runner_->PostTask(
FROM_HERE, FROM_HERE,
base::Bind(base::IgnoreResult(&ThreadRestrictions::SetIOAllowed), base::Bind(base::IgnoreResult(&ThreadRestrictions::SetIOAllowed),
false)); false));
blink_platform_impl_->set_compositor_thread(compositor_thread_.get());
} }
InputHandlerManagerClient* input_handler_manager_client = NULL; InputHandlerManagerClient* input_handler_manager_client = NULL;
......
...@@ -600,7 +600,7 @@ class CONTENT_EXPORT RenderThreadImpl ...@@ -600,7 +600,7 @@ class CONTENT_EXPORT RenderThreadImpl
scoped_ptr<base::Thread> file_thread_; scoped_ptr<base::Thread> file_thread_;
// May be null if overridden by ContentRendererClient. // May be null if overridden by ContentRendererClient.
scoped_ptr<scheduler::WebThreadBase> compositor_thread_; scoped_ptr<base::Thread> compositor_thread_;
// Utility class to provide GPU functionalities to media. // Utility class to provide GPU functionalities to media.
scoped_ptr<content::RendererGpuVideoAcceleratorFactories> gpu_factories_; scoped_ptr<content::RendererGpuVideoAcceleratorFactories> gpu_factories_;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment