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

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

Issue 890803004: SkyShell should be able to draw a green square with GL (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "sky/shell/shell.h"
6
7 #include "base/bind.h"
8 #include "base/single_thread_task_runner.h"
9 #include "base/threading/thread.h"
10 #include "sky/shell/sky_view.h"
11
12 namespace sky {
13 namespace shell {
14
15 Shell::Shell(scoped_refptr<base::SingleThreadTaskRunner> java_task_runner)
16 : java_task_runner_(java_task_runner) {
17 }
18
19 Shell::~Shell() {
20 }
21
22 void Shell::Init() {
23 gpu_thread_.reset(new base::Thread("gpu_thread"));
24 gpu_thread_->Start();
25 gpu_driver_.reset(new GPUDriver());
26
27 view_.reset(new SkyView(this));
28 view_->Init();
29 }
30
31 void Shell::OnAcceleratedWidgetAvailable(gfx::AcceleratedWidget widget) {
32 gpu_thread_->message_loop()->PostTask(
33 FROM_HERE,
34 base::Bind(&GPUDriver::Init, gpu_driver_->GetWeakPtr(), widget));
35 }
36
37 void Shell::OnDestroyed() {
38 }
39
40 } // namespace shell
41 } // namespace sky
OLDNEW
« sky/shell/library_loader.cc ('K') | « sky/shell/shell.h ('k') | sky/shell/sky_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698