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

Side by Side Diff: mojo/gpu/gl_context_owner.h

Issue 1532923003: Improve GL helpers. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-7
Patch Set: rebase Created 4 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 | « mojo/gpu/gl_context.cc ('k') | mojo/gpu/gl_context_owner.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #ifndef MOJO_GPU_GL_CONTEXT_OWNER_H_ 5 #ifndef MOJO_GPU_GL_CONTEXT_OWNER_H_
6 #define MOJO_GPU_GL_CONTEXT_OWNER_H_ 6 #define MOJO_GPU_GL_CONTEXT_OWNER_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 9
10 namespace mojo { 10 namespace mojo {
11 class GLContext; 11 class GLContext;
12 class ApplicationConnector;
12 class Shell; 13 class Shell;
13 14
14 class GLContextOwner { 15 class GLContextOwner {
15 public: 16 public:
16 explicit GLContextOwner(mojo::Shell* shell); 17 explicit GLContextOwner(ApplicationConnector* connector);
18
17 ~GLContextOwner(); 19 ~GLContextOwner();
18 20
19 const base::WeakPtr<mojo::GLContext>& context() const { return context_; } 21 const base::WeakPtr<mojo::GLContext>& context() const { return context_; }
20 22
21 private: 23 private:
22 base::WeakPtr<mojo::GLContext> context_; 24 base::WeakPtr<mojo::GLContext> context_;
23 25
24 DISALLOW_COPY_AND_ASSIGN(GLContextOwner); 26 DISALLOW_COPY_AND_ASSIGN(GLContextOwner);
25 }; 27 };
26 28
27 } // namespace mojo 29 } // namespace mojo
28 30
29 #endif // MOJO_GPU_GL_CONTEXT_OWNER_H_ 31 #endif // MOJO_GPU_GL_CONTEXT_OWNER_H_
OLDNEW
« no previous file with comments | « mojo/gpu/gl_context.cc ('k') | mojo/gpu/gl_context_owner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698