| 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 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 // it's own thread. | 383 // it's own thread. |
| 384 XInitThreads(); | 384 XInitThreads(); |
| 385 | 385 |
| 386 #if defined(TOOLKIT_GTK) | 386 #if defined(TOOLKIT_GTK) |
| 387 // Be sure to use the X display handle and not the GTK display handle if this | 387 // Be sure to use the X display handle and not the GTK display handle if this |
| 388 // is the GPU process. | 388 // is the GPU process. |
| 389 g_create_child_windows = | 389 g_create_child_windows = |
| 390 base::MessageLoop::current() && | 390 base::MessageLoop::current() && |
| 391 base::MessageLoop::current()->type() == base::MessageLoop::TYPE_GPU; | 391 base::MessageLoop::current()->type() == base::MessageLoop::TYPE_GPU; |
| 392 | 392 |
| 393 // Disable this path because it is causing window contents to disappear. |
| 394 // http://crbug.com/292655 |
| 395 g_create_child_windows = false; |
| 396 |
| 393 if (g_create_child_windows) | 397 if (g_create_child_windows) |
| 394 g_display = base::MessagePumpX11::GetDefaultXDisplay(); | 398 g_display = base::MessagePumpX11::GetDefaultXDisplay(); |
| 395 else | 399 else |
| 396 g_display = base::MessagePumpForUI::GetDefaultXDisplay(); | 400 g_display = base::MessagePumpForUI::GetDefaultXDisplay(); |
| 397 #else | 401 #else |
| 398 g_display = base::MessagePumpForUI::GetDefaultXDisplay(); | 402 g_display = base::MessagePumpForUI::GetDefaultXDisplay(); |
| 399 #endif | 403 #endif |
| 400 | 404 |
| 401 if (!g_display) { | 405 if (!g_display) { |
| 402 LOG(ERROR) << "XOpenDisplay failed."; | 406 LOG(ERROR) << "XOpenDisplay failed."; |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 | 795 |
| 792 void* PbufferGLSurfaceGLX::GetConfig() { | 796 void* PbufferGLSurfaceGLX::GetConfig() { |
| 793 return config_; | 797 return config_; |
| 794 } | 798 } |
| 795 | 799 |
| 796 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { | 800 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { |
| 797 Destroy(); | 801 Destroy(); |
| 798 } | 802 } |
| 799 | 803 |
| 800 } // namespace gfx | 804 } // namespace gfx |
| OLD | NEW |