| Index: ui/gl/gl_surface_egl.cc
|
| diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
|
| index 8c29342ab408e2f0e10fb0ff370807d449c5646c..15e989111a7c9201b1b88bad559f1921de7094ef 100644
|
| --- a/ui/gl/gl_surface_egl.cc
|
| +++ b/ui/gl/gl_surface_egl.cc
|
| @@ -100,10 +100,6 @@ bool GLSurfaceEGL::InitializeOneOff() {
|
| if (initialized)
|
| return true;
|
|
|
| -#if defined (USE_OZONE)
|
| - ui::SurfaceFactoryOzone::GetInstance()->InitializeHardware();
|
| -#endif
|
| -
|
| #if defined(USE_X11)
|
| g_native_display = base::MessagePumpForUI::GetDefaultXDisplay();
|
| #elif defined(OS_WIN)
|
| @@ -111,6 +107,12 @@ bool GLSurfaceEGL::InitializeOneOff() {
|
| if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kDisableD3D11)) {
|
| g_native_display = EGL_D3D11_ELSE_D3D9_DISPLAY_ANGLE;
|
| }
|
| +#elif defined(USE_OZONE)
|
| + if (!ui::SurfaceFactoryOzone::GetInstance()->InitializeHardware()) {
|
| + LOG(ERROR) << "OZONE failed to initialize hardware";
|
| + return false;
|
| + }
|
| + g_native_display = ui::SurfaceFactoryOzone::GetInstance()->GetNativeDisplay();
|
| #else
|
| g_native_display = EGL_DEFAULT_DISPLAY;
|
| #endif
|
| @@ -362,6 +364,10 @@ bool NativeViewGLSurfaceEGL::SwapBuffers() {
|
| return false;
|
| }
|
|
|
| +#if defined(USE_OZONE)
|
| + ui::SurfaceFactoryOzone::GetInstance()->SwapBuffers();
|
| +#endif
|
| +
|
| return true;
|
| }
|
|
|
|
|