| Index: ui/gl/gl_surface_egl.cc
|
| diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc
|
| index 040f8087f92d6a985e19f75d6ea5993914f2ecc3..f978b23883cb13269f518e592699dab07aed2082 100644
|
| --- a/ui/gl/gl_surface_egl.cc
|
| +++ b/ui/gl/gl_surface_egl.cc
|
| @@ -489,6 +489,10 @@ void NativeViewGLSurfaceEGL::SetHandle(EGLSurface surface) {
|
| PbufferGLSurfaceEGL::PbufferGLSurfaceEGL(const gfx::Size& size)
|
| : size_(size),
|
| surface_(NULL) {
|
| + // Some implementations of Pbuffer do not support having a 0 size. For such
|
| + // cases use a (1, 1) surface.
|
| + if (size_.GetArea() == 0)
|
| + size_.SetSize(1, 1);
|
| }
|
|
|
| bool PbufferGLSurfaceEGL::Initialize() {
|
| @@ -500,12 +504,6 @@ bool PbufferGLSurfaceEGL::Initialize() {
|
| return false;
|
| }
|
|
|
| - if (size_.GetArea() == 0) {
|
| - LOG(ERROR) << "Error: surface has zero area "
|
| - << size_.width() << " x " << size_.height();
|
| - return false;
|
| - }
|
| -
|
| // Allocate the new pbuffer surface before freeing the old one to ensure
|
| // they have different addresses. If they have the same address then a
|
| // future call to MakeCurrent might early out because it appears the current
|
|
|