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

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

Issue 10392068: ui: Move gl/ directory out of gfx/, up to ui/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix mac_rel Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/gl/gl_surface_stub.cc ('k') | ui/gfx/gl/gl_surface_wgl.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 (c) 2012 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_WGL_H_
6 #define UI_GFX_GL_GL_SURFACE_WGL_H_
7
8 #include "ui/gfx/gl/gl_surface.h"
9 #include "ui/gfx/native_widget_types.h"
10
11 namespace gfx {
12
13 // Base interface for WGL surfaces.
14 class GLSurfaceWGL : public GLSurface {
15 public:
16 GLSurfaceWGL();
17 virtual ~GLSurfaceWGL();
18
19 // Implement GLSurface.
20 virtual void* GetDisplay();
21
22 static bool InitializeOneOff();
23 static HDC GetDisplayDC();
24
25 private:
26 DISALLOW_COPY_AND_ASSIGN(GLSurfaceWGL);
27 };
28
29 // A surface used to render to a view.
30 class NativeViewGLSurfaceWGL : public GLSurfaceWGL {
31 public:
32 explicit NativeViewGLSurfaceWGL(gfx::AcceleratedWidget window);
33 virtual ~NativeViewGLSurfaceWGL();
34
35 // Implement GLSurface.
36 virtual bool Initialize();
37 virtual void Destroy();
38 virtual bool IsOffscreen();
39 virtual bool SwapBuffers();
40 virtual gfx::Size GetSize();
41 virtual void* GetHandle();
42
43 private:
44 gfx::AcceleratedWidget window_;
45 gfx::AcceleratedWidget child_window_;
46 HDC device_context_;
47
48 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceWGL);
49 };
50
51
52 // A surface used to render to an offscreen pbuffer.
53 class PbufferGLSurfaceWGL : public GLSurfaceWGL {
54 public:
55 explicit PbufferGLSurfaceWGL(const gfx::Size& size);
56 virtual ~PbufferGLSurfaceWGL();
57
58 // Implement GLSurface.
59 virtual bool Initialize();
60 virtual void Destroy();
61 virtual bool IsOffscreen();
62 virtual bool SwapBuffers();
63 virtual gfx::Size GetSize();
64 virtual void* GetHandle();
65
66 private:
67 gfx::Size size_;
68 HDC device_context_;
69 void* pbuffer_;
70
71 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceWGL);
72 };
73
74 } // namespace gfx
75
76 #endif // UI_GFX_GL_GL_SURFACE_WGL_H_
OLDNEW
« no previous file with comments | « ui/gfx/gl/gl_surface_stub.cc ('k') | ui/gfx/gl/gl_surface_wgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698