IntSize GLContextEGL::defaultFrameBufferSize() { if (!canRenderToDefaultFramebuffer()) return IntSize(); EGLint width, height; if (!eglQuerySurface(sharedEGLDisplay(), m_surface, EGL_WIDTH, &width) || !eglQuerySurface(sharedEGLDisplay(), m_surface, EGL_HEIGHT, &height)) return IntSize(); return IntSize(width, height); }
IntSize GLContextGLX::defaultFrameBufferSize() { if (!canRenderToDefaultFramebuffer() || !m_window) return IntSize(); int x, y; Window rootWindow; unsigned int width, height, borderWidth, depth; if (!XGetGeometry(m_x11Display, m_window, &rootWindow, &x, &y, &width, &height, &borderWidth, &depth)) return IntSize(); return IntSize(width, height); }