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 | |
397 if (g_create_child_windows) | 393 if (g_create_child_windows) |
398 g_display = base::MessagePumpX11::GetDefaultXDisplay(); | 394 g_display = base::MessagePumpX11::GetDefaultXDisplay(); |
399 else | 395 else |
400 g_display = base::MessagePumpForUI::GetDefaultXDisplay(); | 396 g_display = base::MessagePumpForUI::GetDefaultXDisplay(); |
401 #else | 397 #else |
402 g_display = base::MessagePumpForUI::GetDefaultXDisplay(); | 398 g_display = base::MessagePumpForUI::GetDefaultXDisplay(); |
403 #endif | 399 #endif |
404 | 400 |
405 if (!g_display) { | 401 if (!g_display) { |
406 LOG(ERROR) << "XOpenDisplay failed."; | 402 LOG(ERROR) << "XOpenDisplay failed."; |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
795 | 791 |
796 void* PbufferGLSurfaceGLX::GetConfig() { | 792 void* PbufferGLSurfaceGLX::GetConfig() { |
797 return config_; | 793 return config_; |
798 } | 794 } |
799 | 795 |
800 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { | 796 PbufferGLSurfaceGLX::~PbufferGLSurfaceGLX() { |
801 Destroy(); | 797 Destroy(); |
802 } | 798 } |
803 | 799 |
804 } // namespace gfx | 800 } // namespace gfx |
OLD | NEW |