Index: ui/gl/gl_surface_egl.cc |
diff --git a/ui/gl/gl_surface_egl.cc b/ui/gl/gl_surface_egl.cc |
index f978b23883cb13269f518e592699dab07aed2082..040f8087f92d6a985e19f75d6ea5993914f2ecc3 100644 |
--- a/ui/gl/gl_surface_egl.cc |
+++ b/ui/gl/gl_surface_egl.cc |
@@ -489,10 +489,6 @@ |
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() { |
@@ -501,6 +497,12 @@ |
EGLDisplay display = GetDisplay(); |
if (!display) { |
LOG(ERROR) << "Trying to create surface with invalid display."; |
+ return false; |
+ } |
+ |
+ if (size_.GetArea() == 0) { |
+ LOG(ERROR) << "Error: surface has zero area " |
+ << size_.width() << " x " << size_.height(); |
return false; |
} |