summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Use QList instead of QVectorJarek Kobus2020-06-292-4/+4
| | | | | | Task-number: QTBUG-84469 Change-Id: Ibe91f99df65861fd9a272afa11e812c7664af702 Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
* Fix Clang 10 warning about inconsistent overrideThiago Macieira2020-05-051-1/+1
| | | | | | | | | | | qwebglintegration.h:62:32: warning: 'createPlatformOffscreenSurface' overrides a member function but is not marked 'override' [- Winconsistent-missing-override] Task-number: QTBUG-83666 Pick-To: 5.15 Change-Id: I99ab0f318b1c43b89888fffd160b5b8264692657 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
* Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-12-141-1/+1
|\ | | | | | | Change-Id: Ia6f1bc0234ebb5cda8ccdb639bb89b56d9c9acf5
| * Merge remote-tracking branch 'origin/5.14.0' into 5.14Qt Forward Merge Bot2019-12-131-1/+1
| |\ | | | | | | | | | Change-Id: I737802a3333b678ed5385faf22436c211fe6ed44
| | * Set the bytes per pixel for LUMINANCE_ALPHA to 2Andy Shaw2019-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This corrects a case where the camera was being used in a multimedia example that was being streamed and the colors were not correct as the some of the data was lost as a result. Fixes: QTBUG-79181 Change-Id: I8ab02b525c6d54b0005f00d06969aa3ebbac4d20 Reviewed-by: VaL Doroshchuk <valentyn.doroshchuk@qt.io>
* | | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2019-11-302-7/+7
|\| | | | | | | | | | | Change-Id: Ib3e9b7c940693816677e19e88948b349ae0af3b4
| * | Pass the timestamp as a string from JS to Qt to preserve precisionAndy Shaw2019-11-282-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the timestamp was passed as a double from JS to Qt while being hosted on an embedded Linux device it was losing the precision and as a result scrolling for a ListView does not work because it does not see the timestamp has having changed. So by passing it as a string instead means that it does not lose anything in the transition. Fixes: QTBUG-79842 Change-Id: Ia6bb8b713c0c5296a046ff3f7fddbc8e8249bbd6 Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
* | | Avoid initializing QFlags with 0 or nullptrFriedemann Kleint2019-11-261-4/+1
|/ / | | | | | | | | | | | | | | | | | | It is being deprecated. Remove the constructor initialization as member initialization is already present in the header. Change-Id: I249ef164d42eee378fb016e6162c154caaa8b2de Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
* / Don't send mouse events if we have touch supportAndy Shaw2019-11-221-0/+8
|/ | | | | | | | | | | | | | Unfortunately, using stopPropagation() and preventDefault() does not stop the mouse events from being sent for a touch. So we have to assume that they will be handled by Qt one way or the other and only send mouse events if we can tell that we are not on a touch screen or that the mouse event was not synthesized by WebGL. This was tested on a Windows host with an iPad and Microsoft Edge to verify it works in both cases correctly. Change-Id: Ia2297062b2e1a4894f52954dd567bab5b7df8fa1 Reviewed-by: Jesus Fernandez <jsfdez@gmail.com>
* Handle offscreen surfacesLaszlo Agocs2019-07-254-0/+33
| | | | | | | | | | | Implement createPlatformOffscreenSurface(). This way a QOffscreenSurface will not lead to creating a QWindow. Fairly dummy, and may need amending later, but fixes the immediate problem with the - still default - direct OpenGL code path of Qt Quick. Task-number: QTBUG-76993 Change-Id: Ia4198163fc91d3f353d0067a2a807ec075168ace Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Eradicate Q_FOREACH loops and mark the module free of themMarc Mutz2019-07-011-1/+2
| | | | | | | | Q_FOREACH is scheduled for deprecation, or at the very least banned from use in Qt's own implementation. Change-Id: Ia83851d88da9fa94c901598a7500cf572db68b4e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Eradicate Java-style iterators and mark the module free of themMarc Mutz2019-07-011-3/+2
| | | | | | | | Java-style iterators are scheduled for deprecation, or at the very least banned from use in Qt's own implementation. Change-Id: I3b65526968551baf48d1acb1e7184a3800092b56 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove unused public interfacev5.13.0-beta3v5.13.0-beta2Jesus Fernandez2019-04-011-1/+0
| | | | | | | Due to recent changes, the public interface is no longer required. Change-Id: I69e532726e77592a3d7454b3a4f3230aa9cafe08 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix build - screen maintenance functions moved to QWSIJesus Fernandez2019-03-291-3/+3
| | | | | | | | | | | This is an ammendment to 01e1df90a7debd333314720fdd5cf6cd9964d796 in qtbase. Stop using screenAdded/destroyScreen deprecated functions. Task-number: QTBUG-74816 Change-Id: I6ce96e5dcd74e83560800de571d9530e4305e9ad Reviewed-by: Liang Qi <liang.qi@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-alpha1Qt Forward Merge Bot2019-02-021-7/+6
|\ | | | | | | Change-Id: If747100274972bf953c48867ab68e6636d61dbe2
| * Destroy loading canvasJesus Fernandez2019-01-241-7/+6
| | | | | | | | | | Change-Id: I948982b57f128bd3bd9832d0f877d2fe7e65ba03 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Add platform plugin parameter for websockerserverMaurice Kalinowski2019-01-306-10/+27
|/ | | | | | | | | | | When using the webgl backend in a container, one needs to specify the port of the websocket server in addition to the http server. While using QT_WEBGL_WEBSOCKETSERVER is an option, it requires to pass a hostname in addition. Change-Id: Iefce12f049a81711a52586d60dd34bddbb9de12e Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix calling convention in Win32Jesus Fernandez2018-12-051-4/+10
| | | | | | | | | | | | | A mismatch with the calling convention was messing up the stack of the caller function. OpenGL calls in Win32 are expected to be using the call convention defined in GL_APIENTRY instead of the compiler default. Task-number: QTBUG-72129 Change-Id: I460b083a2cb03a297904a2bcfd13e7e704b2e136 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Check the pointer before dereferencing it to avoid crashesv5.12.0-beta4Jesus Fernandez2018-10-241-0/+2
| | | | | | Change-Id: I238698a5f74b426761eb524d88d284176738d5ae Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
* Disable mouse tracking by defaultv5.12.0-beta3v5.12.0-beta2Jesus Fernandez2018-10-122-3/+8
| | | | | | | | | | | It will improve the performance and fix problems with code not optimized for the new QtQuick scenegraph. A new environment variable is added in this patch to enable it, QT_WEBGL_TRACKING. Change-Id: Id2b87c5baa16822008a146051fa43be12db0a1ed Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix rendering updatev5.12.0-beta1Jesus Fernandez2018-10-011-0/+3
| | | | | | | | | | | | | | | This patch fixes the rendering updates after the commit 4d15f393a76cfcc4d54f311884fedac5bf0f72ee. Ensures the render update after hiding the window. It sets the value of updateRequestPending to false to allow continuing rendering after a client disconnects. Task-number: QTBUG-70191 Change-Id: I1e72f5af8ee3f7deebb2e35081961764e30db0d2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Use reference in range for to avoid copyJesus Fernandez2018-09-251-1/+1
| | | | | | Change-Id: I5441025990c36226acc2065d7dde8f5220182350 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Reload the browser when the socket disconnectsJesus Fernandez2018-09-241-0/+1
| | | | | | | | | | | | | | It tries to reload the browser to try to reconnect. If the remote application closes, the browser will show the default disconnected page. Doing this the user will know the session ended and it will free the resources required to have a WebGL context alive in the browser. [ChangeLog][QtWebGL][General] Reload the browser when the WebSocket disconnects. Change-Id: I724d74ef6e44ff6b89e557f77f65fa827198a47d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix -Wzero-as-null-pointer-constantJesus Fernandez2018-09-141-1/+1
| | | | | | Change-Id: Iafcd7eeda4023027111b95d101d569a8ceb625d6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix -Wold-style-castJesus Fernandez2018-09-141-12/+17
| | | | | | Change-Id: Iebd13c88a34477fd80c5a6be29d6cf60d680d89b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Use QWebGLFunctionCall::addParametersJesus Fernandez2018-09-141-5/+1
| | | | | | | | It can add all the parameters in a single call. Change-Id: I3b6352459cfa39d0dc3760dea78c587ec709d5fa Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Move strings variable from global to local scopeJesus Fernandez2018-09-141-2/+1
| | | | | | Change-Id: I8934a434c8d87cb72b28c80de5737a7dd0c073ef Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix OpenGL context crashJesus Fernandez2018-09-111-6/+6
| | | | | | Task-number: QTBUG-70458 Change-Id: I00efefeb9f8c0bf245c77e68c285e596c60755e1 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Silence warning about paddingJesus Fernandez2018-07-101-1/+1
| | | | | Change-Id: I640cd8eeaf468fc004ae2b34c00518d3c4b62866 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Remove unused variableJesus Fernandez2018-06-051-1/+0
| | | | | | | | It removes rotatingAngle. It was being serialized in the browser but ignored by the QPA plugin. Sending it is not necessary. Change-Id: I1cc7a4aba10886887fe7ec037139f5c943425494 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Normalize object notationJesus Fernandez2018-06-051-97/+97
| | | | | | | | It removes whitespaces before the colon in object creation. Change-Id: I54d8bc5e5e5a8284dfdd8e0c3a35961f87134196 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix typoJesus Fernandez2018-06-042-8/+8
| | | | | | | Replace radious with radius. Change-Id: Ief1373a6eeaa54490ca608d633294438274fa15c Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Prefer object notation over bracesJesus Fernandez2018-06-041-43/+45
| | | | | | | | JSHint recommends it. Change-Id: I70181f0012ad79cafd73071c268c9f1ae05ba42b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix critical messagesJesus Fernandez2018-06-011-2/+2
| | | | | | | | | Fixes a misleading message. Removes the function name from the message. Change-Id: Ie0ef0c7dc0b0fc4b1e2ee4665e2b7aacdd111b5c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix detection of invalid parameterJesus Fernandez2018-05-251-1/+1
| | | | | | | | It fixes the invalid port check. The condition was dead code due to a previous check. Change-Id: I22bb7497f9577aeed0140542337c0a13200e37a8 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Convert port string to ushortJesus Fernandez2018-05-221-1/+1
| | | | | | | Removes clazy warning. Change-Id: Ib019497a8b3f8812ddf51ae59373a7a9501c9b21 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Fix Clang 6 warning about not using the override keywordThiago Macieira2018-04-271-1/+1
| | | | | | | | /qwebglwindow.h:64:19: warning: 'screen' overrides a member function but is not marked 'override' [-Winconsistent-missing-override] Change-Id: I3840d727dee443318644fffd1529390d71aae8d8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Fix warningsv5.11.0-beta4Jesus Fernandez2018-04-051-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "qwebglintegration.cpp", line 216: warning #68-D: integer conversion resulted in a change of sign WId winId = -1; ^ "qwebglintegration.cpp", line 491: warning #1215-D: function "QWindowSystemInterface::handleMouseEvent(QWindow *, ulong, const)" QPointF &, const QPointF &, Qt::MouseButtons, Qt::KeyboardModifiers, Qt::MouseEventSource) [with] Delivery=QWindowSystemInterface::DefaultDelivery]" (declared at line 85 of "/home/qt/work/install/include/QtGui/5.11.0/QtGui/qpa/qwindowsystemin ce.h") was declared deprecated" QWindowSystemInterface::handleMouseEvent(platformWindow->window(), ^ "qwebglintegration.cpp", line 513: warning #1215-D: function "QWindowSystemInterface::handleWheelEvent(QWindow *, ulong, const QPointF &, const QPointF &, int, Qt::Orientation, Qt::KeyboardModifiers)" (declared at line 153 of "/home/qt/work/install/include/QtGui/5.11.0/QtGui/qpa/qwindowsystemin terface.h") was declared deprecated QWindowSystemInterface::handleWheelEvent(platformWindow->window(), ^ Change-Id: I0b83cc38b6567f3819890c74e973bba52fe2acf8 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Silence complaints about bitwise operationsv5.11.0-beta3Jesus Fernandez2018-03-271-0/+3
| | | | | | | | | | JSLint complains about the bitwise operations. From documentation: Bitwise operators are very rare in JavaScript programs and quite often & is simply a mistyped &&. Change-Id: Ibda95e06bb062b71d4b5866a06010d57a6f321a6 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove old partial binary message workaroundJesus Fernandez2018-03-272-28/+6
| | | | | | | | | | | | | | | | The original implementation of the plugin was created using Qt 5.8. A workaround was added to avoid partial binary messages. Apparently, this is not happening anymore, so the workaround is not needed anymore. Removing the workaround can provide a performance boost since the application sends the binary message in a single message and the browser does not need to rebuild the message. Change-Id: I18e7a1c559d8a5d677ab66131098a6a1e855d985 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix browser warning and use addEventListenerJesus Fernandez2018-03-221-8/+8
| | | | | | | | | | | | | [Violation] Added non-passive event listener to a scroll-blocking event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952 This patch also uses addEventListener instead of assigning the callback directly to the function to be able to mark the event as passive. Change-Id: I6c2336eed0cc4bc562fff09a08737815eaa864ce Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add missing semicolonsJesus Fernandez2018-03-221-14/+14
| | | | | | Change-Id: I0d4feade770b607e6cc3dc304038281a79097c4a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove unnecessary semicolonJesus Fernandez2018-03-211-1/+1
| | | | | | | Change-Id: I30c344d41514fa46bac1cb00b6cd54edf13c6397 Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Reuse body variableJesus Fernandez2018-03-211-2/+1
| | | | | | | Change-Id: I988cd81090557f65b880d55f01958e82490ada85 Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove unused variablesJesus Fernandez2018-03-211-3/+1
| | | | | | | Change-Id: I9a84f151fdb0c551da141ff2a1641a027bca9163 Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add an environment variable to set the WebSocket Server addressJesus Fernandez2018-03-211-2/+14
| | | | | | | | | | | | | | Using the QT_WEBGL_WEBSOCKETSERVER environment variable the WebSocket Server listen address and port can be configured. [ChangeLog][QtWebGL] QT_WEBGL_WEBSOCKETSERVER environment variable can be used to configure the WebSocket Server address and port. Task-number: QTBUG-65241 Change-Id: I3035aa7cc18d469293a4d55bc36e91cfae5ec03a Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Jason Hihn <jhihn@gmx.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Allow customizing the maximum texture sizev5.11.0-beta2Jesus Fernandez2018-03-091-2/+6
| | | | | | | | | | | | | | | | | | | | | Adds a new environment variable, QT_WEBGL_MAX_TEXTURE_SIZE, to configure the maximum texture size. The maximum value was hardcoded to 512 to save bandwidth, but it was giving problems when a high number of glyphs need to be stored in the GPU. After this patch, the maximum texture size allowed by WebGL will be used. The user can set the value to a custom value to optimize the bandwidth if the default value is too high, text rendering issues can happen. [ChangeLog][QWebGLContext] Fix text rendering issues when a lot of different glyphs are used. [ChangeLog][QWebGLContext] QT_WEBGL_MAX_TEXTURE_SIZE environment variable added to customize the maximum texture size. Task-number: QTBUG-66682 Change-Id: Id8a46daf4718a76fcf7d6a2c2cf831f3d6db372d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove spurious blank linesv5.11.0-beta1Jesus Fernandez2018-02-191-2/+0
| | | | | Change-Id: I67a243c3e5f90c58f095824dd12e80b2306cc3ed Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Show more information when the HTTP server fails to initializeJesus Fernandez2018-02-153-2/+12
| | | | | | | | | | When the HTTP server fails to initialize a simple message was shown in the terminal. This patch adds the error string from the QTcpServer to give more information about the problem. Change-Id: Ic52d4a78991e1c5a20f2712ca6cbbdd0738d47e0 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Correct variable name in webqt.jsxEdi Cikovic2018-02-151-1/+1
| | | | | | | | Variable context was renamed to currentContext as glUniform3fv wasn't working as a result of the wrong variable name. Change-Id: I0946441ea063eb6104066a43f963da67bee4e0d8 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>