OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "sky/shell/shell.h" | 5 #include "sky/shell/shell.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/single_thread_task_runner.h" | 8 #include "base/single_thread_task_runner.h" |
9 #include "mojo/common/message_pump_mojo.h" | 9 #include "mojo/common/message_pump_mojo.h" |
10 #include "mojo/edk/embedder/embedder.h" | 10 #include "mojo/edk/embedder/embedder.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 config.gpu_task_runner = gpu_thread_->message_loop()->task_runner(); | 68 config.gpu_task_runner = gpu_thread_->message_loop()->task_runner(); |
69 config.gpu_delegate = rasterizer_->GetWeakPtr(); | 69 config.gpu_delegate = rasterizer_->GetWeakPtr(); |
70 engine_.reset(new Engine(config)); | 70 engine_.reset(new Engine(config)); |
71 | 71 |
72 ui_thread_->message_loop()->PostTask( | 72 ui_thread_->message_loop()->PostTask( |
73 FROM_HERE, base::Bind(&Engine::Init, engine_->GetWeakPtr())); | 73 FROM_HERE, base::Bind(&Engine::Init, engine_->GetWeakPtr())); |
74 } | 74 } |
75 | 75 |
76 void Shell::InitView() { | 76 void Shell::InitView() { |
77 PlatformView::Config config; | 77 PlatformView::Config config; |
78 config.gpu_task_runner = gpu_thread_->message_loop()->task_runner(); | |
79 config.gpu_delegate = rasterizer_->GetWeakPtr(); | |
80 config.ui_task_runner = ui_thread_->message_loop()->task_runner(); | 78 config.ui_task_runner = ui_thread_->message_loop()->task_runner(); |
81 config.ui_delegate = engine_->GetWeakPtr(); | 79 config.ui_delegate = engine_->GetWeakPtr(); |
82 view_.reset(new PlatformView(config)); | 80 view_.reset(new PlatformView(config)); |
83 } | 81 } |
84 | 82 |
85 } // namespace shell | 83 } // namespace shell |
86 } // namespace sky | 84 } // namespace sky |
OLD | NEW |