Commit Graph

25 Commits

Author SHA1 Message Date
Simon Hausmann 880a143eb5 Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: I4476733af61fcf3a2af1d121a4585c3fae1c240e
2019-07-12 20:36:48 +02:00
Friedemann Kleint 83f8d886ce Fix some compiler warnings in tests
- Signedness of integer comparison
- Unused parameters and variables
- Ignored return values of QTest::qWaitForWindowExposed() (nodiscard)
- float to int conversions

Change-Id: Ibece620d3c980a5af3b7717486c841d8072ed8af
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-12 16:00:51 +02:00
Alexandru Croitor c0987d3923 Fix Qt6 builds after dev -> wip/qt6 merge
Change-Id: I56b9d3abdbc6663a2d514f12aa20f2f574042bc1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-09 21:27:24 +02:00
Laszlo Agocs 341ab77080 Add the graphics api independent scenegraph port
Opt in via environment variables:
QSG_RHI=1 -> enable using QRhi instead of GL
QSG_RHI_BACKEND -> set to vulkan, metal, d3d11, gl to override the default
(the default is d3d11 on Windows, metal on Mac, gl elsewhere)

Or force a given rhi backend via the existing
QQuickWindow::setSceneGraphBackend().

Otherwise the default behavior is the same as before, the rhi code path
is never active by default.

-no-opengl builds are supported in the sense that they work and default
to the software backend. However, the rhi code path cannot currently be
used in such builds, even though QRhi from qtbase is fully functional
with Vulkan, D3D, or Metal even when qtbase was configured with
-no-opengl. This cannot be utilized by Quick atm due to OpenGL usage
being all over the place in the sources corresponding to the default
backend, and those host the rhi code path as well. This will be cleaned up
hopefully in Qt 6, with the removal all direct OpenGL usage.

Other env.vars.:
QSG_RHI_DEBUG_LAYER=1 -> enable D3D debug or Vulkan validation layer
(assuming the system is set up for this)
QSG_RHI_SHADEREFFECT_DEBUG=1 -> print stuff from ShaderEffect
QSG_SAMPLES=1,2,4,... -> MSAA sample count (but QSurfaceFormat works too)
QT_D3D_ADAPTER_INDEX=0,1,... -> D3D adapter index
QT_VK_PHYSICAL_DEVICE_INDEX=0,1,... -> Vulkan physical device index
QSG_RHI_UINT32_INDEX=1 -> always use uint index data (both
merged/unmerged, convert when needed - with some rhi backends this is
implicit)
QSG_RENDER_LOOP -> to override the render loop as usual. The default
with RHI is threaded for Metal, threaded for Vulkan on Windows, basic
for Vulkan on Linux and Android (to be checked later), while the existing
rules apply for OpenGL.

Not supported when running with QRhi:
  - particles
  - compressed atlases (though this is transparent to the apps)
  - QSGRenderNode
  - QQuickRenderControl
  - QQuickFramebufferObject
  - certain QQuickWindow functionality that depends directly on OpenGL
  - anisotropic filtering for textures
  - native text may lack some gamma correction
  - QSGEngine applicability unclear
  - some QML profiler logs may be incorrect or irrelevant

Change-Id: I7822e99ad79e342e4166275da6e9e66498d76521
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-07-04 10:44:26 +02:00
Shawn Rutledge 06e962f263 init variables where they are declared when possible (clang-tidy)
clang-tidy -p compile_commands.json $file -checks='-*,modernize-use-default-member-init,readability-redundant-member-init'
 -config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' -header-filter='qtdeclarative' -fix

Change-Id: I705f3235ff129ba68b0d8dad54a083e29fcead5f
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
2018-02-26 13:08:30 +00:00
Sami Nurmenniemi d8d3259b23 Enable tests for boot2qt
Some tests needed fixing
- Disabled tests too heavy for qemu
- Skipped tests requiring OpenGL without support from the platform
- Skipped tests requiring functionality on broken offscreen platform
- Skipped tests that take too long on qemu + software renderer
- Blacklisted tests for created bugs QTBUG-63049, QTBUG-63053
  QTBUG-63055 and QTBUG-63057

Task-number: QTBUG-60268
Change-Id: I0346b0e436cf286d7d9cbc140acf324a4087cfb9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-09-21 06:56:11 +00:00
Liang Qi f5da1a9261 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	src/quick/items/qquickitemsmodule.cpp
	tests/auto/quick/rendernode/tst_rendernode.cpp

Change-Id: I90582df69feb95a4e4aafb0b9793c23714654f19
2016-10-20 08:28:16 +02:00
Mitch Curtis dd313c4c5e Fix tst_rendernode::renderOrder() on high DPI displays
When QT_SCALE_FACTOR is 2, fb.width() is 400 instead of 200, for
example.

Change-Id: Iec02d7cfd49d29fceda6645377b75e4607cceb6f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-10-17 20:42:13 +00:00
Frederik Gladhorn 123481f94e Fix tst_rendernode to work with hidpi
Change-Id: Id2a7f20933533f69fa43eefc2338205b82a27ccd
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-07-04 14:34:12 +00:00
Laszlo Agocs 9c19298510 Fix up rendernode autotest
Test the new RenderTargetState as well.

