summaryrefslogtreecommitdiffstats
path: root/src/opengl/qwindowsurface_gl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright year in Digia's license headersSergio Ahumada2013-01-131-1/+1
| | | | | | Change-Id: I52bf8ef0447b701b4ebf7d7d240013a72adb9425 Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-291-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: I280c0a575987d1770e354b4948f1d4d767d711ea Reviewed-by: Simo Fält <simo.falt@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Update contact information in license headers.Sergio Ahumada2012-08-011-2/+2
| | | | | | | | | | | | | - Replace Nokia contact email address with Qt Project website. - Remove "All rights reserved" line from license headers. As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: Ie7ba62011752fcb149b99b26317c54f2a0cfa931 Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
* Performance fix for OpenGL drawingPauli Jarvinen2012-06-191-6/+0
| | | | | | | | | | | | | | | | | | Excessive calling of glFlush() was causing a performance problem when QML application was being run in the OpenGL graphics mode. There was an unnecessary call to glFlush() in the function QGLWindowSurfaceGLPaintDevice::endPaint(). This function gets called each time a QPainter instance is destroyed, which may happen several times per each painted screen frame (at least 4 times per frame can easily happen). Calling glFlush() from endPaint() is not necessary at all since it will be anyway called from QGLWindowSurface::flush() (either directly if single-buffered context is used or indirectly by swapping buffers if double-buffered context is used). Task-number: ou1cimx1#957423 Change-Id: I89509d8935ad31cc47bfed41a1900b6bb76c2af8 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
* Prevent crashing on Symbian in case EGL surface creation fails.Pauli Jarvinen2012-02-081-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is possible in environment with limited resources, that EGL surface creation fails. When this happens, the QPainter doesn't get properly activated, which in turn caused a crash later in the drawing code. Now, a check has been added into qapplication_s60.cpp to abort window drawing immediately, if surface creation has failed. The EGL surface is then tried to be recreated on the next time when the window becomes visible, which usually allows the application to recover. In most cases, the crash happened in the function qDrawBorderPixmap, which didn't check the validity of the QPaintEngine pointer before accessing it. This method is analogous with the public methods of the class QPainter where, on the other hand, availability of QPaintEngine was always checked. To be in line, and to prevent ptential crashes, a similar safety check and warning message have now been added to method qDrawBorderPixmap. Furthermore, a null-check was added to qwindowsurface_gl.cpp for the QGLContext pointer. The same pointer was already previously null-checked in the other branch of the same function, indicating that the null-check is probably necessary. Task-number: ou1cimx1#969923 Change-Id: I6d78be72b9c2308ef74b1119d8c8ec34ec015195 Reviewed-by: Jaakko Helanti <ext-jaakko.helanti@nokia.com> Reviewed-by: Pasi Pentikäinen <ext-pasi.a.pentikainen@nokia.com>
* Update year in Nokia copyright messages.Jason McDonald2012-01-111-1/+1
| | | | | | | | | Simple search and replace. This commit doesn't touch 3rd-party files, nor translations (where the change is not so simple and will be handled in a separate commit). Change-Id: I4e48513b8078a44a8cd272326685b25338890148 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Fix to incorrect ApplicationActivate event in QtOpenGLJani Hautakangas2011-12-161-6/+19
| | | | | | | | | | | | | | | | | | | QEvent::ApplicationActivate is sent incorrectly when application goes to background if OpenGL graphics system is used. The problem is that hidden global shared QGLWidget used by QtOpenGL for root context is added to CONE stack. Qt destroys shared GL widget when application goes to background and underlying CCoeControl is removed from CONE stack which causes CONE to handle stack changes. CONE tries to focus next control in stack which causes incorrect focus events in Qt leading to ApplicationActivate event. GL global share widget must not be added to CONE stack because it's hidden utility widget and don't belong to UI widget stack. Task-number: QTBUG-23195 Task-number: ou1cimx1#946477 Reviewed-by: Murray Read
* Merge remote-tracking branch 'qt-qa-review/master'Sergio Ahumada2011-11-261-1/+1
|\
| * Doc: Fixing typoSergio Ahumada2011-08-171-1/+1
| | | | | | | | | | | | | | Reducing the amount of spelling errors from NBN. Change-Id: I9b228bb95b4a757cff57595125009e70b0097d86 Reviewed-by: Rohan McGovern
* | Fix to QtOpenGL crash on SymbianJani Hautakangas2011-11-081-3/+28
|/ | | | | | | | | | Under some rare circumstances EGL context creation fails on Symbian leading to application crash. However, Qt is able to recover from this if context pointers are guarded by null pointer checks in QtOpenGL. Task-number: QT-5334 Reviewed-by: Samuel Rødal
* Merge remote branch 'origin/4.7' into qt-4.8-from-4.7Jani Hautakangas2011-07-041-23/+41
|\ | | | | | | | | | | | | Conflicts: doc/src/external-resources.qdoc src/gui/text/qtextlayout.cpp src/opengl/qwindowsurface_gl.cpp
| * Introduce QPixmap::fromSymbianRSgImage(RSgImage*) to GL engineJani Hautakangas2011-06-301-18/+37
| | | | | | | | | | | | | | | | Initial implementation of QPixmap::fromSymbianRSgImage(RSgImage*) on OpenGL graphics system. Task-number: QTBUG-15254 Reviewed-by: Laszlo Agocs
* | Merge remote branch 'origin/4.7' into qt-4.8-from-4.7Jani Hautakangas2011-06-221-53/+8
|\ \ | |/ | | | | | | | | | | Conflicts: src/opengl/qgl.cpp src/opengl/qpixmapdata_symbiangl.cpp src/opengl/qwindowsurface_gl.cpp
| * Simplify texture pooling logic in GL graphics system.Jani Hautakangas2011-06-091-54/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | Remove ugly TemporarilyCachedBindOption and use QGLTexture objects as texture pool entries instead of QGLPixmapData. Make texture pooling totally Symbian specific, remove VG like texture pooling code and use common texture binding path which is used on other platforms also on Symbian. QGLPixmapData should be only used to bind SgImage based textures (will be implemented by another commit). Task-number: QTBUG-19180 Reviewed-by: Samuel Rødal
| * Update licenseheader text in source filesJyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | Merge remote branch 'qt/4.8' into fire-masterPaul Olav Tvete2011-06-061-17/+17
|\ \ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/wayland/qwaylandclipboard.cpp src/plugins/platforms/wayland/qwaylandclipboard.h src/plugins/platforms/wayland/qwaylanddisplay.cpp src/s60installs/eabi/QtOpenGLu.def
| * | Update licenseheader text in source files for qt4.8Jyri Tahtela2011-05-131-17/+17
| | | | | | | | | | | | | | | | | | | | | Updated version of LGPL and FDL licenseheaders. Apply release phase licenseheaders for all source files. Reviewed-by: Trust Me
* | | Full translucent background support in xcb and xlib backend.Samuel Rødal2011-05-191-5/+13
|/ / | | | | | | | | | | | | | | Make sure to pick an alpha visual also for non-GL surface types, and to ask for alpha in the window format if the WA_TranslucentBackground attribute is set. Reviewed-by: Janusz Lewandowski
* | Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging into ↵Qt Continuous Integration System2011-05-051-3/+9
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | master-integration * 'master' of scm.dev.nokia.troll.no:qt/qt-fire-staging: Compile on Windows Support gamma correction of text on GL Remove QFontEngineFT::loadGlyphMetrics Make autotest more resilient against network timeout Do not filter adhoc clients Lancelot: Add configurable client filtering to baseline server Improve error reporting on failure to connect to baseline server Fixed bug in X11 backend when creating translucent windows. Only cleanup share widget if it has been created. Add required font metrics functions to QRawFont Fixed bug in QPdfEngine::addImage causing mono images to be made 32 bit Make pixel size a qreal in QRawFont Make sure removed QTextBlock is invalid Make sure QFont's resolve mask is copied on compilers with C++0x support Fix glyph position issue with fallback fonts
| * | Only cleanup share widget if it has been created.Armin Berres2011-05-021-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Without this change a not yet created share widget is created once qt_destroy_gl_share_widget() is called. As creating the widget also triggers a call to qt_cleanup_gl_share_widget() once QApplication is destroyed a QApplication created afterwards cannot use a share widget anymore. This functionality is needed for Harmattan. Merge-request: 2609 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | Merge branch 4.7 into qt-4.8-from-4.7Qt Continuous Integration System2011-05-021-0/+11
|\ \ \ | |/ / |/| / | |/
| * Fix trailing whitespacesJani Hautakangas2011-05-021-1/+1
| | | | | | | | Reviewed-by: TRUSTME
| * Fix for native child widget performance issue.Jani Hautakangas2011-05-021-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | Flushing native child widgets in VG and GL window surfaces caused performance downgrade because unnecessary swapBuffers calls. On Symbian we must not support flushing native child widgets in VG and GL window surfaces because it causes GPU memory overhead and performance issues. Symbian graphics architecture allows us to render native child widgets to TLW EGL surface correctly in most of the cases. Task-number: QTMOBILITY-1570 Reviewed-by: Samuel Rødal
* | Merge remote-tracking branch 'origin/4.7' into qt-4.8-from-4.7Olivier Goffart2011-04-271-32/+16
|\ \ | |/ | | | | | | | | Conflicts: src/opengl/qwindowsurface_gl.cpp src/s60installs/eabi/QtGuiu.def
| * Fix for GL graphcics system orientation whichJani Hautakangas2011-04-261-32/+16
| | | | | | | | | | | | | | | | | | OpenGL context needs to be recreated on Symbian when orientation changes. Previously only the EGL surface was recreated which wasn't enough. Task-number: QTBUG-18850 Reviewed-by: Samuel Rødal
* | Merge remote-tracking branch 'origin/master' into lighthouse-masterJørgen Lind2011-04-141-23/+46
|\ \
| * | Fixed bad merges in GL windowsurface and get rid of redundant variable.Samuel Rødal2011-03-291-2/+9
| | | | | | | | | | | | Reviewed-by: Jani Hautakangas
| * | Added WindowSurfaceFeature enum to QWindowSurface.Samuel Rødal2011-03-291-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | Now that we've added hasPreservedContents() it's cleaner to convert the various features to feature flags, which is also more extensible in case more flags are needed in the future. Reviewed-by: Bjørn Erik Nilsen
| * | Added preserved contents property to QWindowSurface.Samuel Rødal2011-03-291-26/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously we used hasPartialUpdateSupport() to deduce whether the window surface's contents are preserved when flush is called or not, but that limits us from fully supporting platforms which might allow partial updates even though the surface contents aren't preserved on flush. If hasPreservedContents() returns false, that means a flush of a region is never allowed without first painting to that region. If hasPartialUpdateSupport() returns false, the whole window surface must always be painted whenever an update is requested. Note that hasPreservedContents() will typically imply hasPartialUpdateSupport(), but not vice versa. Reviewed-by: Bjørn Erik Nilsen
| * | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Thiago Macieira2011-03-241-7/+24
| |\ \ | | |/ | | | | | | | | | Conflicts: src/opengl/qwindowsurface_gl.cpp
| | * Change Symbian to use destroyed swap behaviour in GLJani Hautakangas2011-03-221-9/+31
| | | | | | | | | | | | | | | | | | | | | | | | Destroyed swap behaviour is a little bit faster than preserved swap with heavily animated UIs like QML. Task-number: QTBUG-18270 Reviewed-by: Samuel Rødal
| * | Handle removal of setter for partialUpdateSupportEckhart Koppen2011-03-221-1/+1
| | | | | | | | | | | | | | | | | | | | | The setter was removed as part of merge request 1136. This commit fixes the Symbian build where Q_NO_EGL is undefined. Reviewed-by: Samuel Rødal
| * | Merge remote branch 'qt/master' into staging-masterSamuel Rødal2011-03-211-9/+74
| |\ \ | | | | | | | | | | | | | | | | | | | | Conflicts: src/gui/image/qpnghandler.cpp src/opengl/qwindowsurface_gl.cpp
| * | | Make getters for staticContentsSupport and partialUpdateSupport virtualArmin Berres2011-03-161-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QRuntimeGraphicsSystem is asked for its support for static contents of partial updates it should return the value for the currently running wrapped graphicssystem. As the getters have not been virtual so far this could not be implemented. Additionally the setters have been removed as these values are not supposed to be set from the outside. Only the graphicssystems itself knows what it supports. If the default values should be changed the methods should be overwritten. Merge-request: 1136 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
* | | | Remove DefaultSharedContext from Lighthouse API.Samuel Rødal2011-04-131-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QPlatformWindowFormat::setUseDefaultSharedContext was meant as a convenience, but it adds complexity in the platform plugin implementation, and can be implemented by the above layers using QPlatformWindowFormat::setSharedContext. Reviewed-by: Jørgen Lind
* | | | Lighthouse: fixup from cherry-pickJørgen Lind2011-03-211-1/+0
| | | | | | | | | | | | | | | | a9b5cc1b3d6d5fb9569ad3bca9b5584b6415bfd6
* | | | Compile fix for QPAPaul Olav Tvete2011-03-211-1/+2
| | | |
* | | | Fixed compilation of QtOpenGL with Q_WS_QPA.Samuel Rødal2011-03-171-0/+4
| |/ / |/| |
* | | Merge remote-tracking branch 'origin/4.7' into HEADThiago Macieira2011-03-161-8/+73
|\ \ \ | |/ / |/| / | |/ | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure mkspecs/symbian-gcce/qmake.conf qmake/generators/metamakefile.cpp qmake/generators/win32/mingw_make.cpp src/corelib/global/global.pri src/corelib/global/qglobal.h src/opengl/qgl.cpp src/opengl/qwindowsurface_gl.cpp src/plugins/platforms/wayland/qwaylandbuffer.h tests/auto/qnetworkreply/tst_qnetworkreply.cpp tools/designer/src/components/formeditor/qdesigner_resource.cpp
| * Hot fix for compilation without QGL_USE_TEXTURE_POOLJani Hautakangas2011-03-151-0/+2
| | | | | | | | Reviewed-by: TRUSTME
| * Initial implementation of GLES2.0 resource poolingJani Hautakangas2011-03-151-8/+71
| | | | | | | | | | | | | | | | | | Keep the implementation in separate qpixmapdata_poolgl.cpp file until the pooling has been verified and confirmed to work ok. Task-number: QTBUG-15253 QTBUG-17850 Reviewed-by: Samuel Rødal
* | Merge remote-tracking branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-03-011-4/+0
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: src/gui/text/qfontengine_mac.mm src/opengl/qpixmapdata_gl.cpp src/opengl/qwindowsurface_gl.cpp src/s60installs/bwins/QtOpenGLu.def src/s60installs/eabi/QtOpenGLu.def tests/auto/qtextlayout/tst_qtextlayout.cpp
| * Recreate GL surface when native window is resized on SymbianJani Hautakangas2011-02-251-13/+41
| | | | | | | | | | | | | | | | Symbian doesn't automatically resize EGL surface when native window is resized. Task-number: QTBUG-15249 Reviewed-by: Jørgen Lind
* | Recreate GL surface when native window is resized on SymbianJani Hautakangas2011-02-081-9/+35
| | | | | | | | | | | | | | | | Symbian doesn't automatically resize EGL surface when native window is resized. Task-number: QTBUG-15249 Reviewed-by: Jørgen Lind
* | Merge branch 'master' into lighthouse-masterJørgen Lind2011-01-261-5/+17
|\ \
| * \ Merge remote branch 'origin/4.7' into qt-master-from-4.7Olivier Goffart2011-01-171-1/+1
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/webkit/imageanalyzer/imageanalyzer.h examples/webkit/imageanalyzer/mainwindow.h mkspecs/unsupported/qws/linux-x86-openkode-g++/qplatformdefs.h src/corelib/io/qfsfileengine_iterator_unix.cpp src/corelib/io/qfsfileengine_iterator_win.cpp src/corelib/kernel/qcoreapplication.cpp src/network/access/qnetworkaccessdatabackend.cpp src/plugins/bearer/connman/qconnmanservice_linux.cpp src/plugins/platforms/openvglite/qwindowsurface_vglite.h src/s60installs/bwins/QtCoreu.def src/s60installs/eabi/QtCoreu.def src/s60installs/s60installs.pro tools/assistant/tools/assistant/helpviewer_qwv.h tools/qdoc3/test/qt-html-templates.qdocconf
| | * Update copyright year to 2011.Jason McDonald2011-01-101-1/+1
| | | | | | | | | | | | Reviewed-by: Trust Me
| * | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2011-01-071-3/+4
| |\ \ | | |/
| | * Restored old flushing behavior in -graphicssystem opengl on desktop.Samuel Rødal2011-01-071-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change 284211ccbd2cbd recently introduced a fix for EGL, to prevent flushing when nothing has been rendered into the back buffer. However, the skip should only be done when there's no partial update support in the window surface. If there is partial update support we can still flush as usual. Reviewed-by: Gunnar Sletta
| * | Merge branch 4.7 into qt-master-from-4.7Qt Continuous Integration System2011-01-051-1/+12
| |\ \ | | |/