OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 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 extern "C" { | 5 extern "C" { |
6 #include <X11/Xlib.h> | 6 #include <X11/Xlib.h> |
7 } | 7 } |
8 | 8 |
9 #include "ui/gfx/gl/gl_surface_glx.h" | 9 #include "ui/gfx/gl/gl_surface_glx.h" |
10 | 10 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 void* NativeViewGLSurfaceGLX::GetHandle() { | 104 void* NativeViewGLSurfaceGLX::GetHandle() { |
105 return reinterpret_cast<void*>(window_); | 105 return reinterpret_cast<void*>(window_); |
106 } | 106 } |
107 | 107 |
108 void* NativeViewGLSurfaceGLX::GetConfig() { | 108 void* NativeViewGLSurfaceGLX::GetConfig() { |
109 return NULL; | 109 return NULL; |
110 } | 110 } |
111 | 111 |
112 PbufferGLSurfaceGLX::PbufferGLSurfaceGLX(const gfx::Size& size) | 112 PbufferGLSurfaceGLX::PbufferGLSurfaceGLX(const gfx::Size& size) |
113 : size_(size), | 113 : size_(size), |
114 pbuffer_(0), | 114 config_(NULL), |
115 config_(NULL) { | 115 pbuffer_(0) { |
116 } | 116 } |
117 | 117 |
118 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { | 118 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { |
119 Destroy(); | 119 Destroy(); |
120 } | 120 } |
121 | 121 |
122 bool PbufferGLSurfaceGLX::Initialize() { | 122 bool PbufferGLSurfaceGLX::Initialize() { |
123 DCHECK(!pbuffer_); | 123 DCHECK(!pbuffer_); |
124 | 124 |
125 static const int config_attributes[] = { | 125 static const int config_attributes[] = { |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 | 194 |
195 void* PbufferGLSurfaceGLX::GetHandle() { | 195 void* PbufferGLSurfaceGLX::GetHandle() { |
196 return reinterpret_cast<void*>(pbuffer_); | 196 return reinterpret_cast<void*>(pbuffer_); |
197 } | 197 } |
198 | 198 |
199 void* PbufferGLSurfaceGLX::GetConfig() { | 199 void* PbufferGLSurfaceGLX::GetConfig() { |
200 return config_; | 200 return config_; |
201 } | 201 } |
202 | 202 |
203 } // namespace gfx | 203 } // namespace gfx |
OLD | NEW |