Changeset 651 for trunk/src/opengl/qpixmapdata_x11gl_egl.cpp
- Timestamp:
- Mar 8, 2010, 12:52:58 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.6.2 (added) merged: 650 /branches/vendor/nokia/qt/current merged: 649 /branches/vendor/nokia/qt/4.6.1 removed
- Property svn:mergeinfo changed
-
trunk/src/opengl/qpixmapdata_x11gl_egl.cpp
r561 r651 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 20 09Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 40 40 ****************************************************************************/ 41 41 42 #include <QDebug> 43 42 44 #include <private/qgl_p.h> 43 45 #include <private/qegl_p.h> 44 46 #include <private/qeglproperties_p.h> 47 48 #if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) 45 49 #include <private/qpaintengineex_opengl2_p.h> 50 #endif 51 52 #ifndef QT_OPENGL_ES_2 53 #include <private/qpaintengine_opengl_p.h> 54 #endif 46 55 47 56 #include "qpixmapdata_x11gl_p.h" … … 188 197 } 189 198 190 static QGL2PaintEngineEx* qt_gl2_engine_for_pixmaps = 0; 199 #if !defined(QT_OPENGL_ES_1) && !defined(QT_OPENGL_ES_1_CL) 200 Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_gl_pixmap_2_engine) 201 #endif 202 203 #ifndef QT_OPENGL_ES_2 204 Q_GLOBAL_STATIC(QOpenGLPaintEngine, qt_gl_pixmap_engine) 205 #endif 206 191 207 192 208 QPaintEngine* QX11GLPixmapData::paintEngine() const … … 203 219 } 204 220 205 if (!qt_gl2_engine_for_pixmaps) 206 qt_gl2_engine_for_pixmaps = new QGL2PaintEngineEx(); 221 QPaintEngine* engine; 222 223 #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL) 224 engine = qt_gl_pixmap_engine(); 225 #elif defined(QT_OPENGL_ES_2) 226 engine = qt_gl_pixmap_2_engine(); 227 #else 228 if (qt_gl_preferGL2Engine()) 229 engine = qt_gl_pixmap_2_engine(); 230 else 231 engine = qt_gl_pixmap_engine(); 232 #endif 233 234 207 235 208 236 // Support multiple painters on multiple pixmaps simultaniously 209 if ( qt_gl2_engine_for_pixmaps->isActive()) {237 if (engine->isActive()) { 210 238 qWarning("Pixmap paint engine already active"); 211 QPaintEngine* engine = new QGL2PaintEngineEx(); 239 240 #if defined(QT_OPENGL_ES_1) || defined(QT_OPENGL_ES_1_CL) 241 engine = new QOpenGLPaintEngine; 242 #elif defined(QT_OPENGL_ES_2) 243 engine = new QGL2PaintEngineEx; 244 #else 245 if (qt_gl_preferGL2Engine()) 246 engine = new QGL2PaintEngineEx; 247 else 248 engine = new QOpenGLPaintEngine; 249 #endif 250 212 251 engine->setAutoDestruct(true); 213 252 return engine; 214 253 } 215 254 216 return qt_gl2_engine_for_pixmaps;255 return engine; 217 256 } 218 257
Note:
See TracChangeset
for help on using the changeset viewer.