Index: ui/gl/gl_surface_osmesa.cc |
diff --git a/ui/gl/gl_surface_osmesa.cc b/ui/gl/gl_surface_osmesa.cc |
index 8018fe83824dcc20ed7adf6ad93f8251b7914979..58d955be00298d4e37db00bcdb1f996dcb19d2bf 100644 |
--- a/ui/gl/gl_surface_osmesa.cc |
+++ b/ui/gl/gl_surface_osmesa.cc |
@@ -14,6 +14,10 @@ namespace gfx { |
GLSurfaceOSMesa::GLSurfaceOSMesa(unsigned format, const gfx::Size& size) |
: format_(format), |
size_(size) { |
+ // Implementations of OSMesa surface do not support having a 0 size. In such |
+ // cases use a (1, 1) surface. |
+ if (size_.GetArea() == 0) |
+ size_.SetSize(1, 1); |
} |
bool GLSurfaceOSMesa::Initialize() { |