Index: ui/gl/gl_surface_egl.cc |
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc |
index aefd7244267cbfbc58ae992d4638788e80c3cd5b..0055d5896a78307b01646309907714822a31b9d1 100644 |
--- a/ui/gl/gl_surface_egl.cc |
+++ b/ui/gl/gl_surface_egl.cc |
@@ -447,6 +447,27 @@ void GetEGLInitDisplays(bool supports_angle_d3d, |
GLSurfaceEGL::GLSurfaceEGL() {} |
+GLSurface::Format GLSurfaceEGL::GetFormat() { |
+ return format_; |
+} |
+ |
+EGLDisplay GLSurfaceEGL::GetDisplay() { |
+ return g_display; |
+} |
+ |
+EGLConfig GLSurfaceEGL::GetConfig() { |
+ if (!config_) { |
+ config_ = ChooseConfig(format_); |
+ } |
+ return config_; |
+} |
+ |
+// static |
+void GLSurfaceEGL::SetNativeDisplay(EGLNativeDisplayType native_display) { |
+ g_native_display = native_display; |
+} |
+ |
+// static |
bool GLSurfaceEGL::InitializeOneOff() { |
static bool initialized = false; |
if (initialized) |
@@ -508,45 +529,37 @@ bool GLSurfaceEGL::InitializeOneOff() { |
return true; |
} |
-GLSurface::Format GLSurfaceEGL::GetFormat() { |
- return format_; |
-} |
- |
-EGLDisplay GLSurfaceEGL::GetDisplay() { |
- return g_display; |
-} |
- |
-EGLConfig GLSurfaceEGL::GetConfig() { |
- if (!config_) { |
- config_ = ChooseConfig(format_); |
- } |
- return config_; |
-} |
- |
+// static |
EGLDisplay GLSurfaceEGL::GetHardwareDisplay() { |
return g_display; |
} |
+// static |
EGLNativeDisplayType GLSurfaceEGL::GetNativeDisplay() { |
return g_native_display; |
} |
+// static |
const char* GLSurfaceEGL::GetEGLExtensions() { |
return g_egl_extensions; |
} |
+// static |
bool GLSurfaceEGL::HasEGLExtension(const char* name) { |
return ExtensionsContain(GetEGLExtensions(), name); |
} |
+// static |
bool GLSurfaceEGL::IsCreateContextRobustnessSupported() { |
return g_egl_create_context_robustness_supported; |
} |
+// static |
bool GLSurfaceEGL::IsEGLSurfacelessContextSupported() { |
return g_egl_surfaceless_context_supported; |
} |
+// static |
bool GLSurfaceEGL::IsDirectCompositionSupported() { |
return g_use_direct_composition; |
} |
@@ -561,8 +574,6 @@ EGLDisplay GLSurfaceEGL::InitializeDisplay() { |
return g_display; |
} |
- g_native_display = GetPlatformDefaultEGLNativeDisplay(); |
- |
// If EGL_EXT_client_extensions not supported this call to eglQueryString |
// will return NULL. |
const char* client_extensions = |