summaryrefslogtreecommitdiffstats
path: root/src/core/gl_surface_qt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Standardize override declarationAllan Sandfeld Jensen2017-04-211-18/+18
| | | | | | | | Update our overrides to Qt coding standard getting rid of Q_DECL_OVERRIDE and redundant virtual declarations. Change-Id: Id8b0750eb05c51fc8f50cac4000a811eebcbf918 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Adaptations for Chromium 56Allan Sandfeld Jensen2017-03-271-2/+13
| | | | | Change-Id: I78240d7956de4716757761fc6517f031b4adb822 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Fix OpenGL for embedded buildsAllan Sandfeld Jensen2017-03-201-2/+2
| | | | | | | | Sets the external ozone platform and make sure we don't set bad QT_LIBDIR defines for libEGL and libGLESv2 when not doing cross builds. Change-Id: I60eada3c93224a3aa3a105b007d669932516d331 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Simple adaptations to Chromium 55Allan Sandfeld Jensen2017-03-011-5/+20
| | | | | | | The simplest adaptations to API and build changes in Chromium 55 Change-Id: I923fa188690a04902492317807f72f006bcab9c6 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Use surfaceless context if necessaryAkihiko Odaki2016-12-081-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | The support for surfaceless context was disabled in commit 9cc97f0c63049a8076476acc89c875c9e240abfb, which says: > Using surfaceless EGL surface on imx6 embedded device crashes webengine > with backtrace in gpu driver. It was added in commit bfcbdc3ab42880dc37ffa7174af96928ccf25f03, which says: > This patch is a port of commit 4b0cac9dfeebb73f21a11e10e6a2bc7bddbe889b > in Chromium for Qt WebEngine. > The based commit says: > (snip) > > the creation of a dummy offscreen surface. This would also enable > > support for offscreen rendering on platforms (i.e Ozone-Wayland) which > > donot support pbuffer surfaces. > > Some platforms supported by QPA, such as Mesa 3D DRI2 with drm and > wayland backend also don't support pbuffer surfaces. Considering those cases, this change enables surfaceless context only if pseudo surfaceless context made of surface context is not available. Change-Id: I015421ebbbc357d48313e09d4f7a0369bb956521 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Merge remote-tracking branch 'origin/5.7.1' into 5.8.0Liang Qi2016-12-071-2/+3
|\ | | | | | | Change-Id: I4f73844c730d52b00194ab6ff4abe35c59f7ef68
| * Disable surfaceless context supportv5.7.1Michal Klocek2016-12-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | Using surfaceless EGL surface on imx6 embedded device crashes webengine with backtrace in gpu driver. Since this feature requires a bit more testing on embedded platforms disable support for the 5.7.1 release. Task-number: QTBUG-57290 Change-Id: I3ed5b6fc173d184486316a2c3d899a88d4b1de76 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-11-111-23/+32
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/core/content_browser_client_qt.cpp src/core/content_browser_client_qt.h src/core/gl_surface_qt.cpp src/core/print_view_manager_qt.cpp src/core/web_contents_delegate_qt.cpp src/core/web_engine_context.cpp src/webengine/doc/src/qtwebengine-overview.qdoc src/webengine/doc/src/qtwebengine-platform-notes.qdoc src/webenginewidgets/render_widget_host_view_qt_delegate_widget.cpp src/webenginewidgets/webenginewidgets.pro sync.profile Change-Id: I44495f4d899580c882d6b86d68d7f6b77c8e91f6
| * Make Linux QPA combinations more robustAllan Sandfeld Jensen2016-11-091-23/+32
| | | | | | | | | | | | | | | | | | | | | | Use resourceForIntegration to get egldisplay since not all QPA return a egldisplay for context (in particular xcb_egl). Implement EGL fallback for linux desktop builds, to make Wayland work without an X11 server present. Change-Id: Idcead42250fa00a36e50c082711f5618fd213556 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Adaptations to Chromium 53Allan Sandfeld Jensen2016-09-141-31/+41
| | | | | | | | | | Change-Id: I15053486edfd42ee607250b4f14fb6eaa325c959 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Adaptations to Chromium 52Allan Sandfeld Jensen2016-09-141-1/+0
| | | | | | | | | | Change-Id: Idf8a511ba26d263fd9d014d87d5e1101d706da71 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Merge branch '5.7' into devAllan Sandfeld Jensen2016-06-141-2/+80
|\| | | | | | | Change-Id: I1ecb615b8df1303c27b6609970502920123b3610
| * Merge remote-tracking branch 'origin/5.6' into 5.7Allan Sandfeld Jensen2016-06-111-2/+80
| |\ | | | | | | | | | Change-Id: Ib010ede9756fb02992a3276ae7ec90ef1ab56a00
| | * Add support for Khr_surfaceless_contextAkihiko Odaki2016-06-031-1/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch is a port of commit 4b0cac9dfeebb73f21a11e10e6a2bc7bddbe889b in Chromium for Qt WebEngine. The based commit says: > http://www.khronos.org/registry/egl/extensions/KHR/EGL_KHR_surfaceless_context.txt > > This patch adds support in GLSurfaceEGL to be able to use > surfaceless context when supported by the drivers. This avoids > the creation of a dummy offscreen surface. This would also enable > support for offscreen rendering on platforms (i.e Ozone-Wayland) which > donot support pbuffer surfaces. Some platforms supported by QPA, such as Mesa 3D DRI2 with drm and wayland backend also don't support pbuffer surfaces. Change-Id: I8378957931d79b691392b6fbe13082b8610b8fe6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Fix logging code in GLSurfaceQtEGL::Initialize()Akihiko Odaki2016-06-011-1/+1
| | | | | | | | | | | | | | | Change-Id: I98cb984548d833121d7e3102b9d89ccc7c8a11b6 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| | * Fix crashes due to qputenv being called after Chromium initialization.Alexandru Croitor2016-04-011-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qputenv() call inside gl_surface_qt.cpp, which is executed on a GpuChildThread, can reallocate the process environment structure, and it is possible that at the same time the main thread calls getenv, which will dereference a pointer to the freed environment structure, essentially causing a use-after-free crash. Make sure the qputenv() call happens before Chromium initialization starts, so no thread-race can occur. Change-Id: I4ecbdc8bf2abbe45f7d6c5d2633dc9fe27f51e66 Task-number: QTBUG-52124 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> (cherry picked from commit 76c61aa1400ef2def204c3732e30e08e40631e8d)
* | | Basic porting to Chromium 51Allan Sandfeld Jensen2016-06-011-4/+5
|/ / | | | | | | | | | | | | Trivial changes in methods, arguments and types. Change-Id: Ic707c376249f816268223e696ed5f6251df1f85f Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Fix crashes due to qputenv being called after Chromium initialization.Alexandru Croitor2016-03-311-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The qputenv() call inside gl_surface_qt.cpp, which is executed on a GpuChildThread, can reallocate the process environment structure, and it is possible that at the same time the main thread calls getenv, which will dereference a pointer to the freed environment structure, essentially causing a use-after-free crash. Make sure the qputenv() call happens before Chromium initialization starts, so no thread-race can occur. Change-Id: I4ecbdc8bf2abbe45f7d6c5d2633dc9fe27f51e66 Task-number: QTBUG-52124 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* | Basic adaptation to Chromium 49Allan Sandfeld Jensen2016-03-071-2/+13
| | | | | | | | | | | | | | | | Converts types, callbacks and headers to match Chromium 49. Task-number: QTBUG-51173 Change-Id: I544ef46e187105e250fea1b48b72d2c81a906640 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* | Unify license header usage.Jani Heikkinen2016-02-011-11/+14
|/ | | | | | | | | Update files using old header.LGPL3 to use header.LGPL Update files using old header.FLD to use new header.FDL Update files using old header.BSD to use new header.BSD Change-Id: I36a67aaa8c3ca6c7946308defc9c03c3571a7d23 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
* Read egldisplay from QPAAllan Sandfeld Jensen2015-09-061-5/+0
| | | | | | | | Follow up to 6e6e2655bf03f2cc903f17d9e5283a81a4a837c2, we should get egldisplay from QPA, otherwise we end up with the wrong values. Change-Id: I668511a1ae9ab6f4f5132707ae03afc3fe3722ac Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Rebasing on Chromium 45Allan Sandfeld Jensen2015-08-251-2/+2
| | | | | | | Fixing the minor differences needed to work with Chromium 45. Change-Id: I5036b4b9a069d45e8dd37e24fab84cdfe5e67acc Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Merge branch '5.5' into 5.6Allan Sandfeld Jensen2015-08-181-6/+0
|\ | | | | | | Change-Id: I9977663123560a22f493b8c02d02de8897b38666
| * Fix crash on XCB GLES2 and WaylandAllan Sandfeld Jensen2015-08-121-6/+0
| | | | | | | | | | | | | | | | | | We can and must request the "egldisplay" from QPA, otherwise we get the wrong resource. Task-number: QTBUG-47301 Change-Id: I8bcd94415aa8f22b0d868ad751017f5babddf751 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Define DriverEGL::GetPlatformExtensions hereAllan Sandfeld Jensen2015-07-011-0/+16
| | | | | | | | | | | | | | We need access to Qt classes to extract the EGLDisplay. Change-Id: I4e57aa72f3f7e08a55bc5e9694389e35f258e039 Reviewed-by: Andras Becsi <andras.becsi@theqtcompany.com>
* | Add public QtWebEngineCore C++ APIAndras Becsi2015-06-081-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces a new public C++ API layer in preparation to make it possible to integrate with lower level Chromium features related mostly to networking operations like accessing and blocking cookies, custom request headers, etc. This API layer can be used both by Qt Widgets and Qt Quick applications with a small C++ core. It should contatain API to access features that usually run on the IO thread to make it possible to perform heavy tasks that would otherwise require costly context switches to the UI thread. Furthermore for these features a QML API does either not make sense, since they are non-UI-related, or a QML API is simply not feasible, because the API is meant for advanced usecases like web browser development (i.e. custom protocol handlers, network traffic interception cookie syncing, etc.). In the long term this layer could also make it possible to reduce code duplication in the widgets and quick layers by moving common parts to the core layer. The new API is built entirely by qmake as a separate static library which is then linked into the QtWebEngineCore library built by gyp and ninja, to prevent the build options passed to Chromium to break the API layer. As a first step this only contains the global headers for core. Change-Id: Iccf8544587cde7c0d9c6abd462e4766bf9ec81ae Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Prevent conflicting declaration errors of GL typedefsv5.5.0-beta1Andras Becsi2015-04-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Including gpu/command_buffer headers in Qt code pollute by including ui/gl/gl_bindings.h which pulls in system GL headers. This will cause conflicting declaration of typedefs when included together with content/gpu and content/common/gpu headers which pull in gles2_cmd_format.h that forward declares some GL types. Although the gl_bindings.h header states in a comment that it should only be included in source files, the inline implementation of texture_manager.h and some other low-level GL integration headers nonetheless require gl_bindings.h, which unfortunately cascades through to our core layer and may cause problems when Qt code is compiled. Since getting rid of this include in Chromium's headers is not feasible due to maintenance costs, making sure that in Qt code gpu/command_buffer headers are included before content/gpu and content/common/gpu headers and guarding forward declarations in gpu/command_buffer/common/gles2_cmd_format.h should be a sufficient workaround. We can however get rid of the polluting includes in src/core/gl_surface_qt.cpp, which only requires forward declarations. This also includes a SHA1 update for the Chromium submodule. Task-number: QTBUG-44240 Change-Id: I5813a3663d36e2b565e4fd7f429add7b6f8f8a69 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Remove uneeded GetShareHandle() function from EGL integrationAndras Becsi2015-03-171-25/+0
| | | | | | | The override of this function is not needed. Change-Id: I8579bd1b2a8476cb057b9256c816ac88cbb209ab Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Fix the build on eLinuxAndras Becsi2015-02-201-1/+8
| | | | | | | | | | | | | Update ozone layer to the new snapshot, update the embedded_linux.pri configuration, fix the GLSurfaceQt build on non-x11 linux and update embedded command line switches for the 40.0.2214-based chromium snapshot. This patch also updates the snapshot sha1 to include required chromium changes. Change-Id: I7f9446fa1b67a0af7baee564acff41ae33ff1a94 Reviewed-by: Michael Brüning <michael.bruning@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-161-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. Change-Id: Ieb6bac7a1be5c25eb7cb917495b58b6a870ca6d4 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* [Win] Use automatic destruction for PbufferGLSurfaceWGL.Michael Brüning2014-09-261-5/+2
| | | | | | | | | | | | PbufferGLSurfaceWGL is a reference counted class, hence deleting it manually triggers an assert in debug builds if Release is not called or the reference count is non-zero. Using a scoped_refptr prevents this and deletes the object correctly. Change-Id: I7e5ff783afc367e06d872b8d118c2ff83627b836 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Add Desktop OpenGL backend for WindowsKai Koehne2014-09-251-2/+82
| | | | | | | | Enabling rendering into a WGL backbuffer, in addition to the EGL/angle one. Change-Id: I8f2e3f5ecf52b6db22712b1129059f462725a256 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Remove unnecessary private header includesJocelyn Turcotte2014-09-111-1/+0
| | | | | | | | Most importantly, get rid of QOpenGLContextPrivate::globalShareContext which will be removed before the final. Change-Id: I5796fa822d2962c21fd8b6d8d3c196686d536e3d Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Update license headers.Pierre Rossi2014-08-281-14/+9
| | | | | | | | Because the files were recent additions or for other unclear reasons, not all the files were updated to reflect the license change. Change-Id: I6898f6f4f993f1efa9489382f0b94af285f8c4f5 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Update the QtWebEngineCore library to run on top of Chromium 37Jocelyn Turcotte2014-08-141-6/+4
| | | | | | | | | | | | | | | Most of the patch is about upstream classes/methods that changed. Other important details: - icu data files are now used by default - cygwin is no longer required to build on Windows - RenderFrameHost has been replacing RenderViewHost in a few places, following the separate process iframes support in Chromium - The user agent is accessed through ContentClient::GetUserAgent instead of from the command line switches Change-Id: I86cc93aff7ce31176a80b0b4a5d54025674a451c Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Remove duplicate code for egl extensions and native display queryingAndras Becsi2014-08-061-0/+5
| | | | | | | This is now possible through GLSurfaceQt, and GLContextHelper respectively. Change-Id: I06e13ccdea9737dc41b034befb4f01aa08d72c2a Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Implement GLSurfaceQt and exclude chromium's implementationAndras Becsi2014-08-021-0/+498
This makes it possible to use the same EGLConfig that is used by Qt when initializing the EGL surface instead of relying on eglChooseConfig. We can use the native interface to query the used config from Qt to avoid EGL_BAD_MATCH errors during initialization. This depends on patches in the qtbase dev branch, which will become Qt 5.4 at some point, therefore we can only merge this patch if we make Qt 5.4 a hard-dependency of QtWebEngine. Change-Id: I94319433b0790994ecbf543b74e7d12fa4767e32 Reviewed-by: Michael Bruning <michael.bruning@digia.com>