summaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Return event id instead of deleted eventJesus Fernandez2018-02-151-10/+15
| | | | | | | | | | | | | Under some situations, the QWebGLFunctionCall is destroyed before getting the event id. Increasing the lifetime of the event makes no sense so instead of that, the id can be returned and passed to the query function. Task-number: QTBUG-66031 Change-Id: Iba755b8154fba3fadf81a1a73c87d16f0e31c4f3 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 an unused functionv5.11.0-alpha1Jesus Fernandez2018-02-131-14/+4
| | | | | | | | | | Moved its debug message to the one place where its code was almost duplicated, rather than changing this place to call the function and changing the function to accurately do what it did; there's no real sense to a function to send the resize event to the application. Change-Id: I0de3dbbcc762515a282b0192fe7c382d260d4da8 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Force Threaded Render Loop modeJesus Fernandez2018-02-131-0/+5
| | | | | | | | | | It enforces use of the render loop's threaded mode. This enables the plugin to work on Windows and other environments whose render loop uses a different mode by default. Change-Id: I86901fa2c279126e4abb2d79efbb328778861113 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Fix key mapping of Enterv5.10.15.10.15.10Michael Brasser2018-01-173-38/+8
| | | | | | | | | | | | Qt's other platform plugins differentiate Key_Enter and Key_Return. Update the webgl plugin to do the same. Also remove unused code related to key mapping. Task-number: QTBUG-65686 Change-Id: I9e65b9413828f713f56d4942531f120b7d9cc6d7 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Fix deleteFramebuffers and deleteRenderbuffersMichael Brasser2018-01-151-2/+2
| | | | | | | | Ensure signatures and arguments align. Change-Id: I9537235ab6df6331ec49c6d5b3e37c9ebb8ba40c Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* WebSocket Server refactorJesus Fernandez2018-01-121-4/+7
| | | | | | | | | | | The variable is used only once. The function can be used in the condition. An error message is shown when the WebSocket Server fails to listen. Change-Id: Ia5b54d271ed72bc408d94d24eb275f7d83f290f1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Michael Brasser <michael.brasser@live.com>
* qCritical if the user creates a raster surfaceJesus Fernandez2018-01-091-0/+1
| | | | | | | | | | | | | Raster surfaces are not allowed due to performance problems. A qCritical message is shown if the user tries to use the plugin in a widget application. [ChangeLog][QtWebGL] The application shows an error message when trying to create a QBackingStore in an application. Task-number: QTBUG-65054 Change-Id: I78bfd2b2714d7dce1f802b1864216655e2d74406 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix browser resizeJesus Fernandez2018-01-092-0/+7
| | | | | | | | | | The application was not sending the notification to the browser to resize the canvas. The browser was notifying the application of the resize but the application was not acting on window resize. Task-number: QTBUG-65545 Change-Id: I1ebe3b45c80b8275c74e1e39de3e1a780b953e26 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add a comment to the sentinel checkJesus Fernandez2018-01-091-1/+1
| | | | | | | | A sentinel is sent in every message to find buffer encoding errors. Change-Id: I23e471517ffc3cdaa368a018308f585cd3d84624 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix glDrawArraysJesus Fernandez2018-01-091-1/+3
| | | | | | | | | | Fixes a bug introduced in f73929c2c6c9229f71470502faab14178d561157. The parameters of the current implementation of the glDrawArrays cannot be deduced from the function prototype but the buffer length can be used. Change-Id: I3296bfeff983f517d5a003e1f3c52de39b190b9d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Instantiate QCoreTextFontDatabaseEngineFactory, not just base classJesus Fernandez2018-01-091-1/+2
| | | | | | | | | We were instantiating the QCoreTextFontDatabase base class, which doesn't provide the full set of required functions. Task-number: QTBUG-65078 Change-Id: I4dbe50b594ca25c61f748170acf29fcaabc65c0b Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Only claim support for capabilities WebGL actually hasJesus Fernandez2018-01-091-7/+6
| | | | | | | | Don't fall back on the platform plugin's capability check, as that's irrelevant to the capabilities deliverable via WebGL. Change-Id: If3520adfa8b0dd9a61a46a3a17f57eadcde536d6 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>