summaryrefslogtreecommitdiffstats
path: root/src/core/delegated_frame_node.h
Commit message (Collapse)AuthorAgeFilesLines
* Move compositor and scene-graph integration to its own dirAllan Sandfeld Jensen2018-11-071-132/+0
| | | | | Change-Id: Ib552dc30db5ee886631a108b4ccd866459c432e2 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Update mailboxes before renderingJüri Valdmann2018-10-161-42/+19
| | | | | | | | | | | Instead of updating mailboxes during the preprocessing phase of the Qt Quick Scene Graph renderer, do it separately before rendering even starts. Prerequisite for running GPU service on UI thread. Task-number: QTBUG-71126 Change-Id: Iec2acd7233c33e4dc4e33077c14cf6b9170685ed Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* Use ozone for x11Michal Klocek2018-08-021-1/+1
| | | | | | | | | | | | | | | | | | | | | Switch to use ozone also for x11/glx. This way we have a more elegant approach to hook in our gl surface classes and we use ozone for all linux qpa backends. Moreover, we have now also more fine grain control to reimplement gl surface handling logic. This also aims to fix currently broken wayland backend, but instead of patching the broken x11 calls, we simply reuse ozone which does not use x11 for ozone egl. Add webengine-x11 check to handle ozone glx plugin compilation. For ozone egl backend reimplement missing functions. Task-number: QTBUG-65682 Task-number: QTBUG-51631 Change-Id: I8b45c6f4d09a1c703efb12b6452d78ab385371ab Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io>
* Adaptations for Chromium 63Allan Sandfeld Jensen2018-01-251-16/+16
| | | | | Change-Id: I551c7091bbc0463bed94180313eb2bfe92f0ad84 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Adaptations for Chromium 62Allan Sandfeld Jensen2018-01-251-2/+2
| | | | | Change-Id: I49cd3c419d4dd1180144c3c07bdd9a628ab73caa Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Reduce the amount of thread switches needed for fetching texturesAllan Sandfeld Jensen2017-11-261-0/+2
| | | | | | | | | Combine multiple texture fetches into a single sync call on another thread. Change-Id: Id372d5a11290105b36b34a4fc56bff9929304c20 Reviewed-by: Jüri Valdmann <juri.valdmann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Merge branch '5.9' into 5.10Allan Sandfeld Jensen2017-11-011-0/+3
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/core/core_module.pro src/core/delegated_frame_node.cpp src/core/surface_factory_qt.cpp src/webenginewidgets/api/qwebengineprofile.cpp tests/auto/widgets/widgets.pro Change-Id: I92f3ef4eee779afef6c5381a7aa8b551417c1b17
| * Fix overeager freeing of resources in DelegatedFrameNodeJüri Valdmann2017-10-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | After every run of DelegatedFrameNode::commit we take all the resources we didn't need and queue them for freeing. Problems appear however with the recent change that introduced clipping of invisible render passes and draw quads as we may now decide to release resources too early and eventually crash. Task-number: QTBUG-64032 Change-Id: I95138bc4c1caf8c191bfc801264309c5b03ef0f3 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
| * Fix viewport resizing bug in rendererJüri Valdmann2017-09-221-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | After the recent fix for rendering intersecting quads, DelegatedFrameNode no longer builds scene graph nodes for DrawQuads that are outside the visible area. This means that the structure of the scene graph now depends on the size of the visible area, however the logic for deciding whether to update or rebuild the scene graph was not updated to reflect this fact. As a result we may try to update e.g. a QSGImageNode as if it were a QSGRectangleNode leading to a crash. Task-number: QTBUG-62112 Change-Id: I6e2e9dee4238d208fc2be98669281c2d4d4962d7 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Adaptations to 61-basedAllan Sandfeld Jensen2017-10-251-1/+1
| | | | | | | | | | Change-Id: I5cb198445f283c6cea8187a1a2883896df0ee918 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10Allan Sandfeld Jensen2017-09-291-0/+36
|\| | | | | | | Change-Id: I7094e85a7770303a2ae30baccbc484c04f33600e
| * Fix rendering of intersecting quadsJüri Valdmann2017-09-191-0/+24
| | | | | | | | | | | | | | | | | | | | | | Split intersecting quads using a BSP tree in the same manner as Chromium's rendering algorithm. Note that these split quads still will not be correctly rendered in software mode as Qt Quick's software renderer is not at all aware of non-rectangular QSGClipNodes. Task-number: QTBUG-62112 Change-Id: Ibfb72b9220817baebf828bc6183af7bd9c25d050 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Extract DrawQuad handling from DelegatedFrameNode::commitJüri Valdmann2017-09-181-0/+8
| | | | | | | | | | | | | | | | Refactoring only, no algorithmic changes. Task-number: QTBUG-62112 Change-Id: I871105ea48cd513e03b957d7daa9fe095c952a52 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | Graphics adaptations for Chromium 58Allan Sandfeld Jensen2017-06-141-1/+0
| | | | | | | | | | Change-Id: I66262ce7943bd5ba98defff5e4a33063b2ed0353 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* | Adaptations for Chromium 57Allan Sandfeld Jensen2017-06-141-7/+4
|/ | | | | Change-Id: Ia2756c1e9b13839c2330bd98cf953d47cbdac0dd Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
* Optimize scene graph rendering by reusing old nodes if possibleMichael Brüning2017-01-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | Previously, Qt WebEngine always dropped all existing scene graph nodes that were created for previous frames and built up a whole new tree. The main reason for this was that the render pass structure is not guaranteed to remain the same across two frames. This resulted in a full repaint of every new frame, even if only a small area had changed. We now check first if the structure of the frame data has changed across two sequential frames. We only discard the old nodes if there actually has been a change. Otherwise, we reuse the scene graph nodes and only update the nodes that have changed. A general exception to this at the moment is video. In case any streaming video or yuv video nodes are found in the render pass, all nodes get recreated. Task-number: QTBUG-57720 Change-Id: I8998577af48a163d54144f205c316ee427ed0307 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Merge remote-tracking branch 'origin/5.7' into 5.8Liang Qi2016-09-211-0/+5
|\ | | | | | | | | | | | | | | | | Conflicts: src/3rdparty src/core/delegated_frame_node.h src/webengine/api/qquickwebenginecontextmenudata.cpp Change-Id: I163488d0d32cd981351608b2886f12e547e24672
| * Merge remote-tracking branch 'origin/5.6' into 5.7Michal Klocek2016-08-311-0/+5
| |\ | | | | | | | | | Change-Id: Ic739ab9db0851cc13467168840ea2549996432f8
| | * Fix textures memory leak on second X11 screenMichal Klocek2016-08-241-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix for QTBUG-48969 was only half-baked patch and introduced massive memory leak on fbo and texture alloctaions. Delete fbo and extra allocated textures. Task-number: QTBUG-52575 Task-number: QTBUG-48969 Change-Id: I2148f37cd27dab9e40ab72caeb6857752b69379f Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | Adaptations to Chromium 53Allan Sandfeld Jensen2016-09-141-1/+1
| | | | | | | | | | | | | | | Change-Id: I15053486edfd42ee607250b4f14fb6eaa325c959 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | | Adaptations to Chromium 52Allan Sandfeld Jensen2016-09-141-3/+2
|/ / | | | | | | | | Change-Id: Idf8a511ba26d263fd9d014d87d5e1101d706da71 Reviewed-by: Michael Brüning <michael.bruning@qt.io>
* | Update GL mailbox synchronization to Chromium 49v5.7.0-alpha1Allan Sandfeld Jensen2016-03-071-3/+7
| | | | | | | | | | | | | | | | | | | | | | Chromium 49 switched to using SyncToken, making our old model based on sync-points obsolete. This patch rewrites our syncing to instead take advantage of new Chromium API for waiting on sync tokens. It also moves the creation of the GLFences we use out of Chromium. Task-number: QTBUG-51173 Change-Id: I04d726d4bc81bf6b7fe39bb2b5507e84a0b6991e Reviewed-by: Joerg Bornemann <joerg.bornemann@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>
* Replace QList with QVectorKai Koehne2015-11-061-3/+3
| | | | | | | | Replace QList with QVector in all places where the type isn't a pointer, and is not already (indirectly) exposed through public API. Change-Id: I90e3db56bf9ebda6b3cb8fb4396d2ae283159727 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
* Add namespace to internal QtWebEngine APIAllan Sandfeld Jensen2015-03-021-0/+4
| | | | | | | | Adds the QtWebEngineCore namespace to all internal core API. This ensures we don't export any internal symbols in the global namespace. Change-Id: I26af888ea7c6c4c4d0f04c24a377c1a9d3c92751 Reviewed-by: Andras Becsi <andras.becsi@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>
* Update Chromium to version 40.0.2214.28 and ninja to 1.5.3.Zeno Albisser2015-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * scoped_refptr operator for implicit conversion to pointer has been disabled upstream: https://codereview.chromium.org/510323002 * Group permission API as done upstream: https://codereview.chromium.org/622793002 * content_worker gyp target has been removed upstream. * GetPageThumbnailData moved to DevToolsManagerDelegate. * ui/ui_resources has been renamed to ui/resources * WebPreferences and ResourceType have moved inside content. * Merge ResourceBundle's InitSharedInstanceLocaleOnly with InitSharedInstanceWithLocale(): https://codereview.chromium.org/457103003 * Remove obsolete accessibility events. * AX_EVENT_SELECTED_TEXT_CHANGED has been renamed to AX_EVENT_TEXT_SELECTION_CHANGED * AX_ROLE_MATH_ELEMENT was removed upstream. https://codereview.chromium.org/695133002 * Screen::IsDIPEnabled has been removed upstream. https://codereview.chromium.org/672823002 * Update DevToolsHttpHandlerDelegateQt according to ShellDevToolsManagerDelegate. * Various functionality from DevToolsHttpHandler was moved to DevToolsManagerDelegate https://codereview.chromium.org/560323005 * DevToolsHttpHandler::Start expects a scoped_ptr now. * Make sure event_factory_evdev.h is not included when USE_OZONE is not defined * ErrorPageParams was moved into namespace error_page. * Media Access is now handled by ContentBrowserClient::CheckMediaAccessPermission * SpecialStoragePolicy moved to namespace storage * Add implementation for new pure virtual function BrowserContext::GetSSLHostStateDelegate. * RenderPass::Id was renamed to RenderPass::RenderPassId * Include view_messages.h for ViewHostMsg_TextInputState_Param * CERT_UNABLE_TO_CHECK_REVOCATION has been deprecated by Chromium: https://codereview.chromium.org/449743002 * MailboxManager::ConsumeTexture only takes the mailbox as an argument * Replace RWHVQt::TextInputStateChanged with RWHVQt::TextInputTypeChanged. * RenderWidgetHostView::ScrollOffsetChanged has been removed. * SkBitmap::Config was removed upstream. * CopyFromCompositingSurfaceCallback has become an own type. * AcceleratedSurfaceInitialized only takes route_id as an argument. * ServerBoundCertService has been renamed to ChannelIDService. Related API has been renamed accordingly. * TextureImageTransportSurface was removed upstream. * Update MediaCaptureDispatcher::OnMediaRequestStateChanged signature. * AudioStream related functions are gone upstream. https://codereview.chromium.org/569713002 * Add implementation for RenderWidgetHostViewQt::GetLastScrollOffset. * Include generic touch_device implementation. * switches::kDisableDesktopNotifications was removed upstream. https://codereview.chromium.org/607843002 * PageTransition moved to ui. * Messages headers are not guarded. Including them multiple times does hurt. * ScaleGestureDetector does not create a standalone GestureDetector anymore. https://codereview.chromium.org/501503003 * MotionEvent::Cancel and Clone are not virtual anymore. https://codereview.chromium.org/502993004 * Exclude os_exchange_data_provider_mac from build. * Remove argument from ScopedClipboardWriter ctor. https://codereview.chromium.org/558913003 * Remove ShowPopupMenu override from WebContentsQt. The function is not pure virtual anymore, and we never implemented any specifics. * Do not use clang on desktop linux. * Request functions in ContentBrowserClient were merged into RequestPermission. * ninja: use configure.py --bootstrap instead of bootstrap.py Change-Id: I3575612826db7845461a949b4e737264bb4e8d88 Reviewed-by: Pierre Rossi <pierre.rossi@theqtcompany.com>
* Support TransferableResource::is_softwareJocelyn Turcotte2014-11-251-0/+3
| | | | | | | | | | | | | | When the GPU process fails to initialize, or when the --disable-gpu switch is provided, the delegating renderer will transfer resource mailboxes through shared memory pixel data instead of through shared texture IDs in the GPU process. Handle this by uploading the pixel data ourselves with createTextureFromImage, also allowing us to render tiles in the QtQuick 2D Renderer. Change-Id: I70ad7122cd0e52dd5ab435ae01e7f032b8e1194e Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Extract the resource logic out of MailboxTextureJocelyn Turcotte2014-11-251-6/+8
| | | | | | | | | | | | | As a first step to allow using plain textures for software resources, split the Chromium resource handling responsibility into a ResourceHolder class. This also moves the static findMailboxTexture into a member DelegatedFrameNode::findAndHoldResource in preparation for how texture refcounting will work in the following patch. Change-Id: Iaa64273c187af022045bbcaa956fcaa1f3defabc Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Avoid relying on QOpenGL classes to handle RenderPassesJocelyn Turcotte2014-11-251-3/+11
| | | | | | | | | | | | | | | | | | | Use QSGLayer and get rid of RenderPassTexture so that we can render intermediate layers with the QtQuick 2D Renderer. This reintroduces the private dependency on QtQuick since the QSGLayer factory methods aren't available publically, and also that we need to use QSGImageNode instead of QSGSimpleTextureNode to use them. Since we can't subclass QSGLayer to hold a reference to SG objects directly in the nodes that use them, store them all in the wrapping DelegatedFrameNode in a SGObjects structs. This works assuming that the DelegatedFrameNode will always be at the root of our nodes, layers and textures; if the scene graph destroys the DelegatedFrameNode all child nodes will be destroyed with it. Change-Id: Iedeceb8f98eb54fd8228a677c366d6df9a270e11 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Rename DelegatedFrameNodeData to ChromiumCompositorDataJocelyn Turcotte2014-11-251-4/+4
| | | | | | | | | | | | This clarifies that those objects span to the lifetime of a Chromium frame rather than to the DelegatedFrameNode, which can be destroyed by the scene graph when the window is unmapped. The also avoids the confusion with the DelegatedFrameData Chromium structure name. Change-Id: Ibbeb2b10ef18704fc0934e285cca4ead23879646 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Wait on sync point fences instead of creating a new fenceJocelyn Turcotte2014-09-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Posting a runnable on the GPU thread's message loop and creating a GL fence sync there assumes that there is a current GL context, and that synchronizing with this context will make sure that we wait for all GL context producing any of our consumed texture mailboxes. This is however not always the case like when: - The current GL context on the GPU thread is destroyed right before our runnable is handled, displaying errors on the console that glFlush needs a current context. - The GL driver will do extra scheduling and let the scene graph thread synchronize its GL command stream only with the GL context in which the fence sync was created. To remedy the situation, make sure that Chromium creates a fence sync for every sync points associated with a mailbox that we consume and do so directly in the GL context associated with the originating glInsertSyncPointCHROMIUM call. Wait for all those syncs on the Qt side afterward. This might also help with a few erratic behaviors noticed on some embedded GL drivers. Change-Id: I5fc60fcf51497477b2e1b3a535d0a141954fc6e5 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Update License Headers for Qt WebEngine to LGPLv3.Zeno Albisser2014-08-211-15/+10
| | | | | | | Change-Id: Idbe0eafb51d77cc00e3a93179b81770724d5bfaa Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Tuukka Turunen <tuukka.turunen@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Use QSGEngine instead of the private QSGRenderContextJocelyn Turcotte2014-08-061-6/+1
| | | | | | | | | QSGEngine was added in Qt 5.4 to allow using the scene graph without QQuickWindow. Use it for our FBO as well as for the QOpenGLWidget rendering. Change-Id: If4665d4f33c9dad69d2d4269309163bb5ffbd8e3 Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Use a fence sync to synchronize GL between threadsJocelyn Turcotte2014-04-101-0/+3
| | | | | | | | | | | | | | | | | The NVidia driver needs more than a glFlush to ensure that GL commands consuming Chromium resources are run only when the resource is completely produced by the Chromium GPU thread. This produces artifacts and an uneven frame rate in WebGL examples on this kind of hardware. Use the same mechanism as used by gfx::GLFence, doing a few things manually to cope with the fact that Chromium and Qt both have their own GL function table and contexts. Change-Id: I33eeb1068994dc4176038a74579ce768b2bccb9d Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
* Render the widgets view using the scene graph into a QOpenGLWidgetJocelyn Turcotte2014-04-081-3/+3
| | | | | | | | | | | | | | | This means that widgets application now need to setup the GL context sharing as well. QWebEngineWidgets::initialize() must be called, which has the same effect as QWebEngine::initialize(). The QtWebEngineWidgets now depends on the QtWebEngine module to make this happen. Since QOpenGLWidget is only available in Qt 5.3, this patch also disables the webenginewidgets module completely when building using Qt 5.2. Change-Id: I0e99a779d1eb080f2ccf5a338ff0763ad64e6eba Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
* Fix the HighDPI rendering of QQuickWebEngineViewJocelyn Turcotte2014-03-201-1/+3
| | | | | | | | | | | | | Use the ratio given with the compositor frame instead of taking it directly from the QWindow to make sure that we scale according to the rasterizing of the tiles. Set the scale directly on the DelegatedFrameNode by making it a QSGTransformNode to avoid creating an extra QSGNode. Change-Id: I95bd33c7c6d26e0d456d6df188779dc4e82f9d3b Reviewed-by: Arvid Nilsson <anilsson@blackberry.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
* Make Qt 5.2 a minimum requirementPierre Rossi2014-02-141-4/+0
| | | | | | | | Cleanup version ifdefs and v8-private dependencies. Change-Id: Iac393c06dfba02499e60d713d9f4d04ef0c9e617 Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>
* Quick: Support reparentingArvid Nilsson2014-01-311-2/+12
| | | | | | | | | | | | | | | | | To support reparenting, we make the compositing surface independent of the window by using gfx::TEXTURE_TRANSPORT. We also need to be able to keep frame data across window changes so we can reconstruct the QSGNode tree in a new context, so extract that data into DelegatedFrameNodeData class. Any context-specific data is still stored in DelegatedFrameNode. Also hook up window changes to WebContents::WasShown/Hidden for Quick. Remove checking of Qt isVisible state, this mechanism is used to sync Chromium with Qt, not the other way around. WasShown/Hidden is orthogonal to Show/Hide, and can use different triggers. However for Widgets it probably makes sense to hook both up to widget visibility. Change-Id: I1ef4b50cd61b8e54b791e03f0b41929c42fec8bf Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
* Moving sources to src part 1: Move files.Jocelyn Turcotte2013-11-281-0/+87
This only move files without adjusting any paths. This moves: - lib/quick -> src/webengine/api (API files) lib/quick -> src/webengine (other files) This contains the main QtWebEngine module library since <ec7b2ee70a8b2db7fb87f50671a001ddd54697b0>. - lib/widgets -> src/webenginewidgets Also rename this directory to match its module name and rename Api to api. - lib -> src/core - process -> src/process - resources -> src/core/resources - tools/* -> tools/scripts/ The build directory is spread as follow: - build/build.pro -> src/core/gyp_run.pro - build/qmake_extras/* -> src/core/ (for the host and target .pro files) - build/qmake -> tools/qmake - Build related scripts -> tools/buildscripts Change-Id: I0cded1de772c99c0c1da6536c9afea353236b4a1 Reviewed-by: Zeno Albisser <zeno.albisser@digia.com> Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com> Reviewed-by: Andras Becsi <andras.becsi@digia.com>