76 props = properties->properties(); |
76 props = properties->properties(); |
77 else |
77 else |
78 props = 0; |
78 props = 0; |
79 EGLSurface surf; |
79 EGLSurface surf; |
80 if (devType == QInternal::Widget) |
80 if (devType == QInternal::Widget) |
81 surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, 0); |
81 surf = eglCreateWindowSurface(dpy, cfg, windowDrawable, props); |
82 else |
82 else |
83 surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, 0); |
83 surf = eglCreatePixmapSurface(dpy, cfg, pixmapDrawable, props); |
84 if (surf == EGL_NO_SURFACE) |
84 if (surf == EGL_NO_SURFACE) |
85 qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError()); |
85 qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError()); |
86 return surf; |
86 return surf; |
87 } |
|
88 |
|
89 EGLDisplay QEglContext::getDisplay(QPaintDevice *device) |
|
90 { |
|
91 EGLDisplay dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY); |
|
92 if (dpy == EGL_NO_DISPLAY) |
|
93 qWarning("QEglContext::defaultDisplay(): Falling back to EGL_DEFAULT_DISPLAY"); |
|
94 return dpy; |
|
95 } |
87 } |
96 |
88 |
97 // Set pixel format and other properties based on a paint device. |
89 // Set pixel format and other properties based on a paint device. |
98 void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev) |
90 void QEglProperties::setPaintDeviceFormat(QPaintDevice *dev) |
99 { |
91 { |