summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qsurfaceformat.h
Commit message (Collapse)AuthorAgeFilesLines
* Use SPDX license identifiersLucie Gérard2022-05-161-38/+2
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Support EGL protected content extensionElvis Lee2021-03-091-1/+2
| | | | | | | | | | | | | | | | | | | | A protected context is required to allow the GPU to operate on protected resources, including protected surfaces and protected EGLImages. For example, GPU can post-process on protected content like DRM protected content so that complex, nonlinear video effects or mapping onto textures can be used. The surface format option may be relevant for DirectX and Vulkan in the future: https://microsoft.github.io/DirectX-Specs/d3d/ProtectedResources.html https://www.khronos.org/registry/vulkan/specs/1.1-khr-extensions/html/chap12.html#memory-protected-memory Change-Id: I2d155f0e68b830276690b4833b22a2bc452cdcad Reviewed-by: Elvis Lee <kwangwoong.lee@lge.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* QSurfaceFormat: Make comparison operators hidden friendsVolker Hilsheimer2020-10-281-5/+5
| | | | | | | | Reduce ADL noise. Also add noexcept. Task-number: QTBUG-87973 Change-Id: I83787264b00b084ecdc85b6b3c2a8d95db94a05e Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Port some more /*implicit*/-like comments to Q_IMPLICITGiuseppe D'Angelo2020-10-161-1/+1
| | | | | Change-Id: Ib70ad3f29365153af647deea54fc45467c413cb9 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Switch QSurfaceFormat::colorSpace to a QColorSpaceAllan Sandfeld Jensen2020-09-151-2/+8
| | | | | | | Allows more flexibility in the future. Change-Id: Idcf2d8ddaee268a7b5d55379ccb42dd9b3c33abf Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Remove deprecated API from QSurfaceFormatMarcel Krems2020-09-081-5/+0
| | | | | Change-Id: I8dacdaa18cea967a85e8835c2440ba53ee5df2e1 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Support windows with sRGB-capable default framebuffers in QSurfaceFormatLaszlo Agocs2017-02-261-0/+9
| | | | | | | | | | | | | | Backend implementation is done for GLX for now. WGL and EGL may follow later on. [ChangeLog][QtGui] Added support for requesting OpenGL windows with sRGB-capable default framebuffers. While this is implicit on some platforms, QSurfaceFormat now has the necessary flags to request such windows in a cross-platform manner. Task-number: QTBUG-50987 Change-Id: I4df1f786e41e63396f46920a81afdf5ecb5eedea Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Make QSurfaceFormat a Q_GADGET and add Q_ENUM for easier debuggingTor Arne Vestbø2016-08-261-0/+6
| | | | | Change-Id: I2fa0bc13bd90da53858ba3e0c6351f545e792fde Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Add qtguiglobal.h and qtguiglobal_p.hLars Knoll2016-07-031-1/+1
| | | | | | | | | | | | | | | | | | | | The new modular configuration system requires one global header per module, that is included by all other files in this module. A similar scheme and naming convention is already being used for many other modules (e.g. printsupport, qml, quick). That header will later on #include the configuration file for Qt Gui. For now it defines the Q_GUI_EXPORT macro for this library. In addition, add a private global header, qtguiglobal_p.h, that can later on include the private config header for Qt Gui for things we don't want to export to the world. Change-Id: Id9ce2a4f3d2962c3592c35e3d080574789195f24 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* 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>
* WGL: support reset notifications via GL_ARB_robustnessLaszlo Agocs2015-02-031-1/+2
| | | | | | | | | | | | | Handling context losses is unavoidable with ANGLE. Introduce some level of support for desktop GL too by making it possible to opt in via a new flag. Support is added for Windows (WGL, opengl32) only for now. In case of Windows with ANGLE setting the flag is not necessary, context losses will be reported regardless. Change-Id: Ic354c1382e876566538c52a4381f7ff328b7477e Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Deprecate implementations of functions deprecated in headersShawn Rutledge2014-11-271-0/+2
| | | | | | | | | If you build with configure -DQT_NO_DEPRECATED this will avoid some build errors. Change-Id: If2b2e57b6919091f3f077ebc2aeca0c3fd2421aa Reviewed-by: Olivier Goffart <ogoffart@woboq.com> Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* 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>
* Add default format to QSurfaceFormatLaszlo Agocs2014-08-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | Add defaultFormat() and setDefaultFormat() statics to QSurfaceFormat. These define the default values for the requestedFormat members of QOpenGLContext, QWindow and QOpenGLWidget (and implicitly QOpenGLWindow, QQuickWindow, etc.) This replaces QQuickWindow::setDefaultFormat() which can now be removed. The main inspiration here is not the convenience (avoiding setFormat() calls for all windows/widgets), but robustness: by setting the format once at the start of the application, all windows and contexts, including the internal share context used by QOpenGLWidget and QQuickWidget, will use the same format, eliminating the possibility of failing due to trying to share between incompatible contexts. Furthermore, since such a functionality is anyway mandatory for QQuickWindow (due to the possibility of creating windows from QML code), extending it to QSurfaceFormat and QOpenGLContext/QWindow is the next logical step. Change-Id: Ie94486adc489d17fecfcebb7050fecedffd2688b Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
* Add swapInterval to QSurfaceFormatLaszlo Agocs2013-11-131-0/+3
| | | | | | | | | | | | | | | Implement swap interval support for EGL, GLX and WGL. The environment variable QT_QPA_EGLFS_SWAPINTERVAL is renamed to QT_QPA_EGL_SWAPINTERVAL and can be used to override the applications' setting of the swap interval. Task-number: QTBUG-31939 Change-Id: I644325d5d3306b7604bffd7efccda3c00ed37d36 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Introduce proper QSurfaceFormat's setters/testers for format optionsGiuseppe D'Angelo2013-11-071-2/+7
| | | | | | | | | | | | | | | Fixes several things * setOption(options) has the wrong name (singular) * setOption(options) doesn't set the current options to the argument, but ORs the current options with the argument and sets the result * testOption(options) has the wrong name The old methods get deprecated, and new methods and overloads get introduced here. Old code behavior is thereby preserved. Change-Id: I51bba49f22810c80e6b4980892600d616503af6b Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Added version() and setVersion() convenience API to QSurfaceFormat.Samuel Rødal2013-02-081-0/+4
| | | | | | | | | | This lets you write code like format.version() >= qMakePair(3, 2), and format.setVersion(4, 2) instead of format.setMajorVersion(4); format.setMinorVersion(2); Change-Id: Ib052091cc12865ea0d5db52e468ed6cd28f14840 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
* Remove QT_{BEGIN,END}_HEADER macro usageSergio Ahumada2013-01-291-4/+0
| | | | | | | | | | | The macro was made empty in ba3dc5f3b56d1fab6fe37fe7ae08096d7dc68bcb and is no longer necessary or used. Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001 Reviewed-by: Laszlo Papp <lpapp@kde.org> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com> Reviewed-by: hjk <hjk121@nokiamail.com>
* Update copyright year in Digia's license headersSergio Ahumada2013-01-181-1/+1
| | | | | Change-Id: Ic804938fc352291d011800d21e549c10acac66fb Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-221-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: If1cc974286d29fd01ec6c19dd4719a67f4c3f00e Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
* Fixed missing way of choosing EGL renderable type with QSurfaceFormat.Samuel Rødal2012-06-271-0/+10
| | | | | | | | | | | This has been long overdue, since EGL now lets you choose between desktop and ES based OpenGL. We also add OpenVG for those who want to use raw OpenVG with a QOpenGLContext. The underlying EGL API for using OpenGL / OpenVG is the same, with eglMakeCurrent() and eglSwapBuffers(). Change-Id: Ib0146b3fde5fe632069ebf99e7712f496ee7ea4d Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* QtGui: make some constructors explicitMarc Mutz2012-03-141-1/+1
| | | | | | | | | This is a semi-automatic search, so I'm reasonably sure that all the exported ones have been caught. Change-Id: I5b122db2498dbb2aee50c7ad95c67e708aade45b Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | 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: I311e001373776812699d6efc045b5f742890c689 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Remove use of QT_MODULE from libraryGunnar Sletta2012-01-251-1/+0
| | | | | | | | | | These defines were there to aid in the commercial licensing scheme we used long ago, and are no longer needed. Keep a QT_MODULE(x) define so other modules continue compiling. Change-Id: I8fd76cd5270df8f14aee746b6cf32ebf7c23fec7 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Update contact information in license headers.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I431bbbf76d7c27d8b502f87947675c116994c415 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-051-1/+1
| | | | | Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Use module prefixed include paths, avoids warnings in configure.Pekka Vuorela2011-09-281-1/+1
| | | | | | | Change-Id: I081fa49073da532647836ddd1087c0f5fcf32775 Reviewed-on: http://codereview.qt-project.org/5634 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix stale license headers from refactor branchJason McDonald2011-09-151-17/+17
| | | | | | Change-Id: I38cd941202641f50bf632af35165a944d03a20e3 Reviewed-on: http://codereview.qt-project.org/4848 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Copy core GL functionality to QtGui with QGL -> QOpenGL naming.Samuel Rødal2011-08-291-2/+10
| | | | | | Change-Id: Ibc989afa4a30dd184d41d1a1cd89f97196e48855 Reviewed-on: http://codereview.qt.nokia.com/3710 Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
* OpenGL API refactor.Samuel Rødal2011-06-211-0/+144
Rename QGuiGLFormat to QSurfaceFormat, and make QWindow sub-class of QSurface and QPlatformWindow sub-class of QPlatformSurface, instead of having QPlatformGLSurface accessor in QWindow.