Make releaseResources() optional. Code focusing on OpenGL only may not
want to care about providing an implementation for it. It is also more
compatible with the old private API this way.

Change-Id: I0dcec1d48708e71d778a8e5fea1b64d710bee67f
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2016-04-20 13:22:29 +00:00
Jani Heikkinen 38ec3bd755 Updated license headers
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/

Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)

Change-Id: I04760a0801837cfc516d1c7c02d4f503f6bb70b6
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
2016-01-20 11:46:25 +00:00
Jani Heikkinen c5796292ad Update copyright headers
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: I61120571787870c0ed17066afb31779b1e6e30e9
Reviewed-by: Iikka Eklund <iikka.eklund@theqtcompany.com>
2015-02-12 10:28:11 +00:00
Jani Heikkinen e7ceacda70 Update license headers and add new licenses
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3 & LICENSE.GPLv2
- Removed LICENSE.GPL

Change-Id: I84a565e2e0caa3b76bf291a7d188a57a4b00e1b0
Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
2014-08-25 11:28:46 +02:00
Laszlo Agocs 08f9b552c3 Avoid direct GL calls in Qt Quick examples and tests
Change-Id: I204a5513708aeff5cae00d06d4f0c27c20a13ace
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-07-01 14:20:49 +02:00
Gunnar Sletta ea164757cd Use correct matrix for render nodes.
Change-Id: I8c137383fa32a64ba64ffb4ed48aa123d0ebf000
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-05-07 13:53:57 +02:00
Fabian Bumberger b5ceb6edf1 Fix RenderNode autotest on BlackBerry
On BlackBerry the first window that is created is always shown as fullscreen.
This is a platform restriction and possibly applies to other platforms as well.
The autotest however expects the window to be of a specific size.
As workaround a "container" window is created first in which the QQuickView is placed.

Change-Id: Ib9023cfcb9148c6cafb21872c2821ebcb8fd664f
Reviewed-by: Alan Alpert (Personal) <416365416c@gmail.com>
2014-01-15 01:10:19 +01:00
Gunnar Sletta 8d6500560e Fix rendernode bug and enable rendernode test.
The bug in the renderer was that the viewport was set before
we called the render node, leaving us with the viewport
set by the render node as opposed to the viewport of the
renderer.

The render node API is a crude and intrusive hack which was added for
webkit back in the day. With the introduction of webengine it becomes
less relevant, but it should still work.

Change-Id: I66a1e3047e018ad6c0bb28044851e9fc65da59cc
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
2013-10-26 23:53:38 +02:00
Friedemann Kleint a166f7974b Stabilize tst_rendernode.
Center windows on screen, add QSKIP for screen depth, add error message
to color comparison.

Change-Id: I03d600a4810f27654e0b971b19631ba51c9f6874
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-08-30 15:52:44 +02:00
Rafael Roquetto 56324d40c7 Fix tst_rendernode for fullscreen platforms
Change-Id: Ib82aef04b7748ecdf148c3d9ec60ad15b3dfd7cb
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-07-25 18:23:12 +02:00
Sergio Ahumada 83deab8d1b Update copyright year in Digia's license headers
Change-Id: I6c3bd7bebe3d62d1cfd0fa6334544c9db8398c76
Reviewed-by: Akseli Salovaara <akseli.salovaara@digia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2013-01-10 19:52:37 +01:00
Iikka Eklund 46010aa7a2 Change copyrights from Nokia to Digia
Change copyrights and license headers from Nokia to Digia

Change-Id: Ie7f5d49ed8235d7a7845ab68f99ad1c220e64d5c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-09-23 08:22:24 +02:00
Friedemann Kleint c20463631d QtQuick: Remove usages of qWaitForWindowShown(QWindow *).
Change-Id: I722e20b2fb8d8c6c19c6f3f2cb16910d7433e9a4
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-07-24 16:53:08 +02:00
Alan Alpert feb996e3ab QQuickCanvas renames
QQuickCanvas is now called QQuickWindow
QQuickCanvas::rootItem is now QQuickWindow::contentItem
QQuickItem::canvas is now QQuickItem::window
QQuickItem::ItemChangeData::canvas is also renamed window
QQuickCanvas::grabFrameBuffer is now QQuickWindow::grabWindow
The functions related to the color property have dropped the clear from
their names.

The first three changes have interim compatibility measures in place to
ease the transition.

Change-Id: Id34e29546a22a74a7ae2ad90ee3a8def6fc541d2
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-07-17 07:26:15 +02:00
Miikka Heikkinen 21e228afa7 Windows: Fix file URL issues in declarative autotests
Fixed by using testFileUrl() shared utility function where appropriate
instead of testFile() or various other ways file URLs were being
incorrectly used.

Task-number: QTBUG-24779
Change-Id: I48cbd297d419238f42ea45132344b7e5a487b6f1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-03-15 11:25:36 +01:00
Matthew Vogt b855240b78 Rename QDeclarative symbols to QQuick and QQml
Symbols beginning with QDeclarative are already exported
by the quick1 module.

Users can apply the bin/rename-qtdeclarative-symbols.sh
script to modify client code using the previous names of the
renamed symbols.

Task-number: QTBUG-23737
Change-Id: Ifaa482663767634931e8711a8e9bf6e404859e66
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2012-02-24 04:51:31 +01:00