diff options
Diffstat (limited to 'src/core/gl_surface_qt.cpp')
-rw-r--r-- | src/core/gl_surface_qt.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/gl_surface_qt.cpp b/src/core/gl_surface_qt.cpp index a338fe5cd..20f235048 100644 --- a/src/core/gl_surface_qt.cpp +++ b/src/core/gl_surface_qt.cpp @@ -314,6 +314,10 @@ bool GLSurfaceEGL::IsCreateContextRobustnessSupported() GLSurfaceQt::GLSurfaceQt(const gfx::Size& size) : m_size(size) { + // Some implementations of Pbuffer do not support having a 0 size. For such + // cases use a (1, 1) surface. + if (m_size.GetArea() == 0) + m_size.SetSize(1, 1); } bool GLSurfaceQt::HasEGLExtension(const char* name) @@ -337,12 +341,6 @@ bool GLSurfaceQtEGL::Initialize() return false; } - if (m_size.GetArea() == 0) { - LOG(ERROR) << "Error: surface has zero area" - << m_size.width() << " x " << m_size.height(); - return false; - } - const EGLint pbuffer_attributes[] = { EGL_WIDTH, m_size.width(), EGL_HEIGHT, m_size.height(), |