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 19 matching lines...) Expand all Loading... |
30 public: | 30 public: |
31 void operator()(void* x) const { | 31 void operator()(void* x) const { |
32 ::XFree(x); | 32 ::XFree(x); |
33 } | 33 } |
34 }; | 34 }; |
35 | 35 |
36 Display* g_display; | 36 Display* g_display; |
37 const char* g_glx_extensions = NULL; | 37 const char* g_glx_extensions = NULL; |
38 bool g_glx_create_context_robustness_supported = false; | 38 bool g_glx_create_context_robustness_supported = false; |
39 | 39 |
40 } // namespace anonymous | 40 } // namespace |
41 | 41 |
42 GLSurfaceGLX::GLSurfaceGLX() {} | 42 GLSurfaceGLX::GLSurfaceGLX() {} |
43 | 43 |
44 bool GLSurfaceGLX::InitializeOneOff() { | 44 bool GLSurfaceGLX::InitializeOneOff() { |
45 static bool initialized = false; | 45 static bool initialized = false; |
46 if (initialized) | 46 if (initialized) |
47 return true; | 47 return true; |
48 | 48 |
49 g_display = base::MessagePumpForUI::GetDefaultXDisplay(); | 49 g_display = base::MessagePumpForUI::GetDefaultXDisplay(); |
50 if (!g_display) { | 50 if (!g_display) { |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
318 | 318 |
319 void* PbufferGLSurfaceGLX::GetConfig() { | 319 void* PbufferGLSurfaceGLX::GetConfig() { |
320 return config_; | 320 return config_; |
321 } | 321 } |
322 | 322 |
323 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { | 323 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { |
324 Destroy(); | 324 Destroy(); |
325 } | 325 } |
326 | 326 |
327 } // namespace gfx | 327 } // namespace gfx |
OLD | NEW |