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

Side by Side Diff: ui/gl/gl_surface_glx.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/gl/gl_surface_egl.cc ('k') | ui/gl/gl_surface_glx.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 (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 #ifndef UI_GFX_GL_GL_SURFACE_GLX_H_ 5 #ifndef UI_GL_GL_SURFACE_GLX_H_
6 #define UI_GFX_GL_GL_SURFACE_GLX_H_ 6 #define UI_GL_GL_SURFACE_GLX_H_
7 7 #pragma once
8 #include "ui/gfx/gl/gl_surface.h"
9 8
10 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
11 #include "ui/base/x/x11_util.h" 10 #include "ui/base/x/x11_util.h"
12 #include "ui/gfx/gl/gl_export.h"
13 #include "ui/gfx/native_widget_types.h" 11 #include "ui/gfx/native_widget_types.h"
14 #include "ui/gfx/size.h" 12 #include "ui/gfx/size.h"
13 #include "ui/gl/gl_export.h"
14 #include "ui/gl/gl_surface.h"
15 15
16 namespace gfx { 16 namespace gfx {
17 17
18 // Base class for GLX surfaces. 18 // Base class for GLX surfaces.
19 class GL_EXPORT GLSurfaceGLX : public GLSurface { 19 class GL_EXPORT GLSurfaceGLX : public GLSurface {
20 public: 20 public:
21 GLSurfaceGLX(); 21 GLSurfaceGLX();
22 virtual ~GLSurfaceGLX(); 22 virtual ~GLSurfaceGLX();
23 23
24 static bool InitializeOneOff(); 24 static bool InitializeOneOff();
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE; 59 virtual bool PostSubBuffer(int x, int y, int width, int height) OVERRIDE;
60 60
61 protected: 61 protected:
62 NativeViewGLSurfaceGLX(); 62 NativeViewGLSurfaceGLX();
63 63
64 gfx::AcceleratedWidget window_; 64 gfx::AcceleratedWidget window_;
65 65
66 private: 66 private:
67 void* config_; 67 void* config_;
68 gfx::Size size_; 68 gfx::Size size_;
69
69 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceGLX); 70 DISALLOW_COPY_AND_ASSIGN(NativeViewGLSurfaceGLX);
70 }; 71 };
71 72
72 // A surface used to render to an offscreen pbuffer. 73 // A surface used to render to an offscreen pbuffer.
73 class GL_EXPORT PbufferGLSurfaceGLX : public GLSurfaceGLX { 74 class GL_EXPORT PbufferGLSurfaceGLX : public GLSurfaceGLX {
74 public: 75 public:
75 explicit PbufferGLSurfaceGLX(const gfx::Size& size); 76 explicit PbufferGLSurfaceGLX(const gfx::Size& size);
76 virtual ~PbufferGLSurfaceGLX(); 77 virtual ~PbufferGLSurfaceGLX();
77 78
78 // Implement GLSurfaceGLX. 79 // Implement GLSurfaceGLX.
79 virtual bool Initialize() OVERRIDE; 80 virtual bool Initialize() OVERRIDE;
80 virtual void Destroy() OVERRIDE; 81 virtual void Destroy() OVERRIDE;
81 virtual bool IsOffscreen() OVERRIDE; 82 virtual bool IsOffscreen() OVERRIDE;
82 virtual bool SwapBuffers() OVERRIDE; 83 virtual bool SwapBuffers() OVERRIDE;
83 virtual gfx::Size GetSize() OVERRIDE; 84 virtual gfx::Size GetSize() OVERRIDE;
84 virtual void* GetHandle() OVERRIDE; 85 virtual void* GetHandle() OVERRIDE;
85 virtual void* GetConfig() OVERRIDE; 86 virtual void* GetConfig() OVERRIDE;
86 87
87 private: 88 private:
88 gfx::Size size_; 89 gfx::Size size_;
89 void* config_; 90 void* config_;
90 XID pbuffer_; 91 XID pbuffer_;
92
91 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX); 93 DISALLOW_COPY_AND_ASSIGN(PbufferGLSurfaceGLX);
92 }; 94 };
93 95
94 } // namespace gfx 96 } // namespace gfx
95 97
96 #endif // UI_GFX_GL_GL_SURFACE_GLX_H_ 98 #endif // UI_GL_GL_SURFACE_GLX_H_
OLDNEW
« no previous file with comments | « ui/gl/gl_surface_egl.cc ('k') | ui/gl/gl_surface_glx.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698