Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(120)

Side by Side Diff: sky/shell/shell.cc

Issue 891143002: Teach SkyShell how to draw with Ganesh (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Moar comments Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « sky/shell/shell.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "base/threading/thread.h" 9 #include "base/threading/thread.h"
10 #include "sky/shell/sky_view.h" 10 #include "sky/shell/sky_view.h"
11 11
12 namespace sky { 12 namespace sky {
13 namespace shell { 13 namespace shell {
14 14
15 Shell::Shell(scoped_refptr<base::SingleThreadTaskRunner> java_task_runner) 15 Shell::Shell(scoped_refptr<base::SingleThreadTaskRunner> java_task_runner)
16 : java_task_runner_(java_task_runner) { 16 : java_task_runner_(java_task_runner) {
17 } 17 }
18 18
19 Shell::~Shell() { 19 Shell::~Shell() {
20 } 20 }
21 21
22 void Shell::Init() { 22 void Shell::Init() {
23 gpu_thread_.reset(new base::Thread("gpu_thread")); 23 gpu_thread_.reset(new base::Thread("gpu_thread"));
24 gpu_thread_->Start(); 24 gpu_thread_->Start();
25 gpu_driver_.reset(new GPUDriver()); 25 rasterizer_.reset(new Rasterizer());
26 26
27 view_.reset(new SkyView(this)); 27 view_.reset(new SkyView(this));
28 view_->Init(); 28 view_->Init();
29 } 29 }
30 30
31 void Shell::OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) { 31 void Shell::OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) {
32 gpu_thread_->message_loop()->PostTask( 32 gpu_thread_->message_loop()->PostTask(
33 FROM_HERE, 33 FROM_HERE,
34 base::Bind(&GPUDriver::Init, gpu_driver_->GetWeakPtr(), widget)); 34 base::Bind(&Rasterizer::Init, rasterizer_->GetWeakPtr(), widget));
35 } 35 }
36 36
37 void Shell::OnDestroyed() { 37 void Shell::OnDestroyed() {
38 } 38 }
39 39
40 } // namespace shell 40 } // namespace shell
41 } // namespace sky 41 } // namespace sky
OLDNEW
« no previous file with comments | « sky/shell/shell.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698