OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/at_exit.h" | 5 #include "base/at_exit.h" |
6 #include "base/command_line.h" | 6 #include "base/command_line.h" |
7 #include "base/memory/scoped_vector.h" | 7 #include "base/memory/scoped_vector.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
10 #include "base/thread_task_runner_handle.h" | 10 #include "base/thread_task_runner_handle.h" |
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 | 192 |
193 RendererFactory::RendererFactory() : type_(SOFTWARE) { | 193 RendererFactory::RendererFactory() : type_(SOFTWARE) { |
194 } | 194 } |
195 | 195 |
196 RendererFactory::~RendererFactory() { | 196 RendererFactory::~RendererFactory() { |
197 } | 197 } |
198 | 198 |
199 bool RendererFactory::Initialize() { | 199 bool RendererFactory::Initialize() { |
200 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); | 200 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); |
201 if (!command_line->HasSwitch(kDisableGpu) && | 201 if (!command_line->HasSwitch(kDisableGpu) && |
202 gfx::GLSurface::InitializeOneOff() && ui_thread_gpu_.Initialize()) { | 202 gfx::GLSurface::InitializeOneOff() && |
| 203 ui_thread_gpu_.Initialize(base::ThreadTaskRunnerHandle::Get(), |
| 204 base::ThreadTaskRunnerHandle::Get())) { |
203 if (command_line->HasSwitch(switches::kOzoneUseSurfaceless)) { | 205 if (command_line->HasSwitch(switches::kOzoneUseSurfaceless)) { |
204 type_ = SURFACELESS_GL; | 206 type_ = SURFACELESS_GL; |
205 } else { | 207 } else { |
206 type_ = GL; | 208 type_ = GL; |
207 } | 209 } |
208 } else { | 210 } else { |
209 type_ = SOFTWARE; | 211 type_ = SOFTWARE; |
210 } | 212 } |
211 | 213 |
212 return true; | 214 return true; |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 ->SetCurrentLayoutByName("us"); | 339 ->SetCurrentLayoutByName("us"); |
338 | 340 |
339 base::RunLoop run_loop; | 341 base::RunLoop run_loop; |
340 | 342 |
341 WindowManager window_manager(run_loop.QuitClosure()); | 343 WindowManager window_manager(run_loop.QuitClosure()); |
342 | 344 |
343 run_loop.Run(); | 345 run_loop.Run(); |
344 | 346 |
345 return 0; | 347 return 0; |
346 } | 348 } |
OLD | NEW |