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

Side by Side Diff: sky/shell/gpu_driver.h

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 #ifndef SKY_SHELL_GPU_DRIVER_H_
6 #define SKY_SHELL_GPU_DRIVER_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/weak_ptr.h"
10 #include "ui/gfx/native_widget_types.h"
11
12 namespace gfx {
13 class GLContext;
14 class GLShareGroup;
15 class GLSurface;
16 }
17
18 namespace sky {
19 namespace shell {
20
21 class GPUDriver {
22 public:
23 explicit GPUDriver();
24 ~GPUDriver();
25
26 base::WeakPtr<GPUDriver> GetWeakPtr();
27
28 void Init(gfx::AcceleratedWidget widget);
29
30 private:
31 scoped_refptr<gfx::GLShareGroup> share_group_;
32 scoped_refptr<gfx::GLSurface> surface_;
33 scoped_refptr<gfx::GLContext> context_;
34
35 base::WeakPtrFactory<GPUDriver> weak_factory_;
36
37 DISALLOW_COPY_AND_ASSIGN(GPUDriver);
38 };
39
40 } // namespace shell
41 } // namespace sky
42
43 #endif // SKY_SHELL_GPU_DRIVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698