src/gui/egl/qegl_x11.cpp
branchRCL_3
changeset 8 3f74d0d4af4c
parent 4 3b1da2848fc7
equal deleted inserted replaced
6:dee5afe5301f 8:3f74d0d4af4c
    91                    << errorString(eglGetError());
    91                    << errorString(eglGetError());
    92     }
    92     }
    93     return surf;
    93     return surf;
    94 }
    94 }
    95 
    95 
    96 EGLDisplay QEglContext::getDisplay(QPaintDevice *device)
    96 EGLNativeDisplayType QEglContext::nativeDisplay()
    97 {
    97 {
    98     Q_UNUSED(device);
       
    99     Display *xdpy = QX11Info::display();
    98     Display *xdpy = QX11Info::display();
   100     if (!xdpy) {
    99     if (!xdpy) {
   101         qWarning("QEglContext::getDisplay(): X11 display is not open");
   100         qWarning("QEglContext::getDisplay(): X11 display is not open");
   102         return EGL_NO_DISPLAY;
   101         return EGLNativeDisplayType(EGL_DEFAULT_DISPLAY);
   103     }
   102     }
   104     return eglGetDisplay(EGLNativeDisplayType(xdpy));
   103     return EGLNativeDisplayType(xdpy);
   105 }
   104 }
   106 
   105 
   107 static int countBits(unsigned long mask)
   106 static int countBits(unsigned long mask)
   108 {
   107 {
   109     int count = 0;
   108     int count = 0;