| OLD | NEW |
| 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 extern "C" { | 5 extern "C" { |
| 6 #include <X11/Xlib.h> | 6 #include <X11/Xlib.h> |
| 7 } | 7 } |
| 8 | 8 |
| 9 #include "ui/gl/gl_surface_glx.h" | 9 #include "ui/gl/gl_surface_glx.h" |
| 10 | 10 |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 HasGLXExtension("GLX_ARB_create_context_robustness"); | 341 HasGLXExtension("GLX_ARB_create_context_robustness"); |
| 342 g_glx_texture_from_pixmap_supported = | 342 g_glx_texture_from_pixmap_supported = |
| 343 HasGLXExtension("GLX_EXT_texture_from_pixmap"); | 343 HasGLXExtension("GLX_EXT_texture_from_pixmap"); |
| 344 g_glx_oml_sync_control_supported = | 344 g_glx_oml_sync_control_supported = |
| 345 HasGLXExtension("GLX_OML_sync_control"); | 345 HasGLXExtension("GLX_OML_sync_control"); |
| 346 g_glx_get_msc_rate_oml_supported = g_glx_oml_sync_control_supported; | 346 g_glx_get_msc_rate_oml_supported = g_glx_oml_sync_control_supported; |
| 347 g_glx_sgi_video_sync_supported = | 347 g_glx_sgi_video_sync_supported = |
| 348 HasGLXExtension("GLX_SGI_video_sync"); | 348 HasGLXExtension("GLX_SGI_video_sync"); |
| 349 | 349 |
| 350 if (!g_glx_get_msc_rate_oml_supported && g_glx_sgi_video_sync_supported) | 350 if (!g_glx_get_msc_rate_oml_supported && g_glx_sgi_video_sync_supported) |
| 351 SGIVideoSyncProviderThreadShim::display_ = XOpenDisplay(NULL); | 351 SGIVideoSyncProviderThreadShim::display_ = gfx::OpenNewXDisplay(); |
| 352 | 352 |
| 353 initialized = true; | 353 initialized = true; |
| 354 return true; | 354 return true; |
| 355 } | 355 } |
| 356 | 356 |
| 357 // static | 357 // static |
| 358 const char* GLSurfaceGLX::GetGLXExtensions() { | 358 const char* GLSurfaceGLX::GetGLXExtensions() { |
| 359 return g_glx_extensions; | 359 return g_glx_extensions; |
| 360 } | 360 } |
| 361 | 361 |
| (...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 661 | 661 |
| 662 void* PbufferGLSurfaceGLX::GetConfig() { | 662 void* PbufferGLSurfaceGLX::GetConfig() { |
| 663 return config_; | 663 return config_; |
| 664 } | 664 } |
| 665 | 665 |
| 666 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { | 666 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { |
| 667 Destroy(); | 667 Destroy(); |
| 668 } | 668 } |
| 669 | 669 |
| 670 } // namespace gfx | 670 } // namespace gfx |
| OLD | NEW |