| Index: sky/shell/shell.cc
|
| diff --git a/sky/shell/shell.cc b/sky/shell/shell.cc
|
| index 00f24e27d808a4e53796cbd5fc97d1474f288567..33ad2dfcdb3aaba60f9ed82b51148a8fffe02c24 100644
|
| --- a/sky/shell/shell.cc
|
| +++ b/sky/shell/shell.cc
|
| @@ -9,8 +9,6 @@
|
| #include "mojo/common/message_pump_mojo.h"
|
| #include "mojo/edk/embedder/embedder.h"
|
| #include "mojo/edk/embedder/simple_platform_support.h"
|
| -#include "sky/shell/platform_view.h"
|
| -#include "sky/shell/gpu/rasterizer.h"
|
| #include "sky/shell/ui/engine.h"
|
|
|
| namespace sky {
|
| @@ -34,9 +32,14 @@ Shell::Shell(scoped_ptr<ServiceProviderContext> service_provider_context)
|
| base::Thread::Options options;
|
| options.message_pump_factory = base::Bind(&CreateMessagePumpMojo);
|
|
|
| - InitGPU(options);
|
| - InitUI(options);
|
| - InitView();
|
| + gpu_thread_.reset(new base::Thread("gpu_thread"));
|
| + gpu_thread_->StartWithOptions(options);
|
| +
|
| + ui_thread_.reset(new base::Thread("ui_thread"));
|
| + ui_thread_->StartWithOptions(options);
|
| +
|
| + ui_task_runner()->PostTask(
|
| + FROM_HERE, base::Bind(&Engine::Init, service_provider_context_.get()));
|
| }
|
|
|
| Shell::~Shell() {
|
| @@ -51,33 +54,5 @@ Shell& Shell::Shared() {
|
| return *g_shell;
|
| }
|
|
|
| -void Shell::InitGPU(const base::Thread::Options& options) {
|
| - gpu_thread_.reset(new base::Thread("gpu_thread"));
|
| - gpu_thread_->StartWithOptions(options);
|
| -
|
| - rasterizer_.reset(new Rasterizer());
|
| -}
|
| -
|
| -void Shell::InitUI(const base::Thread::Options& options) {
|
| - ui_thread_.reset(new base::Thread("ui_thread"));
|
| - ui_thread_->StartWithOptions(options);
|
| -
|
| - Engine::Config config;
|
| - config.service_provider_context = service_provider_context_.get();
|
| - config.gpu_task_runner = gpu_thread_->message_loop()->task_runner();
|
| - config.gpu_delegate = rasterizer_->GetWeakPtr();
|
| - engine_.reset(new Engine(config));
|
| -
|
| - ui_thread_->message_loop()->PostTask(
|
| - FROM_HERE, base::Bind(&Engine::Init, engine_->GetWeakPtr()));
|
| -}
|
| -
|
| -void Shell::InitView() {
|
| - PlatformView::Config config;
|
| - config.ui_task_runner = ui_thread_->message_loop()->task_runner();
|
| - config.ui_delegate = engine_->GetWeakPtr();
|
| - view_.reset(new PlatformView(config));
|
| -}
|
| -
|
| } // namespace shell
|
| } // namespace sky
|
|
|