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

Side by Side Diff: ui/gfx/gl/gl_context_nsview.h

Issue 8486020: compositor_unittests target is unimplmented on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address piman's comments (#6) Created 9 years, 1 month 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 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 UI_GFX_GL_GL_CONTEXT_NSVIEW_H_
6 #define UI_GFX_GL_GL_CONTEXT_NSVIEW_H_
7 #pragma once
8
9 #include <OpenGL/CGLTypes.h>
10
11 #include "base/compiler_specific.h"
12 #include "base/memory/scoped_nsobject.h"
13 #include "ui/gfx/gl/gl_context.h"
14
15 #if defined(__OBJC__)
16 @class NSOpenGLContext;
17 @class NSOpenGLPixelFormat;
18 #else
19 class NSOpenGLContext;
20 class NSOpenGLPixelFormat;
21 #endif
Ken Russell (switch to Gerrit) 2011/11/17 00:14:40 Does this header even work if it's included by a n
dhollowa 2011/11/17 01:41:51 Done. That code was added prior to the .cc -> .mm
22
23 namespace gfx {
24
25 class GLSurface;
26
27 // GLContextNSView encapsulates an NSView-based GLContext. This is paired with
28 // the GLSurfaceNSView class.
29 class GLContextNSView : public GLContext {
30 public:
31 explicit GLContextNSView(GLShareGroup* group);
32 virtual ~GLContextNSView();
33
34 // GLContext:
35 virtual bool Initialize(GLSurface* surface,
36 GpuPreference gpu_preference) OVERRIDE;
37 virtual void Destroy() OVERRIDE;
38 virtual bool MakeCurrent(GLSurface* surface) OVERRIDE;
39 virtual void ReleaseCurrent(GLSurface* surface) OVERRIDE;
40 virtual bool IsCurrent(GLSurface* surface) OVERRIDE;
41 virtual void* GetHandle() OVERRIDE;
42 virtual void SetSwapInterval(int interval) OVERRIDE;
43
44 private:
45 scoped_nsobject<NSOpenGLContext> context_;
46 GpuPreference gpu_preference_;
47
48 DISALLOW_COPY_AND_ASSIGN(GLContextNSView);
49 };
50
51 } // namespace gfx
52
53 #endif // UI_GFX_GL_GL_CONTEXT_NSVIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698