summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Don't build when OpenGL is disabledJesus Fernandez2018-01-091-1/+1
| | | | | | | | | | The build will fail. Task-number: QTBUG-65391 Change-Id: I26748f48f24ae143310b0f28003553039485d82e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* 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>
* Bump versionOswald Buddenhagen2017-12-201-1/+1
| | | | Change-Id: I33a7ec32da1777e293596f54d4a8de3432f349f4
* Remove the parameterCount parameterJesus Fernandez2017-12-055-140/+156
| | | | | | | | | | | | Saves 4 bytes per message. Combined with other optimizations, this can save a lot of bandwidth. It also adds a new serialization type, the array. The parameter count cannot be removed without supporting arrays. Change-Id: I5f9c0901d50fb7d9613461d9860338e18dcbe3cd Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Do not send images filled with zerosJesus Fernandez2017-11-241-4/+15
| | | | | | | | | | | Detect if the image data is all zero: if so, send an empty buffer. This happens for a texture atlas, which is later filled with texSubImage2D, discarding the data originally sent, so not sending the data improves performance, notably reducing the loading time. Change-Id: Ife298bb5e8d7ee96b800f06fcb8371a6d08d2101 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Change variable nameJesus Fernandez2017-11-231-14/+15
| | | | | | | | It improves the readability of the code. Change-Id: Ice1021f23e439c74d1d8817bd2c432c7161c352b Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* Send numeric identifiers instead of stringsJesus Fernandez2017-11-234-11/+34
| | | | | | | | | Saves bandwidth by using a number instead of sending the full string to identify the GL command. Change-Id: I5e8010465729d7a9c320d0375582d3a92d76019d Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix Javascript errorJesus Fernandez2017-11-221-1/+1
| | | | | | | | | | | | 14:56:58.398 webqt.js:747 Uncaught ReferenceError: context is not defined at WebGLRenderingContext.gl.uniform3fv (webqt.js:747) at execGL (webqt.js:944) at handleGlesMessage (webqt.js:1088) at handleBinaryMessage (webqt.js:1073) at WebSocket.socket.onmessage (webqt.js:1129) Change-Id: Ifa77c853b4cec29f21cc19ffc5b86b741d8ef5ab Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Move the WebGL GLFunction hash into the GLFunction classJesus Fernandez2017-11-221-6/+7
| | | | | | | | | | This change prepares the way for new ways to find local and remote function information. Change-Id: Ie18952720d3570af3037e1bd4f8d16c8bfe8d6dc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Use a dictionary instead of an arrayJesus Fernandez2017-11-221-44/+38
| | | | | | | | | | This gives faster look-ups when checking if a function needs to return a value to the application. Change-Id: I732af378b826359e094822d602a6b8c424a65ab0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Don't send size as a bufferSubData parameterv5.10.0-rc3v5.10.0-rc2v5.10.0-rc1v5.10.0Jesus Fernandez2017-11-151-1/+1
| | | | | | | | | | The 'size' is not required as a parameter, it's handled by the 'ArrayBuffer' directly. This fixes the WebGL 'bufferSubData' function which has a different argument list than 'glBufferSubData'. Change-Id: I561de68057d456ac3733ca0e0086e8b874b7e8ea Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Handle null values in bufferData functionJesus Fernandez2017-11-151-1/+1
| | | | | | | | The browser was stopping the execution when receiving a 'null' value for the data parameter. Change-Id: I6cc57b5cb90ee1d2bb0eaf7866028c959b299154 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix conflicting DEPTH/STENCIL/DEPTH_STENCIL attachments warningJesus Fernandez2017-11-141-1/+7
| | | | | | | | | | | | | | The hack, to convert two consecutive calls to glFramebufferRenderbuffer with parameters GL_STENCIL_ATTACHMENT and GL_DEPTH_ATTACHMENT, was not working properly. Now the call using GL_DEPTH_ATTACHMENT is ignored and the call using GL_STENCIL_ATTACHMENT is converted into a GL_DEPTH_STENCIL_ATTACHMENT. This fixes the QuickItem ShaderEffect using a ShaderEffectSource as source item. Change-Id: Ic77bedf1837e8fa3a11818e6e5aaf8d990d6b8ea Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Improve JavaScript debug messagesv5.10.0-beta4Jesus Fernandez2017-11-031-4/+25
| | | | | | | | | | Tries to write the enumeration value for numbers if possible to improve readability of the parameters. Change-Id: I37163fb3b09be3de7280786ddbc2fd42dfef8750 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 unneeded dependency and includeJesus Fernandez2017-11-023-3/+0
| | | | | | | | | QOpenGLPlatformCompositor dependency was a leftover from a previous implementation and it's no longer needed. Task-number: QTBUG-64168 Change-Id: Iaff553a9102d3d1751343c5c32c53259fbbc2529 Reviewed-by: Robert Loehning <robert.loehning@qt.io>
* Fix gl.renderbufferStorage function typov5.10.0-beta3Jesus Fernandez2017-10-251-1/+1
| | | | | | | | | The gl.renderbufferStorage function was failing because the internal format was not converted to the supported WebGL format. Change-Id: I376ad19907ed69e54a6ee56e130f34cca211a7f9 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove useless commentsJesus Fernandez2017-10-251-70/+0
| | | | | | | | For further optimizations the values can be added manually. Change-Id: I63b66282443924b433a4f1a2cf1b324956f4c5ea Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove undefined variablesJesus Fernandez2017-10-251-3/+0
| | | | | | | | | | Makes no sense to keep a function reference to an undefined function. We are not overriding WebGL functions because they have a different name convention. Change-Id: Ibb3a65a50a73d26cfbf938fe72f2313f23bb07a2 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix extra ; warningJesus Fernandez2017-10-241-57/+57
| | | | | Change-Id: I83999c0e99608d763e180b7f4287bc19a7e1d430 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Add git-archive export optionsv5.10.0-beta2Antti Kokko2017-10-102-0/+3
| | | | | | | | Add .gitattributes and .tag file to store the sha1 of the commit being packaged. Change-Id: I1097db9707ddcbd427411e8fdf3734d95ba417b7 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Generate metadata for function parameters via variadic macrosv5.10.0-beta1Michael Winkelmann2017-10-041-390/+406
| | | | | | | | | | | | I changed the QWEBGL_FUNCTION macro, so metadata for function parameters like name and type are available at runtime. This data can be sent once to the client, so it does not need to be retransmitted for each function call. I also made macro QWEBGL_FUNCTION_POSTEVENT which reduces redundancies for non-waiting OpenGL commands. Change-Id: I84a3b151feb9ba8d2e8d211de5f8798d0c4dabf4 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Fix multitouch support for mobile browsersAleksei Ilin2017-10-042-42/+73
| | | | | | | | | | To work properly on each touch change all touch points have to be provided, not only the changed ones. The not changed touch points should have state Qt::TouchPointStationary. Change-Id: I13ea0336de489e02a00a6ff642bf6e1d8261bc21 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Allow users to disable the loading/waiting screen animationJesus Fernandez2017-10-033-0/+8
| | | | | | | | | | | | | Allows the user to disable the browser loading animation for debugging purposes. WebGL Inspector tries to debug the loading screen instead of the proper WebGL context. It can be disabled setting the QT_WEBGL_LOADINGSCREEN environment variable to '0' or sending the 'noloadingscreen' parameter to the QPA plugin. By default, the browser will show the loading screen. Change-Id: I5d84173d79c3f3fc67b776ba2f8fc8928a0194a1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Show client side debug information in debug buildsJesus Fernandez2017-10-031-0/+8
| | | | | | | | Eases the debugging in debug builds. In release no additional information is shown. Change-Id: I14b4a60235a0ca38e1350725e99242c456fdb290 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Wrap system information in sysinfo keyJesus Fernandez2017-10-032-10/+16
| | | | | | | | | Refactors the code to allow sending configuration values during connection. There is no need to delete the type from the connect object any more. Change-Id: Ide5df8fd77ddf556558f387d2846f927ac50e716 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix memory corruptionJesus Fernandez2017-10-021-9/+32
| | | | | | | | | | | The previous implementation was adding the parameters to the function call after posting the event causing a random crash or memory corruption. Adding a function parameter to the createEvent function to be called before posting the event fixes the problem. Change-Id: I924cfe490372091afc6219d097d8c6bf17a43045 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Fix aligmentJesus Fernandez2017-10-021-1/+1
| | | | | | | Change-Id: I66754f445e770f1c33a8c8f04d7736fea3cdb8f5 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 GL command generation helper functionsJesus Fernandez2017-09-283-1509/+562
| | | | | | | | Allows a faster and cleaner implementation of GL commands to reuse as much code as possible. It will ease future changes. Change-Id: If473a82c873a73c3c4c88075917400754d4159e1 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Fix indentationJesus Fernandez2017-09-211-2/+1
| | | | | Change-Id: I34a91efac3ff9b60c2b9c805e463c9f8ab81fc8e Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove identifier from messages not waiting for answerJesus Fernandez2017-09-213-9/+22
| | | | | | | | | | Saves 4 bytes per message not waiting for answer. Combined with other optimizations can save a lot of bandwidth. Change-Id: I360ba88d3b75db9278d6aff6c397e3ef8c99b02e 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>
* Fix NULL data handlingJesus Fernandez2017-09-201-1/+1
| | | | | | | | | It fixes the handling of NULL data. Before this patch, the wrong byte array was used to check if the buffer is NULL. Change-Id: Ia635e11a9ac33a157c28d4af99f625e33e8fa128 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Remove qCCriticalJesus Fernandez2017-09-201-1/+0
| | | | | | | | | | The qCCritical was warning about not available functions in QWebGLContext::getProcAddress. This function is called during the creating the OpenGL context is not giving any useful information about the usage of the functions. Change-Id: Ic5ef6b7c3da5752363845e4423aa9ae01a47f103 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix rsize and rname in glGetActiveUniform functionJesus Fernandez2017-09-201-2/+2
| | | | | | | | | | The rsize and rname variable were assigned to the rtype instead of rsize and rname. Change-Id: Iceab3c6062ccd86c5bb7131b55fc4c31084dff78 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>
* Don't exclude qtwebglplugin for the tvOS buildv5.10.0-alpha1Jake Petroules2017-08-071-1/+1
| | | | | | | | | It compiles fine there. Amends 1fa0861adc867bf2e44dfb642ae0bc168e616c2a Change-Id: Ic3dedc255b0b2ad2428c6680065279f9b9dc27ca Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* Prospective "build fix" for watchos/tvosSimon Hausmann2017-08-051-1/+1
| | | | | | | | After commit dd09fcb43327fae721603a17bd86193397d7be6a it seems the build on those got "enabled". Let's disable it again for those two platforms. Change-Id: I8fe49b582c58ba9b6532d5bf410197f4a369c2e6 Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
* Add macOS supportJesus Fernandez2017-08-043-3/+8
| | | | | | Change-Id: Id9e89530d7b7c4fb21bfede7a79a46dcbcbdcafb Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Allow Desktop OpenGL builds of QtJesus Fernandez2017-08-032-1/+2
| | | | | | | | | | | | | Since OpenGL ES2 is just a subset of OpenGL and Qt Quick is not using features from Desktop OpenGL it is safe to allow non-ES2 versions of Qt. In case of a requested function is not available a message will be shown and a null function is returned in getProcAddress function. macOS cannot be allowed because it is not possible to access the QCocoaEventDispactcher from another platform plugin. Change-Id: I55c51c31e2b78978a6dcb6cc4d99ec7502392b40 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Fix potential QT_ASCII_CAST_WARNJesus Fernandez2017-07-251-5/+5
| | | | | | | Uses the QLatin1String instead of comparing a QString and c-string. Change-Id: I86ed4da24894ae3f665150017b9db0185b0502fd Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Fix favicon.ico loadJesus Fernandez2017-06-281-1/+1
| | | | | | | | The ico file was loaded using QIODevice::Text causing a corruption of the data. Change-Id: I954116d1693a63ba25f2f71daf72acef33a887b2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* Add Qt WebGL platform pluginJesus Fernandez2017-06-2733-0/+7205
| | | | | | | Done-with: Michael Winkelmann <michael.winkelmann@qt.io> Change-Id: I6632475956393116af8885f42ba557e35d2b0985 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Initial empty repositoryOswald Buddenhagen2017-06-060-0/+0