OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "ui/gfx/gl/gl_surface_nsview.h" | 5 #include "ui/gl/gl_surface_nsview.h" |
6 | 6 |
7 #import <AppKit/NSOpenGL.h> | 7 #import <AppKit/NSOpenGL.h> |
8 #import <AppKit/NSView.h> | 8 #import <AppKit/NSView.h> |
9 | 9 |
10 #include "ui/gfx/gl/gl_context_nsview.h" | 10 #include "ui/gl/gl_context_nsview.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 | 13 |
14 GLSurfaceNSView::GLSurfaceNSView(AcceleratedWidget view) | 14 GLSurfaceNSView::GLSurfaceNSView(AcceleratedWidget view) |
15 : view_(view), | 15 : view_(view), |
16 context_(NULL) { | 16 context_(NULL) { |
17 } | 17 } |
18 | 18 |
19 GLSurfaceNSView::~GLSurfaceNSView() { | 19 GLSurfaceNSView::~GLSurfaceNSView() { |
20 } | 20 } |
(...skipping 17 matching lines...) Expand all Loading... |
38 void* GLSurfaceNSView::GetHandle() { | 38 void* GLSurfaceNSView::GetHandle() { |
39 return view_; | 39 return view_; |
40 } | 40 } |
41 | 41 |
42 bool GLSurfaceNSView::OnMakeCurrent(GLContext* context) { | 42 bool GLSurfaceNSView::OnMakeCurrent(GLContext* context) { |
43 context_ = static_cast<GLContextNSView *>(context); | 43 context_ = static_cast<GLContextNSView *>(context); |
44 return true; | 44 return true; |
45 } | 45 } |
46 | 46 |
47 } // namespace gfx | 47 } // namespace gfx |
OLD | NEW |