Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / ui / gl / gl_surface_x11.cc
index 066f915..a5d5aab 100644 (file)
@@ -10,6 +10,7 @@
 #include "base/message_loop/message_loop.h"
 #include "third_party/mesa/src/include/GL/osmesa.h"
 #include "ui/gfx/native_widget_types.h"
+#include "ui/gfx/x/x11_types.h"
 #include "ui/gl/gl_bindings.h"
 #include "ui/gl/gl_implementation.h"
 #include "ui/gl/gl_surface_egl.h"
@@ -79,7 +80,7 @@ bool GLSurface::InitializeOneOffInternal() {
 NativeViewGLSurfaceOSMesa::NativeViewGLSurfaceOSMesa(
     gfx::AcceleratedWidget window)
     : GLSurfaceOSMesa(OSMESA_BGRA, gfx::Size(1, 1)),
-      xdisplay_(base::MessagePumpForUI::GetDefaultXDisplay()),
+      xdisplay_(gfx::GetXDisplay()),
       window_graphics_context_(0),
       window_(window),
       pixmap_graphics_context_(0),
@@ -94,7 +95,7 @@ bool NativeViewGLSurfaceOSMesa::InitializeOneOff() {
   if (initialized)
     return true;
 
-  if (!base::MessagePumpForUI::GetDefaultXDisplay()) {
+  if (!gfx::GetXDisplay()) {
     LOG(ERROR) << "XOpenDisplay failed.";
     return false;
   }
@@ -341,7 +342,7 @@ scoped_refptr<GLSurface> GLSurface::CreateOffscreenGLSurface(
 }
 
 EGLNativeDisplayType GetPlatformDefaultEGLNativeDisplay() {
-  return base::MessagePumpForUI::GetDefaultXDisplay();
+  return gfx::GetXDisplay();
 }
 
 }  // namespace gfx