| 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 #include "ui/gl/gl_surface_glx.h" | 5 #include "ui/gl/gl_surface_glx.h" |
| 6 | 6 |
| 7 extern "C" { | 7 extern "C" { |
| 8 #include <X11/Xlib.h> | 8 #include <X11/Xlib.h> |
| 9 } | 9 } |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 364 static bool initialized = false; | 364 static bool initialized = false; |
| 365 if (initialized) | 365 if (initialized) |
| 366 return true; | 366 return true; |
| 367 | 367 |
| 368 // http://crbug.com/245466 | 368 // http://crbug.com/245466 |
| 369 setenv("force_s3tc_enable", "true", 1); | 369 setenv("force_s3tc_enable", "true", 1); |
| 370 | 370 |
| 371 // SGIVideoSyncProviderShim (if instantiated) will issue X commands on | 371 // SGIVideoSyncProviderShim (if instantiated) will issue X commands on |
| 372 // it's own thread. | 372 // it's own thread. |
| 373 gfx::InitializeThreadedX11(); | 373 gfx::InitializeThreadedX11(); |
| 374 LOG(ERROR) << "Called XInitThreads " << getpid(); |
| 374 g_display = gfx::GetXDisplay(); | 375 g_display = gfx::GetXDisplay(); |
| 375 | 376 |
| 376 if (!g_display) { | 377 if (!g_display) { |
| 377 LOG(ERROR) << "XOpenDisplay failed."; | 378 LOG(ERROR) << "XOpenDisplay failed."; |
| 378 return false; | 379 return false; |
| 379 } | 380 } |
| 380 | 381 |
| 381 int major, minor; | 382 int major, minor; |
| 382 if (!glXQueryVersion(g_display, &major, &minor)) { | 383 if (!glXQueryVersion(g_display, &major, &minor)) { |
| 383 LOG(ERROR) << "glxQueryVersion failed"; | 384 LOG(ERROR) << "glxQueryVersion failed"; |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 655 if (!config_) | 656 if (!config_) |
| 656 config_ = GetConfigForWindow(g_display, window_); | 657 config_ = GetConfigForWindow(g_display, window_); |
| 657 return config_; | 658 return config_; |
| 658 } | 659 } |
| 659 | 660 |
| 660 UnmappedNativeViewGLSurfaceGLX::~UnmappedNativeViewGLSurfaceGLX() { | 661 UnmappedNativeViewGLSurfaceGLX::~UnmappedNativeViewGLSurfaceGLX() { |
| 661 Destroy(); | 662 Destroy(); |
| 662 } | 663 } |
| 663 | 664 |
| 664 } // namespace gl | 665 } // namespace gl |
| OLD | NEW |