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

Side by Side Diff: sky/shell/gpu/ganesh_context.h

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/BUILD.gn ('k') | sky/shell/gpu/ganesh_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_GANESH_CONTEXT_H_
6 #define SKY_SHELL_GPU_GANESH_CONTEXT_H_
7
8 #include "base/basictypes.h"
9 #include "base/memory/ref_counted.h"
10 #include "skia/ext/refptr.h"
11 #include "third_party/skia/include/gpu/GrContext.h"
12 #include "ui/gl/gl_context.h"
13
14 namespace sky {
15 namespace shell {
16
17 // GaneshContext holds the top-level context object for Ganesh (known as
18 // GrContext). We construct the GrContext using the OpenGL interface provided by
19 // gfx::GLContext.
20 class GaneshContext {
21 public:
22 explicit GaneshContext(scoped_refptr<gfx::GLContext> gl_context);
23 ~GaneshContext();
24
25 GrContext* gr() const { return gr_context_.get(); }
26
27 private:
28 scoped_refptr<gfx::GLContext> gl_context_;
29 skia::RefPtr<GrContext> gr_context_;
30
31 DISALLOW_COPY_AND_ASSIGN(GaneshContext);
32 };
33
34 } // namespace shell
35 } // namespace sky
36
37 #endif // SKY_SHELL_GPU_GANESH_CONTEXT_H_
OLDNEW
« no previous file with comments | « sky/shell/BUILD.gn ('k') | sky/shell/gpu/ganesh_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698