summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qoffscreensurface.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Updated license headersJani Heikkinen2016-01-151-14/+20
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Utilize EGL_KHR_surfaceless_context in QOffscreenSurface when availableLaszlo Agocs2015-02-021-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use it also in the context initialization code which also relied on pbuffers until now. This is safe to do since QOffscreenSurface is deliberately kept minimal: we only support it for rendering to FBOs or uploading textures, it is quite useless for any rendering type of operation. Therefore simply not creating a surface when the extension is available is viable and should not break anything. While we should have done this a long time ago, the real inspiration now is to avoid crashes with some bad EGL implementations. Mesa in particular tends to crash in its interal configuration handling when trying to create a pbuffer surface with more exotic attributes, for example with multisampling enabled. Just getting rid of those properties is not an option since the resulting pbuffer would not be compatible with the existing context. Therefore our only option is to avoid the pbuffer altogether. There's a so-far-ignored patch for Mesa http://patchwork.freedesktop.org/patch/38100/ which tries to solve some of this but it turns out it is not sufficient to avoid problems with the multisampled case. So to avoid more headache, we just stop using pbuffers there. [ChangeLog][QtGui] QOffscreenSurface is now relying on EGL_KHR_surfaceless_context when available, and avoids creating a pbuffer surface when the extension is present. Change-Id: Id18742768b8e66c8d92ce65a9bf64b0296e14db7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Send events when platform surfaces are created/about to be destroyedSean Harmer2014-11-171-0/+7
| | | | | | | | | | | | | These synchronously delivered events allow applications to correctly and conveniently handle native platform surfaces being destroyed. This is particularly useful when doing rendering on a non-gui thread as it allows to shutdown rendering before the native surface gets destroyed from under us. Task-number: QTBUG-42476 Task-number: QTBUG-42483 Change-Id: I63f41bbdb32f281d0f3b8ec2537eb2b0361f3bb3 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
* Update QOffscreenSurface docs regarding threadsLaszlo Agocs2014-10-131-0/+8
| | | | | Change-Id: Ic2e3230835aa7fc1b1c3ac0530a65cd478e1ec5f Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Update license headers and add new license filesMatti Paaso2014-09-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Use default surface format in QOffscreenSurfaceLaszlo Agocs2014-09-141-0/+1
| | | | | Change-Id: I3b2f790089e6d1bcfe92f2f732489c08afa766cd Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Do not add QOffscreenSurface windows to the global listLaszlo Agocs2014-06-301-0/+3
| | | | | | | | | | | | | | | QOffscreenSurface has to stay usable even after returning from app.exec(). Hence close()ing the underlying hidden window, that is used on platforms that do not provide real offscreen surfaces, is wrong. Normally all QWindows are closed (and thus destroy()'ed) when quitting the application, meaning the the offscreen surface cannot be made current anymore after returning from exec(). This is an unnecessary limitation and makes certain cleanup operations impossible. Task-number: QTBUG-39908 Change-Id: Iea1489378a18f29ff84ba8f13a6dad2d66d2b315 Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Enhance QOffscreenSurface docs wrt the formatLaszlo Agocs2014-03-271-0/+8
| | | | | | | Prevent nasty surprises on some EGL implementations. Change-Id: I0c6c8a6c631d4dcb979afd81a150491a42aa63f8 Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
* Check the thread in QOffscreenSurfaceLaszlo Agocs2013-11-271-0/+2
| | | | | | | | | | | | The QWindow-based fallback will not work when the QOffscreenSurface is created outside the main thread. Show a warning in this case. Note that it is fine to use the QOffscreenSurface instance in another thread. It is just the creation that must happen on the main thread. Change-Id: If80da39e610813755b9ba2f6831b187b258b8266 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Added QOffscreenSurface class.Yoann Lopes2013-02-181-0/+345
Inherits QSurface and allows to use OpenGL from an arbitrary thread. Platform plugins can implement QPlatformOffscreenSurface, otherwise an invisible QWindow is used by QOffscreenSurface. This patch includes an implementation of QOffscreenSurface for XCB and EglFS platform plugins using pbuffers. Change-Id: I57b4fc1db417331f34826dcfa754b7698782fde4 Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>