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 #include <X11/Xatom.h> | 7 #include <X11/Xatom.h> |
8 } | 8 } |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 Destroy(); | 263 Destroy(); |
264 } | 264 } |
265 | 265 |
266 bool PbufferGLSurfaceGLX::Initialize() { | 266 bool PbufferGLSurfaceGLX::Initialize() { |
267 DCHECK(!pbuffer_); | 267 DCHECK(!pbuffer_); |
268 | 268 |
269 static const int config_attributes[] = { | 269 static const int config_attributes[] = { |
270 GLX_BUFFER_SIZE, 32, | 270 GLX_BUFFER_SIZE, 32, |
271 GLX_ALPHA_SIZE, 8, | 271 GLX_ALPHA_SIZE, 8, |
272 GLX_BLUE_SIZE, 8, | 272 GLX_BLUE_SIZE, 8, |
| 273 GLX_GREEN_SIZE, 8, |
273 GLX_RED_SIZE, 8, | 274 GLX_RED_SIZE, 8, |
274 GLX_DEPTH_SIZE, 16, // TODO(apatrick): support optional depth buffer | 275 GLX_DEPTH_SIZE, 16, // TODO(apatrick): support optional depth buffer |
275 GLX_STENCIL_SIZE, 8, | 276 GLX_STENCIL_SIZE, 8, |
276 GLX_RENDER_TYPE, GLX_RGBA_BIT, | 277 GLX_RENDER_TYPE, GLX_RGBA_BIT, |
277 GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT, | 278 GLX_DRAWABLE_TYPE, GLX_PBUFFER_BIT, |
278 GLX_DOUBLEBUFFER, False, | 279 GLX_DOUBLEBUFFER, False, |
279 0 | 280 0 |
280 }; | 281 }; |
281 | 282 |
282 int num_elements = 0; | 283 int num_elements = 0; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 | 338 |
338 void* PbufferGLSurfaceGLX::GetHandle() { | 339 void* PbufferGLSurfaceGLX::GetHandle() { |
339 return reinterpret_cast<void*>(pbuffer_); | 340 return reinterpret_cast<void*>(pbuffer_); |
340 } | 341 } |
341 | 342 |
342 void* PbufferGLSurfaceGLX::GetConfig() { | 343 void* PbufferGLSurfaceGLX::GetConfig() { |
343 return config_; | 344 return config_; |
344 } | 345 } |
345 | 346 |
346 } // namespace gfx | 347 } // namespace gfx |
OLD | NEW |