summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopenglframebufferobject.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Port from QAtomic::load() to loadRelaxed()Giuseppe D'Angelo2019-06-201-1/+1
| | | | | | | | | | | | | | | Semi-automated, just needed ~20 manual fixes: $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} + $ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} + It can be easily improved (e.g. for store check that there are no commas after the opening parens). The most common offender is QLibrary::load, and some code using std::atomic directly. Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix can not -> cannotRobert Loehning2019-02-251-1/+1
| | | | | Change-Id: Ie9992f67ca59aff662a4be046ace08640e7c2714 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* WebAssembly for QtBaseMorten Johan Sørvig2018-08-301-0/+45
| | | | | | | | | | | | This is the squashed diff from wip/webassembly to dev. Done-with: Peng Wu <peng.wu@intopalo.com> Done-with: Sami Enne <sami.enne@intopalo.com> Done-with: Morten Johan Sørvig <morten.sorvig@qt.io> Started-by: Andrew Knight <andrew.knight@intopalo.com> Change-Id: I6562433c0a38d6ec49ab675e0f104f2665f3392d Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-08-171-4/+15
|\ | | | | | | Change-Id: I8bb8227f9da982e7d5ebe5324fc27abd9ac0d4fc
| * Don't block on lost contextDavid Edmundson2018-08-161-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | When glGetError returns GL_CONTEXT_LOST, on XCB + Nvidia at least, the error does not get cleared until the next successful glGetGraphicsResetStatus. We can't handle this properly until the start of the next frame where we will hopefully have a valid context, but in the meantime we should avoid locking up completely. Change-Id: Id438d44d83b926e1f3e4281ca3704231bf1a23cf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Implement support for 16bpc image formatsAllan Sandfeld Jensen2018-08-111-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds support for 16bit per color image formats in QImage. This makes it possible to read and write 16bpc PNGs, and take full advantage of the 16bpc paint engine. [ChangeLog][QtGui][QImage] QImage now supports 64bit image formats with 16 bits per color channel, compatible with 16bpc PNG or RGBA16 OpenGL formats. Task-number: QTBUG-45858 Change-Id: Icd28bd5868a6efcf65cb5bd56031d42941e04099 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Fixup GL_RGB10 FBO on OpenGL/ES3Allan Sandfeld Jensen2018-07-271-5/+10
|/ | | | | | | | Turns out on OpenGL ES, only the GL_RGB10_A2 form is allowed as a render buffer storage format. Change-Id: I42915b61835167ae457aae91da7e75065dd3eb21 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix HDR format in QOpenGLFramebufferObject::toImage()Allan Sandfeld Jensen2018-06-061-2/+5
| | | | | | | | If the fbo had samples > 0 set, it would use a temporary fbo with a default configuration losing the HDR precision. Change-Id: I7e9966165b3100f148c4ad24738f3ee71273f29a Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* doc: clangqdoc must always see GL typedefsMartin Smith2017-12-081-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | | QT_NO_OPENGL must not be defined when running clangqdoc because there are opengl elements that must be documented. That means clang will see uses of GLxxx, which might not be included on some platforms. For example, clang must parse the declaration for class QOpenGLFramebufferObject, which uses GLuint, GLenum, and GLbitfield, because there is documentation to be published for that class in qopenglframebufferobject.cpp. This change uses Q_CLANG_QDOC to first undef the needed GLxxx types and then provide suitable typedefs for them. This technique is also used in qglshader.h. This works for macOS, but is it the right way to solve the problem? This change also removes some \overload commands, because they shouldn't be used on constructors. And some \fn commands that are made unnecessary by upgrading to clang. Change-Id: I4ac658e951b3f2011698005f0238d4dea85fc403 Reviewed-by: Martin Smith <martin.smith@qt.io>
* Replace Q_NULLPTR with nullptr where possibleKevin Funk2017-09-191-3/+3
| | | | | | | | | | | | | Remaining uses of Q_NULLPTR are in: src/corelib/global/qcompilerdetection.h (definition and documentation of Q_NULLPTR) tests/manual/qcursor/qcursorhighdpi/main.cpp (a test executable compilable both under Qt4 and Qt5) Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Switch to RGB(A|X)8888[_Premultiplied] for QOpenGLFBO readbacks on GLESLaszlo Agocs2017-03-281-34/+9
| | | | | | | | | | | | | | | | | Instead of the never-ending blacklisting of "broken" drivers, simply switch to always choosing a byte ordered QImage format with OpenGL ES, and keep on using the (one and only) spec-mandated GL_RGBA/GL_UNSIGNED_BYTE combo. There is nothing broken with not supporting BGRA for glReadPixels even when GL_EXT_read_format_bgra (an out of date, pre-2.0 extension that got folded into the spec to begin with) is present. We do not have a good way to tell if BGRA_EXT is supported for glReadPixels or not, so just skip the whole problem altogether. Task-number: QTBUG-59283 Task-number: QTBUG-59303 Change-Id: I9f0605380923bd3b3ffdeb80f5c172d3e4cc7927 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Use QT_CONFIG(library) instead of QT_NO_LIBRARYUlf Hermann2017-03-061-1/+0
| | | | | | | | | | | | | For the windows file system engine, we add an extra macro to use library loading if configured to do so, but avoid it on WinRT, as none of the symbols would be found. We also QT_REQUIRE_CONFIG(library) in the library headers and exclude the sources from the build if library loading is disabled. This, in turn, makes it necessary to clean up some header inclusions. Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-161-0/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/common/linux-android.conf src/gui/opengl/qopengl.h src/network/socket/qnativesocketengine_winrt.cpp src/network/socket/qnativesocketengine_winrt_p.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/eglfs/api/qeglfsintegration.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp sync.profile Change-Id: If70aaf2c49df91157b864cf0d7d9513546c9bec4
| * Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-11-151-0/+6
| |\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: configure src/plugins/platforms/eglfs/qeglfsintegration.cpp src/plugins/platforms/linuxfb/qlinuxfbintegration.cpp Change-Id: Id2da7c775439adb62646d5b741ee7c638042b34b
| | * Prevent stale QOpenGLContext fbo pointerMorten Johan Sørvig2016-11-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is logic for clearing the qgl_curent_fbo pointer in release(), but it is not always called, causing the pointer to become stale on QOpenGLFramebufferObject deletion. As a last resort, clear the qgl_curent_fbo pointer on the current context if it’s pointing to the object that is being deleted. Change-Id: I36cca511da295412332193524219e32607ef8261 Task-number: QTBUG-56639 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-011-0/+1
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config.tests/win/msvc_version.cpp configure.pri mkspecs/macx-ios-clang/features/default_post.prf mkspecs/macx-ios-clang/features/resolve_config.prf mkspecs/features/uikit/default_post.prf mkspecs/features/uikit/resolve_config.prf src/corelib/io/qsettings_mac.cpp src/corelib/json/qjsondocument.cpp src/plugins/platforms/cocoa/qcocoawindow.h src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnswindowdelegate.h src/plugins/platforms/cocoa/qnswindowdelegate.mm src/plugins/platforms/ios/ios.pro src/plugins/platforms/ios/kernel.pro src/plugins/platforms/ios/qiosintegration.h src/plugins/platforms/minimalegl/qminimaleglintegration.cpp tests/auto/gui/painting/qpainter/tst_qpainter.cpp tools/configure/environment.cpp Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-10-171-0/+1
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/macx-ios-clang/features/resolve_config.prf src/testlib/qtestcase.qdoc Change-Id: Icefa63056ffb37106f35299a8f19165535571799
| | * Unset qgl_current_fbo when the default FBO is boundAlexandru Croitor2016-10-131-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when a new QOpenGLFramebufferObject was bound, the QOpenGLContextPrivate::qgl_current_fbo member was also updated to point to this new object. But if a user called QOpenGLFramebufferObject::bindDefault(), qgl_current_fbo was not unset, meaning that if the FBO object would be deleted at some point, qgl_current_fbo would be a dangling pointer. This patch makes sure to clear the value of qgl_current_fbo when bindDefault() is called. It is cleared, and not set to point to another object because the default platform OpenGL FBO is not backed by a QOpenGLFramebufferObject. Task-number: QTBUG-56296 Change-Id: I68b53d8b446660accdf5841df3d168ee2f133a90 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-051-1/+1
|\| | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/features/qt_common.prf src/plugins/platforms/windows/qwindowsdialoghelpers.cpp Change-Id: I03b92b6b89ecc5a8db7c95f04ebb92ed198098a8
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-09-051-1/+1
| |\| | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/testlib/selftests/generate_expected_output.py Change-Id: If856162abf9a24ae2c9946d336a7d1da03520fa7
| | * Fix unused variable warning on iOSJake Petroules2016-08-311-1/+1
| | | | | | | | | | | | | | | Change-Id: Ieae5d7833b45a49a743a52a437d5383bd8a962c5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-08-161-1/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/global/qglobal.cpp src/corelib/tools/qstring.cpp src/network/socket/qabstractsocket.cpp src/network/socket/qnativesocketengine_unix.cpp src/plugins/platforms/eglfs/api/qeglfsglobal.h Change-Id: Id5dfdbd30fa996f9b4b66a0b030b7d3b8c0ef288
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-131-1/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/io/qsettings.cpp src/corelib/itemmodels/qstringlistmodel.cpp tests/auto/gui/image/qimagewriter/tst_qimagewriter.cpp Change-Id: I1c6c306ef42c3c0234b19907914b19da706b4a03
| | * Cache the current QOpenGLFramebufferObjectSérgio Martins2016-08-111-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This doesn't cover FBOs bound directly with glBindFramebuffer(), but it's perfect to create a fast path for code we know uses QOGLFBO, thus avoiding expensive glGetIntegerv() driver calls. The use case is to use this in QSG24BitTextMaskShader::activate(), where we need to check if the current FBO is sRGB capable. Change-Id: I434eeeb7e6a3d16be9327315536ad7280245085d Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-07-191-1/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp qmake/library/qmakeevaluator.cpp qmake/library/qmakeevaluator.h qmake/project.h QMakeEvaluator: * evaluateConditional(): one side changed return type, the other changed a parameter type. * split_value_list(): one side changed a parameter adjacent to where ... * expandVariableReferences(): ... the other killed one overload and changed the survivor src/corelib/io/qlockfile_unix.cpp One side changed a #if condition, the other moved NETBSD's part of what it controlled. src/corelib/tools/qdatetime.cpp One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the other moved it from the private class to the public one, in the midst of the "short date-time" optimization, which confused diff entirely. One side changed a QStringLiteral to QLatin1String, the other rewrote adjoining code. src/network/kernel/qauthenticator.cpp Both rewrote a line, equivalently; kept the dev version. src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h One side changed #if-ery that the other removed. tools/configure/configureapp.cpp One side added a check to -target parsing; the other killed -target. tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml tests/auto/testlib/selftests/expected_cmptest.xunitxml Regenerated using generate_expected_output.py I note that quite a few other expected_* come out changed, now. There was no git-conflict in src/widgets/kernel/qformlayout.cpp but it didn't compile; one side removed some unused methods; the other found uses for one of them. Put FixedColumnMatrix<>::removeRow(int) back for its new user. Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Edward Welbourne2016-07-151-1/+4
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakeevaluator.cpp One side changed the iterator to use ranged-for, the other changed its body; they only conflicted because the latter had to add braces around the body, intruding on the for-line. Trivial resolution. Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
| | * [iOS] Blacklist iOS with regards to bgra supportAndy Shaw2016-07-151-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A number of devices are indicating that there is a problem with using bgra so instead of blacklisting all of them individually it is best to blacklist them all on the iOS platform. This ensures QQuickItem::grabToImage() will work then. Task-number: QTBUG-45902 Change-Id: I900857cfa996924469aaaeeee8037dc84a4fd575 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-231-1/+2
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: mkspecs/common/mac.conf mkspecs/features/configure_base.prf mkspecs/features/configure.prf mkspecs/macx-clang-32/qmake.conf mkspecs/macx-clang/qmake.conf mkspecs/macx-ios-clang/qmake.conf src/network/ssl/qsslsocket_openssl_symbols_p.h Change-Id: I768b592e8e589662b1fdb9b8cbd633fef26845b6
| * | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-06-231-1/+2
| |\| | | | | | | | | | | | | | | | | | | | | | Conflicts: src/angle/src/libGLESv2/libGLESv2.pro src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp Change-Id: If8da4cfe8f57fea9f78e7239f378a6302c01674e
| | * Add PowerVR SGX 554 to the BGRA blacklistAndy Shaw2016-06-201-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | PowerVR SGX 554 is used in iPad wi-fi (4th generation) and blacklisting it solves a problem with grabToImage() in QQuickItem. Task-number: QTBUG-45902 Change-Id: I4b6210a48f70614c4364fc63692c97652836f5d3 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | | Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-06-131-3/+4
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: config_help.txt configure mkspecs/features/uikit/sdk.prf src/corelib/global/qhooks.cpp src/corelib/io/qfilesystemwatcher.cpp src/corelib/io/qlockfile_unix.cpp src/corelib/tools/qalgorithms.h src/gui/kernel/qwindowsysteminterface.h src/gui/text/qtextdocument_p.cpp src/network/access/access.pri src/network/access/qnetworkaccessmanager.cpp src/network/access/qnetworkreplynsurlconnectionimpl.mm src/src.pro src/testlib/qtestcase.cpp src/widgets/kernel/qwidgetbackingstore_p.h src/widgets/styles/qwindowscestyle.cpp src/widgets/styles/qwindowsmobilestyle.cpp tests/auto/corelib/io/qdiriterator/qdiriterator.pro tests/auto/corelib/io/qfileinfo/qfileinfo.pro tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp tools/configure/configureapp.cpp Change-Id: Ibf7fb9c8cf263a810ade82f821345d0725c57c67
| * | Gui: use const (and const APIs) moreAnton Kudryavtsev2016-06-011-3/+4
| | | | | | | | | | | | | | | | | | | | | For CoW types, prefer const methods to avoid needless detach()ing. Change-Id: I88d08d499e1be72c1f6d983fecdcee513df18aa2 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QtGui: Introduce delegating constructors.Friedemann Kleint2016-05-091-7/+2
|/ / | | | | | | | | | | | | | | Reduce code duplication by chaining constructors. Change-Id: Ida25105e33cc3ef870f416931212e2216e9c6dfb Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-041-2/+6
|\| | | | | | | Change-Id: I35ca979395620e104e50b06366d0869433a4ffc2
| * Blacklist Mali-T760/Mali-T720 from supporting BGRA.Timo Jyrinki2016-03-301-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Extend the blacklist with Mali-T760 and Mali-T720 as found on Meizu Pro 5 and Bq Aquaris M10 Ubuntu Editions. Reading from FBO like taking screenshots does not produce correct result otherwise. Initially reported at: https://launchpad.net/bugs/1557915 and https://launchpad.net/bugs/1559906 Change-Id: Ic875bd083277bf933863a3a50f8e874dd6e04365 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Cache results of multiple render target supportSean Harmer2016-02-141-2/+3
| | | | | | | | | | Change-Id: I9e706690d4d2ddaae6c84b0e24de7698704e862d Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | Provide optimised version of QOpenGLFramebufferObject::blitFramebufferSean Harmer2016-02-141-3/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Profiling shows that the call to glGetIntegerv() in this function that queries for the currently bound framebuffer is very expensive. It's the top hit on the CPU when profiling a Qt3D application using a Scene3D Qt Quick 2 item. The reason it is so expensive is that this call forces the OpenGL driver to propagate the OpenGL state through all of the queued commands in order to answer the query. It may also induce a pipeline stall depending upon the driver implementation. As this function gets called on the hot path every frame whenever using a Scene3D item and may also be called in plain Qt Quick when using ShaderEffect items; the layer property of QQuickItem; or when updating the Qt Quick glyph cache texture on Core profile contexts, it is very much worthy of optimization. This commit adds an overload of the blitFramebuffer() call that allows the caller to provide a policy that can either: * keep the existing behavior of restoring the previous framebuffer binding, * restore the default framebuffer, or * don't restore anything and let the caller be responsible for it. This will allow consumers such as Qt Quick and Qt 3D to use the optimised code path. The existing overloads of blitFramebuffer() retain the current behavior by calling with the policy to restore the previous framebuffer binding. Upon making this change, the cost of blitFramebuffer() is massively reduced. A follow up commit will optimize this further. Change-Id: I417abb7da916ae5088f6817e4eff8ea02c8c5803 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* | QtGui: eradicate Q_FOREACH loops [needing qAsConst()]Marc Mutz2016-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | ... by replacing them with C++11 range-for loops. To avoid detaches of these mutable Qt containers, wrap the container in qAsConst(). Change-Id: I90fd517ad542ef92034403c15ebb8300a56ac693 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | QtGui: eradicate Q_FOREACH loops [already const]Marc Mutz2016-02-111-2/+2
| | | | | | | | | | | | | | | | | | (or trivially marked const) ... by replacing them with C++11 range-for loops. Change-Id: I3cce92b9d77a3ff96fad877d1d989145e530646f Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-211-2/+0
|\| | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/io/qiodevice_p.h src/corelib/kernel/qvariant_p.h src/corelib/tools/qsimd.cpp src/gui/kernel/qguiapplication.cpp tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp Change-Id: I742a093cbb231b282b43e463ec67173e0d29f57a
| * Avoid checking the fb status in every bindLaszlo Agocs2016-01-181-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On some drivers (e.g. NVIDIA, tested on Windows) the status check is apparently expensive. A simple FBO test app rendering into the FBO on every frame (and thus calling bind()) shows a 19-21% CPU usage. With the patch this gets reduced to 0.8-1%. The check is fairly useless too - whenever creating attachments, the status is checked, so d->valid is up-to-date. Task-number: QTBUG-50496 Change-Id: Ie9f0db34e5c2bc1a1141c734ca0b318419013c0d Reviewed-by: Allan Sandfeld Jensen <allan.jensen@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>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-3/+14
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| * Blacklist PowerVR Rogue G6200 (v1.3) from supporting BGRA.Christian Strømme2015-09-181-3/+14
| | | | | | | | | | | | | | | | | | | | The drivers for PowerVR Rogue G6200 reports BGRA support, but reading from the FBO does not produce the correct result. Initially reported here: http://launchpad.net/bugs/1436074 Change-Id: Ia173817d557446818d08609d943eb3573b900cc3 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* | Fix some qdoc warnings.Friedemann Kleint2015-09-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | qtbase/src/corelib/io/qdebug.cpp:698: warning: Class QDebugStateSaver has no \inmodule command; using project name by default: QtCore qtbase/src/gui/opengl/qopenglframebufferobject.cpp:1138: warning: Can't link to 'takeTextures()' qtbase/src/gui/opengl/qopenglframebufferobject.cpp:1159: warning: Can't link to 'takeTextures()' qtbase/src/gui/opengl/qopenglframebufferobject.cpp:953: warning: No such parameter 'height' in QOpenGLFramebufferObject::addColorAttachment() qtbase/src/gui/opengl/qopenglframebufferobject.cpp:953: warning: No such parameter 'width' in QOpenGLFramebufferObject::addColorAttachment() qtbase/src/gui/opengl/qopenglframebufferobject.cpp:953: warning: Undocumented parameter 'size' in QOpenGLFramebufferObject::addColorAttachment() qtbase/src/gui/painting/qpaintdevice.qdoc:80: warning: Undocumented enum item 'PdmDevicePixelRatioScaled' in QPaintDevice::PaintDeviceMetric qtbase/src/testlib/qbenchmarkmetric.cpp:154: warning: Invalid use of '\relates' (already a member of 'QTest') qtbase/src/testlib/qbenchmarkmetric.cpp:81: warning: Invalid use of '\relates' (already a member of 'QTest') qtbase/src/widgets/dialogs/qdialog.cpp:152: warning: Can't link to 'QCloseEvent::ignore()' qtbase/src/widgets/dialogs/qdialog.cpp:557: warning: Can't link to 'QApplication::quit()' qtbase/src/widgets/kernel/qwidget.cpp:8326: warning: Can't link to 'QCloseEvent::accept()' qtbase/src/widgets/kernel/qwidget.cpp:8326: warning: Can't link to 'QCloseEvent::ignore()' qtbase/src/widgets/kernel/qwidget.cpp:9300: warning: Can't link to 'QWheelEvent::accept()' qtbase/src/widgets/kernel/qwidget.cpp:9300: warning: Can't link to 'QWheelEvent::ignore()' qtbase/src/widgets/kernel/qwidget.cpp:9321: warning: Can't link to 'QTabletEvent::accept()' qtbase/src/widgets/kernel/qwidget.cpp:9321: warning: Can't link to 'QTabletEvent::ignore()' qtbase/src/widgets/kernel/qwidget.cpp:9373: warning: Can't link to 'QKeyEvent::ignore()' Change-Id: I97ae85398181645c1054c303e5c8a87deb619409 Reviewed-by: Martin Smith <martin.smith@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* | Support MRT in QOpenGLFramebufferObjectLaszlo Agocs2015-07-291-146/+349
|/ | | | | | | | | | | | Introduce overloads in the API to allow specifying multiple color attachment sizes and formats. When these are in use and MRT is supported, a texture or renderbuffer is created for each of GL_COLOR_ATTACHMENT0, 1, 2, ... [ChangeLog] Added support for multiple render targets in QOpenGLFramebufferObject Task-number: QTBUG-39235 Change-Id: Ie7cfd81d1b796a9166b80dff7513aafe0120d53d Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
* Use the default fbo in Qt sense in blitFramebufferLaszlo Agocs2015-04-081-2/+4
| | | | | | | | | | | QOpenGLFramebufferObject::blitFramebuffer() passes 0 when no FBO is specified. This goes against the rest of the framework where the default fbo is what QOpenGLContext::defaultFramebufferObject() returns. This becomes significant with QOpenGLWidget and on iOS. Task-number: QTBUG-45328 Change-Id: Iaeb82cd3786ad395116679c9626bdcb10e93b4e3 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* 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>
* Merge remote-tracking branch 'origin/5.4.0' into 5.4Simon Hausmann2014-12-051-3/+1
|\ | | | | | | Change-Id: I0cd11cbe95693b78450ea81a0187760f4a6a8b5f
| * QOpenGLFramebufferObject: pass sized format also with dynamic GLAndrew Knight2014-12-011-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The GL_RGBA8_OES define is not in scope for dynamic OpenGL builds, so pass in GL_RGBA8 instead (it is defined as the same value, 0x8058) when in ES mode. The functionality check already ensures the extension is available, so the ifdef guards can be removed. This fixes default multisampled FBO creation under ANGLE when using -opengl dynamic. Task-number: QTBUG-40921 Change-Id: Iac4b7e230a463c27b61af75c3307421f9deac856 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>