Changeset 846 for trunk/src/opengl/qgraphicssystem_gl.cpp
- Timestamp:
- May 5, 2011, 5:36:53 AM (14 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/vendor/nokia/qt/4.7.2 (added) merged: 845 /branches/vendor/nokia/qt/current merged: 844 /branches/vendor/nokia/qt/4.6.3 removed
- Property svn:mergeinfo changed
-
trunk/src/opengl/qgraphicssystem_gl.cpp
r651 r846 1 1 /**************************************************************************** 2 2 ** 3 ** Copyright (C) 201 0Nokia Corporation and/or its subsidiary(-ies).3 ** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). 4 4 ** All rights reserved. 5 5 ** Contact: Nokia Corporation (qt-info@nokia.com) … … 41 41 42 42 #include "qgraphicssystem_gl_p.h" 43 #include <QGraphicsView> 43 44 44 45 #include "private/qpixmap_raster_p.h" … … 48 49 #include <private/qwindowsurface_raster_p.h> 49 50 50 #if defined(Q_WS_X11) && defined(QT_OPENGL_ES)51 #if defined(Q_WS_X11) && !defined(QT_NO_EGL) 51 52 #include "private/qpixmapdata_x11gl_p.h" 52 53 #include "private/qwindowsurface_x11gl_p.h" … … 59 60 QPixmapData *QGLGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const 60 61 { 61 #if defined(Q_WS_X11) && defined(QT_OPENGL_ES)62 if (type == QPixmapData::PixmapType && QX11GLPixmapData::hasX11GLPixmaps())63 return new QX11GLPixmapData();64 #endif65 66 62 return new QGLPixmapData(type); 67 63 } … … 77 73 #endif 78 74 79 #if defined(Q_WS_X11) && defined(QT_OPENGL_ES) 80 if (QX11GLPixmapData::hasX11GLPixmaps()) 81 return new QX11GLWindowSurface(widget); 75 #if defined(Q_WS_X11) && !defined(QT_NO_EGL) 76 if (m_useX11GL && QX11GLPixmapData::hasX11GLPixmaps()) { 77 // If the widget is a QGraphicsView which will be re-drawing the entire 78 // scene each frame anyway, we should use QGLWindowSurface as this may 79 // provide proper buffer flipping, which should be faster than QX11GL's 80 // blitting approach: 81 QGraphicsView* qgv = qobject_cast<QGraphicsView*>(widget); 82 if (qgv && qgv->viewportUpdateMode() == QGraphicsView::FullViewportUpdate) 83 return new QGLWindowSurface(widget); 84 else 85 return new QX11GLWindowSurface(widget); 86 } 82 87 #endif 83 88
Note:
See TracChangeset
for help on using the changeset viewer.