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

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

Issue 8486020: compositor_unittests target is unimplmented on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase and nit. 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_SURFACE_NSVIEW_H_
6 #define UI_GFX_GL_GL_SURFACE_NSVIEW_H_
7
8 #include "base/compiler_specific.h"
9 #include "ui/gfx/gl/gl_surface.h"
10 #include "ui/gfx/size.h"
11
12 namespace gfx {
13
14 class GLContextNSView;
15
16 // GLSurfaceNSView provides an implementation of the the GLSurface interface
17 // that is backed by an NSView. This interface pairs with the GLContextNSView
18 // class, and the NSView is expected to use this context for drawing.
19 class GLSurfaceNSView : public GLSurface {
20 public:
21 explicit GLSurfaceNSView(PluginWindowHandle view);
22 virtual ~GLSurfaceNSView();
23
24 // GLSurface:
25 virtual void Destroy() OVERRIDE;
26 virtual bool IsOffscreen() OVERRIDE;
27 virtual bool SwapBuffers() OVERRIDE;
28 virtual gfx::Size GetSize() OVERRIDE;
29 virtual void* GetHandle() OVERRIDE;
apatrick_chromium 2011/11/21 23:34:45 It would be safer to implement OnMakeCurrent here
30
31 // Allow the surface to call back to context when in need of |FlushBuffer|.
32 void SetGLContext(GLContextNSView* context);
33
34 private:
35 // Weak. An |NSView*|.
36 PluginWindowHandle view_;
37
38 // Weak. Associated context.
39 GLContextNSView* context_;
40
41 DISALLOW_COPY_AND_ASSIGN(GLSurfaceNSView);
42 };
43
44 } // namespace gfx
45
46 #endif // UI_GFX_GL_GL_SURFACE_NSVIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698