equal
deleted
inserted
replaced
1 /**************************************************************************** |
1 /**************************************************************************** |
2 ** |
2 ** |
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 ** All rights reserved. |
4 ** All rights reserved. |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
6 ** |
6 ** |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
7 ** This file is part of the QtGui module of the Qt Toolkit. |
8 ** |
8 ** |
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; |