Index: ui/gl/gl_surface_egl.cc |
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc |
index 635595c7b998f7866d117f6bad17c1008e43585a..1a15fcf07683a8795239463a05cfdca7aa2cc2a7 100644 |
--- a/ui/gl/gl_surface_egl.cc |
+++ b/ui/gl/gl_surface_egl.cc |
@@ -363,7 +363,7 @@ bool NativeViewGLSurfaceEGL::Initialize( |
surface_ = eglCreateWindowSurface( |
GetDisplay(), |
GetConfig(), |
- window_, |
+ reinterpret_cast<EGLNativeWindowType>(window_), |
gfx::g_driver_egl.ext.b_EGL_NV_post_sub_buffer ? |
egl_window_attributes_sub_buffer : |
NULL); |
@@ -811,6 +811,9 @@ GLSurface::CreateViewGLSurface(gfx::AcceleratedWidget window) { |
scoped_refptr<NativeViewGLSurfaceEGL> surface; |
scoped_ptr<VSyncProvider> sync_provider; |
#if defined(USE_OZONE) |
+ COMPILE_ASSERT(sizeof(EGLNativeWindowType) >= |
+ sizeof(gfx::AcceleratedWidget), |
+ EGLNativeWindowType_wide_enough); |
window = gfx::SurfaceFactoryOzone::GetInstance()->RealizeAcceleratedWidget( |
window); |
sync_provider = |
@@ -840,8 +843,7 @@ GLSurface::CreateOffscreenGLSurface(const gfx::Size& size) { |
} |
case kGLImplementationEGLGLES2: { |
scoped_refptr<GLSurface> surface; |
- if (g_egl_surfaceless_context_supported && |
- (size.width() == 0 && size.height() == 0)) { |
+ if (g_egl_surfaceless_context_supported) { |
surface = new SurfacelessEGL(size); |
} else |
surface = new PbufferGLSurfaceEGL(size); |