aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@qt.io>2020-06-16 17:03:47 +0200
committerPaul Olav Tvete <paul.tvete@qt.io>2020-06-17 17:42:01 +0200
commit83fb4f6743860bfb746e6243aad00513d498db4f (patch)
tree816bf1a1d509124c6bfb4fc34cce2a4ed885f40e
parent48e919e9647fd07351be37e1ad7efdda9c550be9 (diff)
Clean up QT_CONFIG(opengl)
Accelerated graphics is now possible without OpenGL support. With this change, a Qt build with -no-opengl can still run Qt Quick with a Vulkan, Metal, or Direct3D backend. Fixes: QTBUG-84027 Change-Id: Ib63c733d28cfdf7de16b138df136fa7628e1747b Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
-rw-r--r--src/particles/qquickimageparticle.cpp42
-rw-r--r--src/quick/.prev_CMakeLists.txt519
-rw-r--r--src/quick/CMakeLists.txt92
-rw-r--r--src/quick/configure.json2
-rw-r--r--src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp4
-rw-r--r--src/quick/items/items.pri14
-rw-r--r--src/quick/items/items.qrc12
-rw-r--r--src/quick/items/qquickitemsmodule.cpp10
-rw-r--r--src/quick/items/qquickpainteditem.cpp4
-rw-r--r--src/quick/items/qquickrendercontrol.cpp6
-rw-r--r--src/quick/items/qquickshadereffect.cpp2
-rw-r--r--src/quick/items/qquickspriteengine.cpp2
-rw-r--r--src/quick/items/qquickwindow.cpp16
-rw-r--r--src/quick/items/qquickwindow.h1
-rw-r--r--src/quick/items/shaders/shadereffect.frag9
-rw-r--r--src/quick/items/shaders/shadereffect.vert12
-rw-r--r--src/quick/items/shaders/shadereffect_core.frag13
-rw-r--r--src/quick/items/shaders/shadereffect_core.vert14
-rw-r--r--src/quick/items/shaders/shadereffectfallback.frag4
-rw-r--r--src/quick/items/shaders/shadereffectfallback.vert8
-rw-r--r--src/quick/items/shaders/shadereffectfallback_core.frag8
-rw-r--r--src/quick/items/shaders/shadereffectfallback_core.vert10
-rw-r--r--src/quick/quick.pro2
-rw-r--r--src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp8
-rw-r--r--src/quick/scenegraph/coreapi/qsggeometry.h1
-rw-r--r--src/quick/scenegraph/coreapi/qsgrenderer.cpp4
-rw-r--r--src/quick/scenegraph/qsgcontextplugin.cpp11
-rw-r--r--src/quick/scenegraph/qsgdefaultcontext.cpp2
-rw-r--r--src/quick/scenegraph/qsgdefaultglyphnode_p.cpp2
-rw-r--r--src/quick/scenegraph/qsgdefaultglyphnode_p_p.h1
-rw-r--r--src/quick/scenegraph/qsgdistancefieldglyphnode.cpp4
-rw-r--r--src/quick/scenegraph/qsgrenderloop.cpp26
-rw-r--r--src/quick/scenegraph/qsgrhisupport.cpp26
-rw-r--r--src/quick/scenegraph/scenegraph.pri194
-rw-r--r--src/quick/scenegraph/util/qsgtexturereader.cpp11
-rw-r--r--src/quickshapes/qquickshape.cpp13
-rw-r--r--src/quickshapes/qquickshapegenericrenderer.cpp60
-rw-r--r--tests/auto/.prev_CMakeLists.txt4
-rw-r--r--tests/auto/CMakeLists.txt4
-rw-r--r--tests/auto/auto.pro6
-rw-r--r--tests/auto/quick/qquickrendercontrol/CMakeLists.txt1
-rw-r--r--tests/auto/quick/qquickrendercontrol/qquickrendercontrol.pro2
-rw-r--r--tests/benchmarks/CMakeLists.txt2
-rw-r--r--tests/benchmarks/benchmarks.pro2
-rw-r--r--tools/qml/main.cpp9
-rw-r--r--tools/qmlscene/main.cpp9
46 files changed, 685 insertions, 523 deletions
diff --git a/src/particles/qquickimageparticle.cpp b/src/particles/qquickimageparticle.cpp
index f30ae6476e..05c21ecf56 100644
--- a/src/particles/qquickimageparticle.cpp
+++ b/src/particles/qquickimageparticle.cpp
@@ -1068,9 +1068,9 @@ void QQuickImageParticle::createEngine()
}
static QSGGeometry::Attribute SimpleParticle_Attributes[] = {
- QSGGeometry::Attribute::create(0, 2, GL_FLOAT, true), // Position
- QSGGeometry::Attribute::create(1, 4, GL_FLOAT), // Data
- QSGGeometry::Attribute::create(2, 4, GL_FLOAT) // Vectors
+ QSGGeometry::Attribute::create(0, 2, QSGGeometry::FloatType, true), // Position
+ QSGGeometry::Attribute::create(1, 4, QSGGeometry::FloatType), // Data
+ QSGGeometry::Attribute::create(2, 4, QSGGeometry::FloatType) // Vectors
};
static QSGGeometry::AttributeSet SimpleParticle_AttributeSet =
@@ -1081,10 +1081,10 @@ static QSGGeometry::AttributeSet SimpleParticle_AttributeSet =
};
static QSGGeometry::Attribute ColoredParticle_Attributes[] = {
- QSGGeometry::Attribute::create(0, 2, GL_FLOAT, true), // Position
- QSGGeometry::Attribute::create(1, 4, GL_FLOAT), // Data
- QSGGeometry::Attribute::create(2, 4, GL_FLOAT), // Vectors
- QSGGeometry::Attribute::create(3, 4, GL_UNSIGNED_BYTE), // Colors
+ QSGGeometry::Attribute::create(0, 2, QSGGeometry::FloatType, true), // Position
+ QSGGeometry::Attribute::create(1, 4, QSGGeometry::FloatType), // Data
+ QSGGeometry::Attribute::create(2, 4, QSGGeometry::FloatType), // Vectors
+ QSGGeometry::Attribute::create(3, 4, QSGGeometry::UnsignedByteType), // Colors
};
static QSGGeometry::AttributeSet ColoredParticle_AttributeSet =
@@ -1095,12 +1095,12 @@ static QSGGeometry::AttributeSet ColoredParticle_AttributeSet =
};
static QSGGeometry::Attribute DeformableParticle_Attributes[] = {
- QSGGeometry::Attribute::create(0, 4, GL_FLOAT), // Position & TexCoord
- QSGGeometry::Attribute::create(1, 4, GL_FLOAT), // Data
- QSGGeometry::Attribute::create(2, 4, GL_FLOAT), // Vectors
- QSGGeometry::Attribute::create(3, 4, GL_UNSIGNED_BYTE), // Colors
- QSGGeometry::Attribute::create(4, 4, GL_FLOAT), // DeformationVectors
- QSGGeometry::Attribute::create(5, 3, GL_FLOAT), // Rotation
+ QSGGeometry::Attribute::create(0, 4, QSGGeometry::FloatType), // Position & TexCoord
+ QSGGeometry::Attribute::create(1, 4, QSGGeometry::FloatType), // Data
+ QSGGeometry::Attribute::create(2, 4, QSGGeometry::FloatType), // Vectors
+ QSGGeometry::Attribute::create(3, 4, QSGGeometry::UnsignedByteType), // Colors
+ QSGGeometry::Attribute::create(4, 4, QSGGeometry::FloatType), // DeformationVectors
+ QSGGeometry::Attribute::create(5, 3, QSGGeometry::FloatType), // Rotation
};
static QSGGeometry::AttributeSet DeformableParticle_AttributeSet =
@@ -1111,14 +1111,14 @@ static QSGGeometry::AttributeSet DeformableParticle_AttributeSet =
};
static QSGGeometry::Attribute SpriteParticle_Attributes[] = {
- QSGGeometry::Attribute::create(0, 4, GL_FLOAT), // Position & TexCoord
- QSGGeometry::Attribute::create(1, 4, GL_FLOAT), // Data
- QSGGeometry::Attribute::create(2, 4, GL_FLOAT), // Vectors
- QSGGeometry::Attribute::create(3, 4, GL_UNSIGNED_BYTE), // Colors
- QSGGeometry::Attribute::create(4, 4, GL_FLOAT), // DeformationVectors
- QSGGeometry::Attribute::create(5, 3, GL_FLOAT), // Rotation
- QSGGeometry::Attribute::create(6, 3, GL_FLOAT), // Anim Data
- QSGGeometry::Attribute::create(7, 4, GL_FLOAT) // Anim Pos
+ QSGGeometry::Attribute::create(0, 4, QSGGeometry::FloatType), // Position & TexCoord
+ QSGGeometry::Attribute::create(1, 4, QSGGeometry::FloatType), // Data
+ QSGGeometry::Attribute::create(2, 4, QSGGeometry::FloatType), // Vectors
+ QSGGeometry::Attribute::create(3, 4, QSGGeometry::UnsignedByteType), // Colors
+ QSGGeometry::Attribute::create(4, 4, QSGGeometry::FloatType), // DeformationVectors
+ QSGGeometry::Attribute::create(5, 3, QSGGeometry::FloatType), // Rotation
+ QSGGeometry::Attribute::create(6, 3, QSGGeometry::FloatType), // Anim Data
+ QSGGeometry::Attribute::create(7, 4, QSGGeometry::FloatType) // Anim Pos
};
static QSGGeometry::AttributeSet SpriteParticle_AttributeSet =
diff --git a/src/quick/.prev_CMakeLists.txt b/src/quick/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..87c2949f60
--- /dev/null
+++ b/src/quick/.prev_CMakeLists.txt
@@ -0,0 +1,519 @@
+# Generated from quick.pro.
+
+#####################################################################
+## Quick Module:
+#####################################################################
+
+qt_add_module(Quick
+ GENERATE_METATYPES
+ PLUGIN_TYPES scenegraph
+ SOURCES
+ handlers/qquickdragaxis.cpp handlers/qquickdragaxis_p.h
+ handlers/qquickdraghandler.cpp handlers/qquickdraghandler_p.h
+ handlers/qquickhandlerpoint.cpp handlers/qquickhandlerpoint_p.h
+ handlers/qquickhoverhandler.cpp handlers/qquickhoverhandler_p.h
+ handlers/qquickmultipointhandler.cpp handlers/qquickmultipointhandler_p.h
+ handlers/qquickmultipointhandler_p_p.h
+ handlers/qquickpinchhandler.cpp handlers/qquickpinchhandler_p.h
+ handlers/qquickpointerdevicehandler.cpp handlers/qquickpointerdevicehandler_p.h
+ handlers/qquickpointerdevicehandler_p_p.h
+ handlers/qquickpointerhandler.cpp handlers/qquickpointerhandler_p.h
+ handlers/qquickpointerhandler_p_p.h
+ handlers/qquickpointhandler.cpp handlers/qquickpointhandler_p.h
+ handlers/qquicksinglepointhandler.cpp handlers/qquicksinglepointhandler_p.h
+ handlers/qquicksinglepointhandler_p_p.h
+ handlers/qquicktaphandler.cpp handlers/qquicktaphandler_p.h
+ items/qquickabstractpaletteprovider_p.h
+ items/qquickaccessibleattached.cpp items/qquickaccessibleattached_p.h
+ items/qquickanchors.cpp items/qquickanchors_p.h
+ items/qquickanchors_p_p.h
+ items/qquickborderimage.cpp items/qquickborderimage_p.h
+ items/qquickborderimage_p_p.h
+ items/qquickclipnode.cpp items/qquickclipnode_p.h
+ items/qquickcolorgroup.cpp items/qquickcolorgroup_p.h
+ items/qquickevents.cpp
+ items/qquickevents_p_p.h
+ items/qquickflickable.cpp items/qquickflickable_p.h
+ items/qquickflickable_p_p.h
+ items/qquickflickablebehavior_p.h
+ items/qquickfocusscope.cpp items/qquickfocusscope_p.h
+ items/qquickgraphicsdevice.cpp items/qquickgraphicsdevice.h items/qquickgraphicsdevice_p.h
+ items/qquickgraphicsinfo.cpp items/qquickgraphicsinfo_p.h
+ items/qquickimage.cpp items/qquickimage_p.h
+ items/qquickimage_p_p.h
+ items/qquickimagebase.cpp items/qquickimagebase_p.h
+ items/qquickimagebase_p_p.h
+ items/qquickimplicitsizeitem.cpp items/qquickimplicitsizeitem_p.h
+ items/qquickimplicitsizeitem_p_p.h
+ items/qquickitem.cpp items/qquickitem.h items/qquickitem_p.h
+ items/qquickitemanimation.cpp items/qquickitemanimation_p.h
+ items/qquickitemanimation_p_p.h
+ items/qquickitemchangelistener_p.h
+ items/qquickitemgrabresult.cpp items/qquickitemgrabresult.h
+ items/qquickitemsmodule.cpp items/qquickitemsmodule_p.h
+ items/qquickloader.cpp items/qquickloader_p.h
+ items/qquickloader_p_p.h
+ items/qquickmousearea.cpp items/qquickmousearea_p.h
+ items/qquickmousearea_p_p.h
+ items/qquickmultipointtoucharea.cpp items/qquickmultipointtoucharea_p.h
+ items/qquickpainteditem.cpp items/qquickpainteditem.h items/qquickpainteditem_p.h
+ items/qquickpalette.cpp items/qquickpalette_p.h
+ items/qquickpalettecolorprovider.cpp items/qquickpalettecolorprovider_p.h
+ items/qquickpaletteproviderprivatebase_p.h
+ items/qquickpincharea.cpp items/qquickpincharea_p.h
+ items/qquickpincharea_p_p.h
+ items/qquickrectangle.cpp items/qquickrectangle_p.h
+ items/qquickrectangle_p_p.h
+ items/qquickrendercontrol.cpp items/qquickrendercontrol.h items/qquickrendercontrol_p.h
+ items/qquickrendertarget.cpp items/qquickrendertarget.h items/qquickrendertarget_p.h
+ items/qquickscalegrid.cpp
+ items/qquickscalegrid_p_p.h
+ items/qquickscreen.cpp items/qquickscreen_p.h
+ items/qquickstateoperations.cpp items/qquickstateoperations_p.h
+ items/qquicktext.cpp items/qquicktext_p.h
+ items/qquicktext_p_p.h
+ items/qquicktextcontrol.cpp items/qquicktextcontrol_p.h
+ items/qquicktextcontrol_p_p.h
+ items/qquicktextdocument.cpp items/qquicktextdocument.h items/qquicktextdocument_p.h
+ items/qquicktextedit.cpp items/qquicktextedit_p.h
+ items/qquicktextedit_p_p.h
+ items/qquicktextinput.cpp items/qquicktextinput_p.h
+ items/qquicktextinput_p_p.h
+ items/qquicktextnode.cpp items/qquicktextnode_p.h
+ items/qquicktextnodeengine.cpp items/qquicktextnodeengine_p.h
+ items/qquicktextutil.cpp items/qquicktextutil_p.h
+ items/qquicktranslate.cpp items/qquicktranslate_p.h
+ items/qquickview.cpp items/qquickview.h items/qquickview_p.h
+ items/qquickwindow.cpp items/qquickwindow.h items/qquickwindow_p.h
+ items/qquickwindowattached.cpp items/qquickwindowattached_p.h
+ items/qquickwindowmodule.cpp items/qquickwindowmodule_p.h
+ items/qquickwindowmodule_p_p.h
+ qtquick2.cpp qtquick2_p.h
+ qtquickglobal.h qtquickglobal_p.h
+ scenegraph/adaptations/software/qsgabstractsoftwarerenderer.cpp scenegraph/adaptations/software/qsgabstractsoftwarerenderer_p.h
+ scenegraph/adaptations/software/qsgsoftwareadaptation.cpp scenegraph/adaptations/software/qsgsoftwareadaptation_p.h
+ scenegraph/adaptations/software/qsgsoftwarecontext.cpp scenegraph/adaptations/software/qsgsoftwarecontext_p.h
+ scenegraph/adaptations/software/qsgsoftwareglyphnode.cpp scenegraph/adaptations/software/qsgsoftwareglyphnode_p.h
+ scenegraph/adaptations/software/qsgsoftwareinternalimagenode.cpp scenegraph/adaptations/software/qsgsoftwareinternalimagenode_p.h
+ scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode.cpp scenegraph/adaptations/software/qsgsoftwareinternalrectanglenode_p.h
+ scenegraph/adaptations/software/qsgsoftwarelayer.cpp scenegraph/adaptations/software/qsgsoftwarelayer_p.h
+ scenegraph/adaptations/software/qsgsoftwarepainternode.cpp scenegraph/adaptations/software/qsgsoftwarepainternode_p.h
+ scenegraph/adaptations/software/qsgsoftwarepixmaprenderer.cpp scenegraph/adaptations/software/qsgsoftwarepixmaprenderer_p.h
+ scenegraph/adaptations/software/qsgsoftwarepixmaptexture.cpp scenegraph/adaptations/software/qsgsoftwarepixmaptexture_p.h
+ scenegraph/adaptations/software/qsgsoftwarepublicnodes.cpp scenegraph/adaptations/software/qsgsoftwarepublicnodes_p.h
+ scenegraph/adaptations/software/qsgsoftwarerenderablenode.cpp scenegraph/adaptations/software/qsgsoftwarerenderablenode_p.h
+ scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater.cpp scenegraph/adaptations/software/qsgsoftwarerenderablenodeupdater_p.h
+ scenegraph/adaptations/software/qsgsoftwarerenderer.cpp scenegraph/adaptations/software/qsgsoftwarerenderer_p.h
+ scenegraph/adaptations/software/qsgsoftwarerenderlistbuilder.cpp scenegraph/adaptations/software/qsgsoftwarerenderlistbuilder_p.h
+ scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp scenegraph/adaptations/software/qsgsoftwarerenderloop_p.h
+ scenegraph/compressedtexture/qsgcompressedatlastexture.cpp scenegraph/compressedtexture/qsgcompressedatlastexture_p.h
+ scenegraph/compressedtexture/qsgcompressedtexture.cpp scenegraph/compressedtexture/qsgcompressedtexture_p.h
+ scenegraph/coreapi/qsgabstractrenderer.cpp scenegraph/coreapi/qsgabstractrenderer_p.h
+ scenegraph/coreapi/qsgabstractrenderer_p_p.h
+ scenegraph/coreapi/qsgbatchrenderer.cpp scenegraph/coreapi/qsgbatchrenderer_p.h
+ scenegraph/coreapi/qsggeometry.cpp scenegraph/coreapi/qsggeometry.h scenegraph/coreapi/qsggeometry_p.h
+ scenegraph/coreapi/qsgmaterial.cpp scenegraph/coreapi/qsgmaterial.h
+ scenegraph/coreapi/qsgmaterialshader.cpp scenegraph/coreapi/qsgmaterialshader.h scenegraph/coreapi/qsgmaterialshader_p.h
+ scenegraph/coreapi/qsgmaterialtype.h
+ scenegraph/coreapi/qsgnode.cpp scenegraph/coreapi/qsgnode.h scenegraph/coreapi/qsgnode_p.h
+ scenegraph/coreapi/qsgnodeupdater.cpp scenegraph/coreapi/qsgnodeupdater_p.h
+ scenegraph/coreapi/qsgrenderer.cpp scenegraph/coreapi/qsgrenderer_p.h
+ scenegraph/coreapi/qsgrendererinterface.cpp scenegraph/coreapi/qsgrendererinterface.h
+ scenegraph/coreapi/qsgrendernode.cpp scenegraph/coreapi/qsgrendernode.h scenegraph/coreapi/qsgrendernode_p.h
+ scenegraph/coreapi/qsgrhivisualizer.cpp scenegraph/coreapi/qsgrhivisualizer_p.h
+ scenegraph/coreapi/qsgtexture.cpp scenegraph/coreapi/qsgtexture.h scenegraph/coreapi/qsgtexture_p.h
+ scenegraph/qsgadaptationlayer.cpp scenegraph/qsgadaptationlayer_p.h
+ scenegraph/qsgbasicglyphnode.cpp scenegraph/qsgbasicglyphnode_p.h
+ scenegraph/qsgbasicinternalimagenode.cpp scenegraph/qsgbasicinternalimagenode_p.h
+ scenegraph/qsgbasicinternalrectanglenode.cpp scenegraph/qsgbasicinternalrectanglenode_p.h
+ scenegraph/qsgcontext.cpp scenegraph/qsgcontext_p.h
+ scenegraph/qsgcontextplugin.cpp scenegraph/qsgcontextplugin_p.h
+ scenegraph/qsgdefaultcontext.cpp scenegraph/qsgdefaultcontext_p.h
+ scenegraph/qsgdefaultglyphnode.cpp scenegraph/qsgdefaultglyphnode_p.cpp scenegraph/qsgdefaultglyphnode_p.h
+ scenegraph/qsgdefaultglyphnode_p_p.h
+ scenegraph/qsgdefaultinternalimagenode.cpp scenegraph/qsgdefaultinternalimagenode_p.h
+ scenegraph/qsgdefaultinternalrectanglenode.cpp scenegraph/qsgdefaultinternalrectanglenode_p.h
+ scenegraph/qsgdefaultrendercontext.cpp scenegraph/qsgdefaultrendercontext_p.h
+ scenegraph/qsgdistancefieldglyphnode.cpp scenegraph/qsgdistancefieldglyphnode_p.cpp scenegraph/qsgdistancefieldglyphnode_p.h
+ scenegraph/qsgdistancefieldglyphnode_p_p.h
+ scenegraph/qsgrenderloop.cpp scenegraph/qsgrenderloop_p.h
+ scenegraph/qsgrhidistancefieldglyphcache.cpp scenegraph/qsgrhidistancefieldglyphcache_p.h
+ scenegraph/qsgrhilayer.cpp scenegraph/qsgrhilayer_p.h
+ scenegraph/qsgrhishadereffectnode.cpp scenegraph/qsgrhishadereffectnode_p.h
+ scenegraph/qsgrhisupport.cpp scenegraph/qsgrhisupport_p.h
+ scenegraph/qsgrhitextureglyphcache.cpp scenegraph/qsgrhitextureglyphcache_p.h
+ scenegraph/util/qsgareaallocator.cpp scenegraph/util/qsgareaallocator_p.h
+ scenegraph/util/qsgdefaultimagenode.cpp scenegraph/util/qsgdefaultimagenode_p.h
+ scenegraph/util/qsgdefaultninepatchnode.cpp scenegraph/util/qsgdefaultninepatchnode_p.h
+ scenegraph/util/qsgdefaultpainternode.cpp scenegraph/util/qsgdefaultpainternode_p.h
+ scenegraph/util/qsgdefaultrectanglenode.cpp scenegraph/util/qsgdefaultrectanglenode_p.h
+ scenegraph/util/qsgflatcolormaterial.cpp scenegraph/util/qsgflatcolormaterial.h
+ scenegraph/util/qsgimagenode.cpp scenegraph/util/qsgimagenode.h
+ scenegraph/util/qsgninepatchnode.cpp scenegraph/util/qsgninepatchnode.h
+ scenegraph/util/qsgplaintexture.cpp scenegraph/util/qsgplaintexture_p.h
+ scenegraph/util/qsgrectanglenode.cpp scenegraph/util/qsgrectanglenode.h
+ scenegraph/util/qsgrhiatlastexture.cpp scenegraph/util/qsgrhiatlastexture_p.h
+ scenegraph/util/qsgsimplerectnode.cpp scenegraph/util/qsgsimplerectnode.h
+ scenegraph/util/qsgsimpletexturenode.cpp scenegraph/util/qsgsimpletexturenode.h
+ scenegraph/util/qsgtexturematerial.cpp scenegraph/util/qsgtexturematerial.h scenegraph/util/qsgtexturematerial_p.h
+ scenegraph/util/qsgtextureprovider.cpp scenegraph/util/qsgtextureprovider.h
+ scenegraph/util/qsgtexturereader.cpp scenegraph/util/qsgtexturereader_p.h
+ scenegraph/util/qsgvertexcolormaterial.cpp scenegraph/util/qsgvertexcolormaterial.h
+ util/qquickanimation.cpp util/qquickanimation_p.h
+ util/qquickanimation_p_p.h
+ util/qquickanimationcontroller.cpp util/qquickanimationcontroller_p.h
+ util/qquickanimator.cpp util/qquickanimator_p.h
+ util/qquickanimator_p_p.h
+ util/qquickanimatorcontroller.cpp util/qquickanimatorcontroller_p.h
+ util/qquickanimatorjob.cpp util/qquickanimatorjob_p.h
+ util/qquickapplication.cpp util/qquickapplication_p.h
+ util/qquickbehavior.cpp util/qquickbehavior_p.h
+ util/qquickfontloader.cpp util/qquickfontloader_p.h
+ util/qquickfontmetrics.cpp util/qquickfontmetrics_p.h
+ util/qquickforeignutils_p.h
+ util/qquickglobal.cpp
+ util/qquickimageprovider.cpp util/qquickimageprovider.h util/qquickimageprovider_p.h
+ util/qquickpixmapcache.cpp util/qquickpixmapcache_p.h
+ util/qquickprofiler_p.h
+ util/qquickpropertychanges.cpp util/qquickpropertychanges_p.h
+ util/qquicksmoothedanimation.cpp util/qquicksmoothedanimation_p.h
+ util/qquicksmoothedanimation_p_p.h
+ util/qquickspringanimation.cpp util/qquickspringanimation_p.h
+ util/qquickstate.cpp util/qquickstate_p.h
+ util/qquickstate_p_p.h
+ util/qquickstatechangescript.cpp util/qquickstatechangescript_p.h
+ util/qquickstategroup.cpp util/qquickstategroup_p.h
+ util/qquickstyledtext.cpp util/qquickstyledtext_p.h
+ util/qquicksvgparser.cpp util/qquicksvgparser_p.h
+ util/qquicksystempalette.cpp util/qquicksystempalette_p.h
+ util/qquicktextmetrics.cpp util/qquicktextmetrics_p.h
+ util/qquicktimeline.cpp
+ util/qquicktimeline_p_p.h
+ util/qquicktransition.cpp util/qquicktransition_p.h
+ util/qquicktransitionmanager.cpp
+ util/qquicktransitionmanager_p_p.h
+ util/qquickvalidator.cpp util/qquickvalidator_p.h
+ util/qquickvaluetypes.cpp util/qquickvaluetypes_p.h
+ DEFINES
+ QT_NO_FOREACH
+ QT_NO_INTEGER_EVENT_COORDINATES
+ QT_NO_URL_CAST_FROM_STRING
+ INCLUDE_DIRECTORIES
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Qt::QmlModelsPrivate
+ Qt::QmlPrivate
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ Qt::QmlModels
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Qt::QmlModelsPrivate
+ Qt::QmlPrivate
+)
+
+# Resources:
+set(scenegraph_resource_files
+ "shaders_ng/24bittextmask.frag.qsb"
+ "shaders_ng/32bitcolortext.frag.qsb"
+ "shaders_ng/8bittextmask.frag.qsb"
+ "shaders_ng/8bittextmask_a.frag.qsb"
+ "shaders_ng/distancefieldoutlinetext.frag.qsb"
+ "shaders_ng/distancefieldoutlinetext.vert.qsb"
+ "shaders_ng/distancefieldoutlinetext_a.frag.qsb"
+ "shaders_ng/distancefieldoutlinetext_a_fwidth.frag.qsb"
+ "shaders_ng/distancefieldoutlinetext_fwidth.frag.qsb"
+ "shaders_ng/distancefieldshiftedtext.frag.qsb"
+ "shaders_ng/distancefieldshiftedtext.vert.qsb"
+ "shaders_ng/distancefieldshiftedtext_a.frag.qsb"
+ "shaders_ng/distancefieldshiftedtext_a_fwidth.frag.qsb"
+ "shaders_ng/distancefieldshiftedtext_fwidth.frag.qsb"
+ "shaders_ng/distancefieldtext.frag.qsb"
+ "shaders_ng/distancefieldtext.vert.qsb"
+ "shaders_ng/distancefieldtext_a.frag.qsb"
+ "shaders_ng/distancefieldtext_a_fwidth.frag.qsb"
+ "shaders_ng/distancefieldtext_fwidth.frag.qsb"
+ "shaders_ng/flatcolor.frag.qsb"
+ "shaders_ng/flatcolor.vert.qsb"
+ "shaders_ng/hiqsubpixeldistancefieldtext.frag.qsb"
+ "shaders_ng/hiqsubpixeldistancefieldtext.vert.qsb"
+ "shaders_ng/hiqsubpixeldistancefieldtext_a.frag.qsb"
+ "shaders_ng/loqsubpixeldistancefieldtext.frag.qsb"
+ "shaders_ng/loqsubpixeldistancefieldtext.vert.qsb"
+ "shaders_ng/loqsubpixeldistancefieldtext_a.frag.qsb"
+ "shaders_ng/opaquetexture.frag.qsb"
+ "shaders_ng/opaquetexture.vert.qsb"
+ "shaders_ng/outlinedtext.frag.qsb"
+ "shaders_ng/outlinedtext.vert.qsb"
+ "shaders_ng/outlinedtext_a.frag.qsb"
+ "shaders_ng/shadereffect.frag.qsb"
+ "shaders_ng/shadereffect.vert.qsb"
+ "shaders_ng/smoothcolor.frag.qsb"
+ "shaders_ng/smoothcolor.vert.qsb"
+ "shaders_ng/smoothtexture.frag.qsb"
+ "shaders_ng/smoothtexture.vert.qsb"
+ "shaders_ng/sprite.frag.qsb"
+ "shaders_ng/sprite.vert.qsb"
+ "shaders_ng/stencilclip.frag.qsb"
+ "shaders_ng/stencilclip.vert.qsb"
+ "shaders_ng/styledtext.frag.qsb"
+ "shaders_ng/styledtext.vert.qsb"
+ "shaders_ng/styledtext_a.frag.qsb"
+ "shaders_ng/textmask.frag.qsb"
+ "shaders_ng/textmask.vert.qsb"
+ "shaders_ng/texture.frag.qsb"
+ "shaders_ng/texture.vert.qsb"
+ "shaders_ng/vertexcolor.frag.qsb"
+ "shaders_ng/vertexcolor.vert.qsb"
+ "shaders_ng/visualization.frag.qsb"
+ "shaders_ng/visualization.vert.qsb"
+)
+
+qt_add_resource(Quick "scenegraph"
+ PREFIX
+ "/qt-project.org/scenegraph"
+ BASE
+ "scenegraph"
+ FILES
+ ${scenegraph_resource_files}
+)
+
+
+if(ANDROID)
+ set_property(TARGET Quick APPEND PROPERTY QT_ANDROID_BUNDLED_FILES
+ qml
+ )
+endif()
+
+#### Keys ignored in scope 1:.:.:quick.pro:<TRUE>:
+# QMLTYPES_FILENAME = "plugins.qmltypes"
+# QMLTYPES_INSTALL_DIR = "$$[QT_INSTALL_QML]/QtQuick"
+# QML_IMPORT_NAME = "QtQuick"
+# QML_IMPORT_VERSION = "$$QT_VERSION"
+# qmldir.files = "$$PWD/../imports/window/qmldir"
+# qmldir.path = "$$[QT_INSTALL_QML]/QtQuick/Window"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(Quick CONDITION QT_FEATURE_qml_network
+ LIBRARIES
+ Qt::Network
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_opengl
+ LIBRARIES
+ Qt::OpenGLPrivate
+ PUBLIC_LIBRARIES
+ Qt::OpenGL
+)
+
+qt_extend_target(Quick CONDITION MSVC
+ DEFINES
+ _CRT_SECURE_NO_WARNINGS
+)
+
+#### Keys ignored in scope 5:.:.:quick.pro:solaris-cc_x_:
+# QMAKE_CXXFLAGS_RELEASE = "--O2"
+
+qt_extend_target(Quick CONDITION WIN32
+ PUBLIC_LIBRARIES
+ user32
+)
+
+qt_extend_target(Quick CONDITION EXISTS "qqml_enable_gcov"
+ LIBRARIES
+ gcov
+ COMPILE_OPTIONS
+ -fno-elide-constructors
+ -fprofile-arcs
+ -ftest-coverage
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_designer
+ SOURCES
+ designer/qqmldesignermetaobject.cpp designer/qqmldesignermetaobject_p.h
+ designer/qquickdesignercustomobjectdata.cpp designer/qquickdesignercustomobjectdata_p.h
+ designer/qquickdesignercustomparserobject.cpp designer/qquickdesignercustomparserobject_p.h
+ designer/qquickdesignersupport.cpp designer/qquickdesignersupport_p.h
+ designer/qquickdesignersupportitems.cpp designer/qquickdesignersupportitems_p.h
+ designer/qquickdesignersupportmetainfo.cpp designer/qquickdesignersupportmetainfo_p.h
+ designer/qquickdesignersupportproperties.cpp designer/qquickdesignersupportproperties_p.h
+ designer/qquickdesignersupportpropertychanges.cpp designer/qquickdesignersupportpropertychanges_p.h
+ designer/qquickdesignersupportstates.cpp designer/qquickdesignersupportstates_p.h
+ designer/qquickdesignerwindowmanager.cpp designer/qquickdesignerwindowmanager_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_accessibility
+ SOURCES
+ accessible/qaccessiblequickitem.cpp accessible/qaccessiblequickitem_p.h
+ accessible/qaccessiblequickview.cpp accessible/qaccessiblequickview_p.h
+ accessible/qquickaccessiblefactory.cpp accessible/qquickaccessiblefactory_p.h
+ LIBRARIES
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Qt::QmlPrivate
+ PUBLIC_LIBRARIES
+ Qt::Core
+ Qt::Gui
+ Qt::Qml
+ PRIVATE_MODULE_INTERFACE
+ Qt::CorePrivate
+ Qt::GuiPrivate
+ Qt::QmlPrivate
+)
+
+#### Keys ignored in scope 10:.:.:quick.pro:prefix_build:
+# INSTALLS = "qmldir"
+
+#### Keys ignored in scope 11:.:.:quick.pro:else:
+# COPIES = "qmldir"
+
+qt_extend_target(Quick CONDITION QT_FEATURE_qml_debug
+ SOURCES
+ util/qquickprofiler.cpp
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_shortcut
+ SOURCES
+ util/qquickshortcut.cpp util/qquickshortcut_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_path
+ SOURCES
+ util/qquickpath.cpp util/qquickpath_p.h
+ util/qquickpath_p_p.h
+ util/qquickpathinterpolator.cpp util/qquickpathinterpolator_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_thread
+ SOURCES
+ scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop_p.h
+ scenegraph/qsgthreadedrenderloop.cpp scenegraph/qsgthreadedrenderloop_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_sprite
+ SOURCES
+ items/qquickanimatedsprite.cpp items/qquickanimatedsprite_p.h
+ items/qquickanimatedsprite_p_p.h
+ items/qquicksprite.cpp items/qquicksprite_p.h
+ items/qquickspriteengine.cpp items/qquickspriteengine_p.h
+ items/qquickspritesequence.cpp items/qquickspritesequence_p.h
+ items/qquickspritesequence_p_p.h
+ scenegraph/adaptations/software/qsgsoftwarespritenode.cpp scenegraph/adaptations/software/qsgsoftwarespritenode_p.h
+ scenegraph/qsgdefaultspritenode.cpp scenegraph/qsgdefaultspritenode_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_draganddrop
+ SOURCES
+ items/qquickdrag.cpp items/qquickdrag_p.h
+ items/qquickdroparea.cpp items/qquickdroparea_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_animatedimage
+ SOURCES
+ items/qquickanimatedimage.cpp items/qquickanimatedimage_p.h
+ items/qquickanimatedimage_p_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_gridview
+ SOURCES
+ items/qquickgridview.cpp items/qquickgridview_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_itemview
+ SOURCES
+ items/qquickitemview.cpp items/qquickitemview_p.h
+ items/qquickitemview_p_p.h
+ items/qquickitemviewfxitem.cpp
+ items/qquickitemviewfxitem_p_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_viewtransitions
+ SOURCES
+ items/qquickitemviewtransition.cpp items/qquickitemviewtransition_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_listview
+ SOURCES
+ items/qquicklistview.cpp items/qquicklistview_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_tableview
+ SOURCES
+ items/qquicktableview.cpp items/qquicktableview_p.h
+ items/qquicktableview_p_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_pathview
+ SOURCES
+ items/qquickpathview.cpp items/qquickpathview_p.h
+ items/qquickpathview_p_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_positioners
+ SOURCES
+ items/qquickpositioners.cpp items/qquickpositioners_p.h
+ items/qquickpositioners_p_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_flipable
+ SOURCES
+ items/qquickflipable.cpp items/qquickflipable_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_repeater
+ SOURCES
+ items/qquickrepeater.cpp items/qquickrepeater_p.h
+ items/qquickrepeater_p_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_shadereffect
+ SOURCES
+ items/qquickshadereffect.cpp items/qquickshadereffect_p.h
+ items/qquickshadereffectmesh.cpp items/qquickshadereffectmesh_p.h
+ items/qquickshadereffectsource.cpp items/qquickshadereffectsource_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3
+ SOURCES
+ items/qquickframebufferobject.cpp items/qquickframebufferobject.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_quick_canvas
+ SOURCES
+ items/context2d/qquickcanvascontext.cpp items/context2d/qquickcanvascontext_p.h
+ items/context2d/qquickcanvasitem.cpp items/context2d/qquickcanvasitem_p.h
+ items/context2d/qquickcontext2d.cpp items/context2d/qquickcontext2d_p.h
+ items/context2d/qquickcontext2dcommandbuffer.cpp items/context2d/qquickcontext2dcommandbuffer_p.h
+ items/context2d/qquickcontext2dtexture.cpp items/context2d/qquickcontext2dtexture_p.h
+ items/context2d/qquickcontext2dtile.cpp items/context2d/qquickcontext2dtile_p.h
+)
+
+qt_extend_target(Quick CONDITION QT_FEATURE_wheelevent
+ SOURCES
+ handlers/qquickwheelhandler.cpp handlers/qquickwheelhandler_p.h
+ handlers/qquickwheelhandler_p_p.h
+)
+
+
+qt_create_tracepoints(Quick qtquick.tracepoints)
+qt_add_docs(Quick
+ doc/qtquick.qdocconf
+)
+
+
+set_target_properties(Quick PROPERTIES
+ QT_QML_MODULE_INSTALL_QMLTYPES TRUE
+ QT_QML_MODULE_VERSION ${CMAKE_PROJECT_VERSION}
+ QT_QML_MODULE_URI QtQuick
+ QT_QMLTYPES_FILENAME plugins.qmltypes
+ QT_QML_MODULE_INSTALL_DIR "${INSTALL_QMLDIR}/QtQuick"
+)
+
+qt6_qml_type_registration(Quick)
diff --git a/src/quick/CMakeLists.txt b/src/quick/CMakeLists.txt
index 74e1f494d7..5ccce5433c 100644
--- a/src/quick/CMakeLists.txt
+++ b/src/quick/CMakeLists.txt
@@ -106,8 +106,11 @@ qt_add_module(Quick
scenegraph/adaptations/software/qsgsoftwarerenderer.cpp scenegraph/adaptations/software/qsgsoftwarerenderer_p.h
scenegraph/adaptations/software/qsgsoftwarerenderlistbuilder.cpp scenegraph/adaptations/software/qsgsoftwarerenderlistbuilder_p.h
scenegraph/adaptations/software/qsgsoftwarerenderloop.cpp scenegraph/adaptations/software/qsgsoftwarerenderloop_p.h
+ scenegraph/compressedtexture/qsgcompressedatlastexture.cpp scenegraph/compressedtexture/qsgcompressedatlastexture_p.h
+ scenegraph/compressedtexture/qsgcompressedtexture.cpp scenegraph/compressedtexture/qsgcompressedtexture_p.h
scenegraph/coreapi/qsgabstractrenderer.cpp scenegraph/coreapi/qsgabstractrenderer_p.h
scenegraph/coreapi/qsgabstractrenderer_p_p.h
+ scenegraph/coreapi/qsgbatchrenderer.cpp scenegraph/coreapi/qsgbatchrenderer_p.h
scenegraph/coreapi/qsggeometry.cpp scenegraph/coreapi/qsggeometry.h scenegraph/coreapi/qsggeometry_p.h
scenegraph/coreapi/qsgmaterial.cpp scenegraph/coreapi/qsgmaterial.h
scenegraph/coreapi/qsgmaterialshader.cpp scenegraph/coreapi/qsgmaterialshader.h scenegraph/coreapi/qsgmaterialshader_p.h
@@ -117,6 +120,7 @@ qt_add_module(Quick
scenegraph/coreapi/qsgrenderer.cpp scenegraph/coreapi/qsgrenderer_p.h
scenegraph/coreapi/qsgrendererinterface.cpp scenegraph/coreapi/qsgrendererinterface.h
scenegraph/coreapi/qsgrendernode.cpp scenegraph/coreapi/qsgrendernode.h scenegraph/coreapi/qsgrendernode_p.h
+ scenegraph/coreapi/qsgrhivisualizer.cpp scenegraph/coreapi/qsgrhivisualizer_p.h
scenegraph/coreapi/qsgtexture.cpp scenegraph/coreapi/qsgtexture.h scenegraph/coreapi/qsgtexture_p.h
scenegraph/qsgadaptationlayer.cpp scenegraph/qsgadaptationlayer_p.h
scenegraph/qsgbasicglyphnode.cpp scenegraph/qsgbasicglyphnode_p.h
@@ -124,14 +128,31 @@ qt_add_module(Quick
scenegraph/qsgbasicinternalrectanglenode.cpp scenegraph/qsgbasicinternalrectanglenode_p.h
scenegraph/qsgcontext.cpp scenegraph/qsgcontext_p.h
scenegraph/qsgcontextplugin.cpp scenegraph/qsgcontextplugin_p.h
+ scenegraph/qsgdefaultcontext.cpp scenegraph/qsgdefaultcontext_p.h
+ scenegraph/qsgdefaultglyphnode.cpp scenegraph/qsgdefaultglyphnode_p.cpp scenegraph/qsgdefaultglyphnode_p.h
+ scenegraph/qsgdefaultglyphnode_p_p.h
+ scenegraph/qsgdefaultinternalimagenode.cpp scenegraph/qsgdefaultinternalimagenode_p.h
+ scenegraph/qsgdefaultinternalrectanglenode.cpp scenegraph/qsgdefaultinternalrectanglenode_p.h
+ scenegraph/qsgdefaultrendercontext.cpp scenegraph/qsgdefaultrendercontext_p.h
+ scenegraph/qsgdistancefieldglyphnode.cpp scenegraph/qsgdistancefieldglyphnode_p.cpp scenegraph/qsgdistancefieldglyphnode_p.h
+ scenegraph/qsgdistancefieldglyphnode_p_p.h
scenegraph/qsgrenderloop.cpp scenegraph/qsgrenderloop_p.h
+ scenegraph/qsgrhidistancefieldglyphcache.cpp scenegraph/qsgrhidistancefieldglyphcache_p.h
+ scenegraph/qsgrhilayer.cpp scenegraph/qsgrhilayer_p.h
+ scenegraph/qsgrhishadereffectnode.cpp scenegraph/qsgrhishadereffectnode_p.h
scenegraph/qsgrhisupport.cpp scenegraph/qsgrhisupport_p.h
+ scenegraph/qsgrhitextureglyphcache.cpp scenegraph/qsgrhitextureglyphcache_p.h
scenegraph/util/qsgareaallocator.cpp scenegraph/util/qsgareaallocator_p.h
+ scenegraph/util/qsgdefaultimagenode.cpp scenegraph/util/qsgdefaultimagenode_p.h
+ scenegraph/util/qsgdefaultninepatchnode.cpp scenegraph/util/qsgdefaultninepatchnode_p.h
+ scenegraph/util/qsgdefaultpainternode.cpp scenegraph/util/qsgdefaultpainternode_p.h
+ scenegraph/util/qsgdefaultrectanglenode.cpp scenegraph/util/qsgdefaultrectanglenode_p.h
scenegraph/util/qsgflatcolormaterial.cpp scenegraph/util/qsgflatcolormaterial.h
scenegraph/util/qsgimagenode.cpp scenegraph/util/qsgimagenode.h
scenegraph/util/qsgninepatchnode.cpp scenegraph/util/qsgninepatchnode.h
scenegraph/util/qsgplaintexture.cpp scenegraph/util/qsgplaintexture_p.h
scenegraph/util/qsgrectanglenode.cpp scenegraph/util/qsgrectanglenode.h
+ scenegraph/util/qsgrhiatlastexture.cpp scenegraph/util/qsgrhiatlastexture_p.h
scenegraph/util/qsgsimplerectnode.cpp scenegraph/util/qsgsimplerectnode.h
scenegraph/util/qsgsimpletexturenode.cpp scenegraph/util/qsgsimpletexturenode.h
scenegraph/util/qsgtexturematerial.cpp scenegraph/util/qsgtexturematerial.h scenegraph/util/qsgtexturematerial_p.h
@@ -205,12 +226,18 @@ set(scenegraph_resource_files
"shaders_ng/distancefieldoutlinetext.frag.qsb"
"shaders_ng/distancefieldoutlinetext.vert.qsb"
"shaders_ng/distancefieldoutlinetext_a.frag.qsb"
+ "shaders_ng/distancefieldoutlinetext_a_fwidth.frag.qsb"
+ "shaders_ng/distancefieldoutlinetext_fwidth.frag.qsb"
"shaders_ng/distancefieldshiftedtext.frag.qsb"
"shaders_ng/distancefieldshiftedtext.vert.qsb"
"shaders_ng/distancefieldshiftedtext_a.frag.qsb"
+ "shaders_ng/distancefieldshiftedtext_a_fwidth.frag.qsb"
+ "shaders_ng/distancefieldshiftedtext_fwidth.frag.qsb"
"shaders_ng/distancefieldtext.frag.qsb"
"shaders_ng/distancefieldtext.vert.qsb"
"shaders_ng/distancefieldtext_a.frag.qsb"
+ "shaders_ng/distancefieldtext_a_fwidth.frag.qsb"
+ "shaders_ng/distancefieldtext_fwidth.frag.qsb"
"shaders_ng/flatcolor.frag.qsb"
"shaders_ng/flatcolor.vert.qsb"
"shaders_ng/hiqsubpixeldistancefieldtext.frag.qsb"
@@ -255,25 +282,6 @@ qt_add_resource(Quick "scenegraph"
FILES
${scenegraph_resource_files}
)
-set(items_resource_files
- "shaders/shadereffect.frag"
- "shaders/shadereffect.vert"
- "shaders/shadereffect_core.frag"
- "shaders/shadereffect_core.vert"
- "shaders/shadereffectfallback.frag"
- "shaders/shadereffectfallback.vert"
- "shaders/shadereffectfallback_core.frag"
- "shaders/shadereffectfallback_core.vert"
-)
-
-qt_add_resource(Quick "items"
- PREFIX
- "/qt-project.org/items"
- BASE
- "items"
- FILES
- ${items_resource_files}
-)
if(ANDROID)
@@ -383,42 +391,12 @@ qt_extend_target(Quick CONDITION QT_FEATURE_quick_path
util/qquickpathinterpolator.cpp util/qquickpathinterpolator_p.h
)
-qt_extend_target(Quick CONDITION QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3
- SOURCES
- items/qquickframebufferobject.cpp items/qquickframebufferobject.h
- scenegraph/compressedtexture/qsgcompressedatlastexture.cpp scenegraph/compressedtexture/qsgcompressedatlastexture_p.h
- scenegraph/compressedtexture/qsgcompressedtexture.cpp scenegraph/compressedtexture/qsgcompressedtexture_p.h
- scenegraph/coreapi/qsgbatchrenderer.cpp scenegraph/coreapi/qsgbatchrenderer_p.h
- scenegraph/coreapi/qsgrhivisualizer.cpp scenegraph/coreapi/qsgrhivisualizer_p.h
- scenegraph/qsgdefaultcontext.cpp scenegraph/qsgdefaultcontext_p.h
- scenegraph/qsgdefaultglyphnode.cpp scenegraph/qsgdefaultglyphnode_p.cpp scenegraph/qsgdefaultglyphnode_p.h
- scenegraph/qsgdefaultglyphnode_p_p.h
- scenegraph/qsgdefaultinternalimagenode.cpp scenegraph/qsgdefaultinternalimagenode_p.h
- scenegraph/qsgdefaultinternalrectanglenode.cpp scenegraph/qsgdefaultinternalrectanglenode_p.h
- scenegraph/qsgdefaultrendercontext.cpp scenegraph/qsgdefaultrendercontext_p.h
- scenegraph/qsgdistancefieldglyphnode.cpp scenegraph/qsgdistancefieldglyphnode_p.cpp scenegraph/qsgdistancefieldglyphnode_p.h
- scenegraph/qsgdistancefieldglyphnode_p_p.h
- scenegraph/qsgrhidistancefieldglyphcache.cpp scenegraph/qsgrhidistancefieldglyphcache_p.h
- scenegraph/qsgrhilayer.cpp scenegraph/qsgrhilayer_p.h
- scenegraph/qsgrhishadereffectnode.cpp scenegraph/qsgrhishadereffectnode_p.h
- scenegraph/qsgrhitextureglyphcache.cpp scenegraph/qsgrhitextureglyphcache_p.h
- scenegraph/util/qsgdefaultimagenode.cpp scenegraph/util/qsgdefaultimagenode_p.h
- scenegraph/util/qsgdefaultninepatchnode.cpp scenegraph/util/qsgdefaultninepatchnode_p.h
- scenegraph/util/qsgdefaultpainternode.cpp scenegraph/util/qsgdefaultpainternode_p.h
- scenegraph/util/qsgdefaultrectanglenode.cpp scenegraph/util/qsgdefaultrectanglenode_p.h
- scenegraph/util/qsgrhiatlastexture.cpp scenegraph/util/qsgrhiatlastexture_p.h
-)
-
-qt_extend_target(Quick CONDITION QT_FEATURE_thread AND (QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3)
+qt_extend_target(Quick CONDITION QT_FEATURE_thread
SOURCES
+ scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop_p.h
scenegraph/qsgthreadedrenderloop.cpp scenegraph/qsgthreadedrenderloop_p.h
)
-qt_extend_target(Quick CONDITION QT_FEATURE_quick_sprite AND (QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3)
- SOURCES
- scenegraph/qsgdefaultspritenode.cpp scenegraph/qsgdefaultspritenode_p.h
-)
-
qt_extend_target(Quick CONDITION QT_FEATURE_quick_sprite
SOURCES
items/qquickanimatedsprite.cpp items/qquickanimatedsprite_p.h
@@ -428,11 +406,7 @@ qt_extend_target(Quick CONDITION QT_FEATURE_quick_sprite
items/qquickspritesequence.cpp items/qquickspritesequence_p.h
items/qquickspritesequence_p_p.h
scenegraph/adaptations/software/qsgsoftwarespritenode.cpp scenegraph/adaptations/software/qsgsoftwarespritenode_p.h
-)
-
-qt_extend_target(Quick CONDITION QT_FEATURE_thread
- SOURCES
- scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop.cpp scenegraph/adaptations/software/qsgsoftwarethreadedrenderloop_p.h
+ scenegraph/qsgdefaultspritenode.cpp scenegraph/qsgdefaultspritenode_p.h
)
qt_extend_target(Quick CONDITION QT_FEATURE_quick_draganddrop
@@ -506,8 +480,10 @@ qt_extend_target(Quick CONDITION QT_FEATURE_quick_shadereffect
items/qquickshadereffectsource.cpp items/qquickshadereffectsource_p.h
)
-#### Keys ignored in scope 41:.:items:items/items.pri:QT_FEATURE_opengl:
-# OTHER_FILES = "$$PWD/shaders/shadereffect.vert" "$$PWD/shaders/shadereffect.frag" "$$PWD/shaders/shadereffectfallback.vert" "$$PWD/shaders/shadereffectfallback.frag" "$$PWD/shaders/shadereffect_core.vert" "$$PWD/shaders/shadereffect_core.frag" "$$PWD/shaders/shadereffectfallback_core.vert" "$$PWD/shaders/shadereffectfallback_core.frag"
+qt_extend_target(Quick CONDITION QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3
+ SOURCES
+ items/qquickframebufferobject.cpp items/qquickframebufferobject.h
+)
qt_extend_target(Quick CONDITION QT_FEATURE_quick_canvas
SOURCES
diff --git a/src/quick/configure.json b/src/quick/configure.json
index fbb70fe572..d29f8e3eaf 100644
--- a/src/quick/configure.json
+++ b/src/quick/configure.json
@@ -107,7 +107,7 @@
"label": "Particle support",
"purpose": "Provides a particle system.",
"section": "Qt Quick",
- "condition": "module.gui && features.quick-shadereffect && features.quick-sprite && features.opengl",
+ "condition": "module.gui && features.quick-shadereffect && features.quick-sprite",
"output": [
"privateFeature"
]
diff --git a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp
index 73b52d0c73..e3f8acad00 100644
--- a/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp
+++ b/src/quick/items/context2d/qquickcontext2dcommandbuffer.cpp
@@ -43,10 +43,6 @@
#include <QtCore/QMutex>
#include <QtQuick/qsgtexture.h>
#include <QtGui/QPaintEngine>
-#if QT_CONFIG(opengl)
-# include <QOpenGLContext>
-# include <private/qopenglpaintengine_p.h>
-#endif
#define HAS_SHADOW(offsetX, offsetY, blur, color) (color.isValid() && color.alpha() && (blur || offsetX || offsetY))
diff --git a/src/quick/items/items.pri b/src/quick/items/items.pri
index c3f350809d..dd477d0e5a 100644
--- a/src/quick/items/items.pri
+++ b/src/quick/items/items.pri
@@ -214,18 +214,6 @@ qtConfig(quick-shadereffect) {
$$PWD/qquickshadereffectsource.cpp \
$$PWD/qquickshadereffectmesh.cpp \
$$PWD/qquickshadereffect.cpp
-
- qtConfig(opengl) {
- OTHER_FILES += \
- $$PWD/shaders/shadereffect.vert \
- $$PWD/shaders/shadereffect.frag \
- $$PWD/shaders/shadereffectfallback.vert \
- $$PWD/shaders/shadereffectfallback.frag \
- $$PWD/shaders/shadereffect_core.vert \
- $$PWD/shaders/shadereffect_core.frag \
- $$PWD/shaders/shadereffectfallback_core.vert \
- $$PWD/shaders/shadereffectfallback_core.frag
- }
}
qtConfig(quick-sprite) {
@@ -252,8 +240,6 @@ qtConfig(opengl(es1|es2)?) {
$$PWD/qquickframebufferobject.h
}
-RESOURCES += \
- $$PWD/items.qrc
qtConfig(quick-canvas): \
include(context2d/context2d.pri)
diff --git a/src/quick/items/items.qrc b/src/quick/items/items.qrc
deleted file mode 100644
index 6aaf757c29..0000000000
--- a/src/quick/items/items.qrc
+++ /dev/null
@@ -1,12 +0,0 @@
-<RCC>
- <qresource prefix="/qt-project.org/items">
- <file>shaders/shadereffect.vert</file>
- <file>shaders/shadereffect.frag</file>
- <file>shaders/shadereffectfallback.frag</file>
- <file>shaders/shadereffectfallback.vert</file>
- <file>shaders/shadereffect_core.frag</file>
- <file>shaders/shadereffect_core.vert</file>
- <file>shaders/shadereffectfallback_core.frag</file>
- <file>shaders/shadereffectfallback_core.vert</file>
- </qresource>
-</RCC>
diff --git a/src/quick/items/qquickitemsmodule.cpp b/src/quick/items/qquickitemsmodule.cpp
index 12d9a499e4..a34ffa829d 100644
--- a/src/quick/items/qquickitemsmodule.cpp
+++ b/src/quick/items/qquickitemsmodule.cpp
@@ -182,16 +182,16 @@ static void qt_quickitems_defineModule()
qRegisterMetaType<QQuickHandlerPoint>();
}
-static void initResources()
-{
- Q_INIT_RESOURCE(items);
-}
+//static void initResources()
+//{
+// Q_INIT_RESOURCE(items);
+//}
QT_BEGIN_NAMESPACE
void QQuickItemsModule::defineModule()
{
- initResources();
+// initResources();
qt_quickitems_defineModule();
}
diff --git a/src/quick/items/qquickpainteditem.cpp b/src/quick/items/qquickpainteditem.cpp
index 6490f4dcdd..6a9599badf 100644
--- a/src/quick/items/qquickpainteditem.cpp
+++ b/src/quick/items/qquickpainteditem.cpp
@@ -640,13 +640,11 @@ QSGTextureProvider *QQuickPaintedItem::textureProvider() const
return QQuickItem::textureProvider();
Q_D(const QQuickPaintedItem);
-#if QT_CONFIG(opengl)
QQuickWindow *w = window();
- if (!w || !w->isSceneGraphInitialized() || QThread::currentThread() != QQuickWindowPrivate::get(w)->context->thread()) {
+ if (!w || !w->isSceneGraphInitialized() || QThread::currentThread() != d->sceneGraphContext()->thread()) {
qWarning("QQuickPaintedItem::textureProvider: can only be queried on the rendering thread of an exposed window");
return nullptr;
}
-#endif
if (!d->textureProvider)
d->textureProvider = new QQuickPaintedItemTextureProvider();
d->textureProvider->node = d->node;
diff --git a/src/quick/items/qquickrendercontrol.cpp b/src/quick/items/qquickrendercontrol.cpp
index 53c0b6b731..51483bce57 100644
--- a/src/quick/items/qquickrendercontrol.cpp
+++ b/src/quick/items/qquickrendercontrol.cpp
@@ -203,8 +203,7 @@ void QQuickRenderControlPrivate::windowDestroyed()
rc->invalidate();
QQuickWindowPrivate::get(window)->animationController.reset();
-// ### Qt 6 clean this up
-#if QT_CONFIG(quick_shadereffect) && QT_CONFIG(opengl)
+#if QT_CONFIG(quick_shadereffect)
QSGRhiShaderEffectNode::cleanupMaterialTypeCache();
#endif
window = nullptr;
@@ -281,8 +280,6 @@ int QQuickRenderControl::samples() const
bool QQuickRenderControl::initialize()
{
Q_D(QQuickRenderControl);
-// ### Qt 6 clean this up
-#if QT_CONFIG(opengl)
if (!d->window) {
qWarning("QQuickRenderControl::initialize called with no associated window");
return false;
@@ -306,7 +303,6 @@ bool QQuickRenderControl::initialize()
qWarning("QRhi is only compatible with default adaptation");
return false;
}
-#endif
return true;
}
diff --git a/src/quick/items/qquickshadereffect.cpp b/src/quick/items/qquickshadereffect.cpp
index c4c48fdea5..a19d881419 100644
--- a/src/quick/items/qquickshadereffect.cpp
+++ b/src/quick/items/qquickshadereffect.cpp
@@ -40,9 +40,7 @@
#include <private/qquickshadereffect_p.h>
#include <private/qsgcontextplugin_p.h>
#include <private/qquickitem_p.h>
-#if QT_CONFIG(opengl) /* || QT_CONFIG(vulkan) || defined(Q_OS_WIN) || defined(Q_OS_DARWIN) */
#include <private/qsgrhisupport_p.h>
-#endif
#include <private/qquickwindow_p.h>
#include <private/qquickitem_p.h>
diff --git a/src/quick/items/qquickspriteengine.cpp b/src/quick/items/qquickspriteengine.cpp
index 3e4ed8707b..f20d8bc6c8 100644
--- a/src/quick/items/qquickspriteengine.cpp
+++ b/src/quick/items/qquickspriteengine.cpp
@@ -45,8 +45,6 @@
#include <QPainter>
#include <QRandomGenerator>
#include <QSet>
-#include <qopengl.h>
-#include <QOpenGLFunctions>
QT_BEGIN_NAMESPACE
diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp
index 22d99be2c0..faf4eb1b50 100644
--- a/src/quick/items/qquickwindow.cpp
+++ b/src/quick/items/qquickwindow.cpp
@@ -80,8 +80,8 @@
#include <private/qqmldebugserviceinterfaces_p.h>
#include <private/qqmldebugconnector_p.h>
-#if QT_CONFIG(opengl)
#include <private/qsgdefaultrendercontext_p.h>
+#if QT_CONFIG(opengl)
#include <private/qopengl_p.h>
#include <QOpenGLContext>
#endif
@@ -105,7 +105,6 @@ Q_LOGGING_CATEGORY(DBG_FOCUS, "qt.quick.focus")
Q_LOGGING_CATEGORY(DBG_DIRTY, "qt.quick.dirty")
Q_LOGGING_CATEGORY(lcTransient, "qt.quick.window.transient")
-extern Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include_alpha);
extern Q_GUI_EXPORT bool qt_sendShortcutOverrideEvent(QObject *o, ulong timestamp, int k, Qt::KeyboardModifiers mods, const QString &text = QString(), bool autorep = false, ushort count = 1);
bool QQuickWindowPrivate::defaultAlphaBuffer = false;
@@ -4791,7 +4790,6 @@ QSGTexture *QQuickWindow::createTextureFromNativeObject(NativeObjectType type,
return nullptr;
}
-#if QT_CONFIG(opengl) /* || QT_CONFIG(vulkan) || defined(Q_OS_WIN) || defined(Q_OS_DARWIN) */
Q_D(const QQuickWindow);
if (d->rhi) {
QSGPlainTexture *texture = new QSGPlainTexture;
@@ -4803,12 +4801,6 @@ QSGTexture *QQuickWindow::createTextureFromNativeObject(NativeObjectType type,
texture->setTextureSize(size);
return texture;
}
-#else
- Q_UNUSED(nativeObjectHandle);
- Q_UNUSED(nativeLayout);
- Q_UNUSED(size);
- Q_UNUSED(options);
-#endif
return nullptr;
}
@@ -4950,7 +4942,6 @@ const QQuickWindow::GraphicsStateInfo &QQuickWindow::graphicsStateInfo()
*/
void QQuickWindow::beginExternalCommands()
{
-#if QT_CONFIG(opengl) /* || QT_CONFIG(vulkan) || defined(Q_OS_WIN) || defined(Q_OS_DARWIN) */
Q_D(QQuickWindow);
if (d->rhi && d->context && d->context->isValid()) {
QSGDefaultRenderContext *rc = static_cast<QSGDefaultRenderContext *>(d->context);
@@ -4958,7 +4949,6 @@ void QQuickWindow::beginExternalCommands()
if (cb)
cb->beginExternal();
}
-#endif
}
/*!
@@ -4989,7 +4979,6 @@ void QQuickWindow::beginExternalCommands()
*/
void QQuickWindow::endExternalCommands()
{
-#if QT_CONFIG(opengl) /* || QT_CONFIG(vulkan) || defined(Q_OS_WIN) || defined(Q_OS_DARWIN) */
Q_D(QQuickWindow);
if (d->rhi && d->context && d->context->isValid()) {
QSGDefaultRenderContext *rc = static_cast<QSGDefaultRenderContext *>(d->context);
@@ -4997,7 +4986,6 @@ void QQuickWindow::endExternalCommands()
if (cb)
cb->endExternal();
}
-#endif
}
/*!
@@ -5581,10 +5569,8 @@ void QQuickWindow::setSceneGraphBackend(QSGRendererInterface::GraphicsApi api)
default:
break;
}
-#if QT_CONFIG(opengl) /* || QT_CONFIG(vulkan) || defined(Q_OS_WIN) || defined(Q_OS_DARWIN) */
if (QSGRendererInterface::isApiRhiBased(api))
QSGRhiSupport::configure(api);
-#endif
}
/*!
diff --git a/src/quick/items/qquickwindow.h b/src/quick/items/qquickwindow.h
index 972d44b1c3..dc9eeb4e70 100644
--- a/src/quick/items/qquickwindow.h
+++ b/src/quick/items/qquickwindow.h
@@ -44,7 +44,6 @@
#include <QtQuick/qsgrendererinterface.h>
#include <QtCore/qmetatype.h>
-#include <QtGui/qopengl.h>
#include <QtGui/qwindow.h>
#include <QtGui/qevent.h>
#include <QtQml/qqml.h>
diff --git a/src/quick/items/shaders/shadereffect.frag b/src/quick/items/shaders/shadereffect.frag
deleted file mode 100644
index c1c15ecb0c..0000000000
--- a/src/quick/items/shaders/shadereffect.frag
+++ /dev/null
@@ -1,9 +0,0 @@
-varying highp vec2 qt_TexCoord0;
-
-uniform sampler2D source;
-uniform lowp float qt_Opacity;
-
-void main()
-{
- gl_FragColor = texture2D(source, qt_TexCoord0) * qt_Opacity;
-} \ No newline at end of file
diff --git a/src/quick/items/shaders/shadereffect.vert b/src/quick/items/shaders/shadereffect.vert
deleted file mode 100644
index ae1e84a50c..0000000000
--- a/src/quick/items/shaders/shadereffect.vert
+++ /dev/null
@@ -1,12 +0,0 @@
-uniform highp mat4 qt_Matrix;
-
-attribute highp vec4 qt_Vertex;
-attribute highp vec2 qt_MultiTexCoord0;
-
-varying highp vec2 qt_TexCoord0;
-
-void main()
-{
- qt_TexCoord0 = qt_MultiTexCoord0;
- gl_Position = qt_Matrix * qt_Vertex;
-} \ No newline at end of file
diff --git a/src/quick/items/shaders/shadereffect_core.frag b/src/quick/items/shaders/shadereffect_core.frag
deleted file mode 100644
index 2163753edc..0000000000
--- a/src/quick/items/shaders/shadereffect_core.frag
+++ /dev/null
@@ -1,13 +0,0 @@
-#version 150 core
-
-in vec2 qt_TexCoord0;
-
-out vec4 fragColor;
-
-uniform sampler2D source;
-uniform float qt_Opacity;
-
-void main()
-{
- fragColor = texture(source, qt_TexCoord0) * qt_Opacity;
-} \ No newline at end of file
diff --git a/src/quick/items/shaders/shadereffect_core.vert b/src/quick/items/shaders/shadereffect_core.vert
deleted file mode 100644
index 2ed2d47b5f..0000000000
--- a/src/quick/items/shaders/shadereffect_core.vert
+++ /dev/null
@@ -1,14 +0,0 @@
-#version 150 core
-
-in vec4 qt_Vertex;
-in vec2 qt_MultiTexCoord0;
-
-out vec2 qt_TexCoord0;
-
-uniform mat4 qt_Matrix;
-
-void main()
-{
- qt_TexCoord0 = qt_MultiTexCoord0;
- gl_Position = qt_Matrix * qt_Vertex;
-} \ No newline at end of file
diff --git a/src/quick/items/shaders/shadereffectfallback.frag b/src/quick/items/shaders/shadereffectfallback.frag
deleted file mode 100644
index d279e54083..0000000000
--- a/src/quick/items/shaders/shadereffectfallback.frag
+++ /dev/null
@@ -1,4 +0,0 @@
-void main()
-{
- gl_FragColor = vec4(1., 0., 1., 1.);
-} \ No newline at end of file
diff --git a/src/quick/items/shaders/shadereffectfallback.vert b/src/quick/items/shaders/shadereffectfallback.vert
deleted file mode 100644
index 0a11a1d340..0000000000
--- a/src/quick/items/shaders/shadereffectfallback.vert
+++ /dev/null
@@ -1,8 +0,0 @@
-uniform highp mat4 qt_Matrix;
-
-attribute highp vec4 v;
-
-void main()
-{
- gl_Position = qt_Matrix * v;
-} \ No newline at end of file
diff --git a/src/quick/items/shaders/shadereffectfallback_core.frag b/src/quick/items/shaders/shadereffectfallback_core.frag
deleted file mode 100644
index 4abf124737..0000000000
--- a/src/quick/items/shaders/shadereffectfallback_core.frag
+++ /dev/null
@@ -1,8 +0,0 @@
-#version 150 core
-
-out vec4 fragColor;
-
-void main()
-{
- fragColor = vec4(1., 0., 1., 1.);
-} \ No newline at end of file
diff --git a/src/quick/items/shaders/shadereffectfallback_core.vert b/src/quick/items/shaders/shadereffectfallback_core.vert
deleted file mode 100644
index b1ca84cc6d..0000000000
--- a/src/quick/items/shaders/shadereffectfallback_core.vert
+++ /dev/null
@@ -1,10 +0,0 @@
-#version 150 core
-
-in vec4 v;
-
-uniform mat4 qt_Matrix;
-
-void main()
-{
- gl_Position = qt_Matrix * v;
-} \ No newline at end of file
diff --git a/src/quick/quick.pro b/src/quick/quick.pro
index 43abc477f7..c117ed7a29 100644
--- a/src/quick/quick.pro
+++ b/src/quick/quick.pro
@@ -3,6 +3,8 @@ TARGET = QtQuick
QT = core-private gui-private qml-private qmlmodels-private
qtConfig(qml-network): \
QT_PRIVATE += network
+
+### To support compatibility API that is only available when using RHI/OpenGL
qtConfig(opengl) {
QT_PRIVATE += opengl-private
QT += opengl
diff --git a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
index e266dd849a..23469ddcdf 100644
--- a/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgbatchrenderer.cpp
@@ -2370,10 +2370,10 @@ void Renderer::updateClipState(const QSGClipNode *clipList, Batch *batch)
QRect deviceRect = this->deviceRect();
- GLint ix1 = qRound((fx1 + 1) * deviceRect.width() * qreal(0.5));
- GLint iy1 = qRound((fy1 + 1) * deviceRect.height() * qreal(0.5));
- GLint ix2 = qRound((fx2 + 1) * deviceRect.width() * qreal(0.5));
- GLint iy2 = qRound((fy2 + 1) * deviceRect.height() * qreal(0.5));
+ qint32 ix1 = qRound((fx1 + 1) * deviceRect.width() * qreal(0.5));
+ qint32 iy1 = qRound((fy1 + 1) * deviceRect.height() * qreal(0.5));
+ qint32 ix2 = qRound((fx2 + 1) * deviceRect.width() * qreal(0.5));
+ qint32 iy2 = qRound((fy2 + 1) * deviceRect.height() * qreal(0.5));
if (!(clipType & ClipState::ScissorClip)) {
clipType |= ClipState::ScissorClip;
diff --git a/src/quick/scenegraph/coreapi/qsggeometry.h b/src/quick/scenegraph/coreapi/qsggeometry.h
index 9c60876597..060d896b3c 100644
--- a/src/quick/scenegraph/coreapi/qsggeometry.h
+++ b/src/quick/scenegraph/coreapi/qsggeometry.h
@@ -41,7 +41,6 @@
#define QSGGEOMETRY_H
#include <QtQuick/qtquickglobal.h>
-#include <qopengl.h>
#include <QtCore/QRectF>
QT_BEGIN_NAMESPACE
diff --git a/src/quick/scenegraph/coreapi/qsgrenderer.cpp b/src/quick/scenegraph/coreapi/qsgrenderer.cpp
index 23aa2203c2..232ce473d0 100644
--- a/src/quick/scenegraph/coreapi/qsgrenderer.cpp
+++ b/src/quick/scenegraph/coreapi/qsgrenderer.cpp
@@ -46,10 +46,6 @@
QT_BEGIN_NAMESPACE
-#if QT_CONFIG(opengl)
-static const bool qsg_sanity_check = qEnvironmentVariableIntValue("QSG_SANITY_CHECK");
-#endif
-
static QElapsedTimer frameTimer;
static qint64 preprocessTime;
static qint64 updatePassTime;
diff --git a/src/quick/scenegraph/qsgcontextplugin.cpp b/src/quick/scenegraph/qsgcontextplugin.cpp
index 7dfb8488ae..ed054f3aa0 100644
--- a/src/quick/scenegraph/qsgcontextplugin.cpp
+++ b/src/quick/scenegraph/qsgcontextplugin.cpp
@@ -45,9 +45,7 @@
// Built-in adaptations
#include <QtQuick/private/qsgsoftwareadaptation_p.h>
-#if QT_CONFIG(opengl)
#include <QtQuick/private/qsgdefaultcontext_p.h>
-#endif
#include <QtGui/private/qguiapplication_p.h>
#include <QtGui/qpa/qplatformintegration.h>
@@ -135,13 +133,14 @@ QSGAdaptationBackendData *contextFactory()
if (requestedBackend.isEmpty())
requestedBackend = qEnvironmentVariable("QT_QUICK_BACKEND");
- // If this platform does not support OpenGL, and no backend has been set
+ // If this platform does not support OpenGL, Vulkan, D3D11, or Metal, and no backend has been set
// default to the software renderer
+#if !QT_CONFIG(vulkan) && !defined(Q_OS_WIN) && !defined(Q_OS_MACOS) && !defined(Q_OS_IOS)
if (requestedBackend.isEmpty()
&& !QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::OpenGL)) {
requestedBackend = QString::fromLocal8Bit("software");
}
-
+#endif
if (!requestedBackend.isEmpty()) {
qCDebug(QSG_LOG_INFO, "Loading backend %s", qUtf8Printable(requestedBackend));
@@ -192,11 +191,7 @@ QSGContext *QSGContext::createDefaultContext()
QSGAdaptationBackendData *backendData = contextFactory();
if (backendData->factory)
return backendData->factory->create(backendData->name);
-#if QT_CONFIG(opengl)
return new QSGDefaultContext();
-#else
- return nullptr;
-#endif
}
diff --git a/src/quick/scenegraph/qsgdefaultcontext.cpp b/src/quick/scenegraph/qsgdefaultcontext.cpp
index 83baecc276..b36c0de6ef 100644
--- a/src/quick/scenegraph/qsgdefaultcontext.cpp
+++ b/src/quick/scenegraph/qsgdefaultcontext.cpp
@@ -135,6 +135,7 @@ void QSGDefaultContext::renderContextInitialized(QSGRenderContext *renderContext
m_antialiasingMethod = rc->msaaSampleCount() > 1 ? MsaaAntialiasing : VertexAntialiasing;
}
+#if QT_CONFIG(opengl)
// With OpenGL ES, use GrayAntialiasing, unless
// some value had been requested explicitly. This could not be decided
// before without a context. Now the context is ready.
@@ -147,6 +148,7 @@ void QSGDefaultContext::renderContextInitialized(QSGRenderContext *renderContext
m_distanceFieldAntialiasing = QSGGlyphNode::GrayAntialiasing;
}
}
+#endif
m_mutex.unlock();
}
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
index b158a68dcb..475dbea393 100644
--- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
+++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp
@@ -480,7 +480,7 @@ void QSGTextMaskMaterial::populate(const QPointF &p,
qreal glyphCacheInverseScaleY = 1.0 / glyphCacheScaleY;
qreal scaledMargin = margin * glyphCacheInverseScaleX;
- Q_ASSERT(geometry->indexType() == GL_UNSIGNED_SHORT);
+ Q_ASSERT(geometry->indexType() == QSGGeometry::UnsignedShortType);
geometry->allocate(glyphIndexes.size() * 4, glyphIndexes.size() * 6);
QVector4D *vp = (QVector4D *)geometry->vertexDataAsTexturedPoint2D();
Q_ASSERT(geometry->sizeOfVertex() == sizeof(QVector4D));
diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h
index c9e181a7dc..91cdbdc52f 100644
--- a/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h
+++ b/src/quick/scenegraph/qsgdefaultglyphnode_p_p.h
@@ -52,7 +52,6 @@
//
#include <qcolor.h>
-#include <private/qopengltextureglyphcache_p.h>
#include <QtQuick/qsgmaterial.h>
#include <QtQuick/qsgtexture.h>
#include <QtQuick/qsggeometry.h>
diff --git a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp
index ddcbdbefb1..70ba9f005d 100644
--- a/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp
+++ b/src/quick/scenegraph/qsgdistancefieldglyphnode.cpp
@@ -55,7 +55,7 @@ QSGDistanceFieldGlyphNode::QSGDistanceFieldGlyphNode(QSGRenderContext *context)
, m_dirtyGeometry(false)
, m_dirtyMaterial(false)
{
- m_geometry.setDrawingMode(GL_TRIANGLES);
+ m_geometry.setDrawingMode(QSGGeometry::DrawTriangles);
setGeometry(&m_geometry);
#ifdef QSG_RUNTIME_DESCRIPTION
qsgnode_set_description(this, QLatin1String("glyphs"));
@@ -188,7 +188,7 @@ void QSGDistanceFieldGlyphNode::updateGeometry()
QSGGeometry *g = geometry();
- Q_ASSERT(g->indexType() == GL_UNSIGNED_SHORT);
+ Q_ASSERT(g->indexType() == QSGGeometry::UnsignedShortType);
QHash<const QSGDistanceFieldGlyphCache::Texture *, GlyphInfo> glyphsInOtherTextures;
diff --git a/src/quick/scenegraph/qsgrenderloop.cpp b/src/quick/scenegraph/qsgrenderloop.cpp
index 53cf6fffce..c025e8d9af 100644
--- a/src/quick/scenegraph/qsgrenderloop.cpp
+++ b/src/quick/scenegraph/qsgrenderloop.cpp
@@ -64,9 +64,7 @@
#include <private/qsgrhishadereffectnode_p.h>
-#if QT_CONFIG(opengl)
#include <private/qsgdefaultrendercontext_p.h>
-#endif
#ifdef Q_OS_WIN
#include <QtCore/qt_windows.h>
@@ -75,15 +73,6 @@
QT_BEGIN_NAMESPACE
extern bool qsg_useConsistentTiming();
-extern Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_format, bool include_alpha);
-
-// ### We do not yet support using Qt Quick with QRhi (and Vulkan, D3D
-// or Metal) in -no-opengl builds as of Qt 5.14. This is due to to the
-// widespread direct OpenGL usage all over the place in qsgdefault*
-// and the related classes. To be cleaned up in Qt 6 when the direct
-// GL code path is removed.
-
-#if QT_CONFIG(opengl) /* || QT_CONFIG(vulkan) || defined(Q_OS_WIN) || defined(Q_OS_DARWIN) */
#define ENABLE_DEFAULT_BACKEND
@@ -96,7 +85,6 @@ extern Q_GUI_EXPORT QImage qt_gl_read_framebuffer(const QSize &size, bool alpha_
DEFINE_BOOL_CONFIG_OPTION(qmlNoThreadedRenderer, QML_BAD_GUI_RENDER_LOOP);
DEFINE_BOOL_CONFIG_OPTION(qmlForceThreadedRenderer, QML_FORCE_THREADED_RENDERER); // Might trigger graphics driver threading bugs, use at own risk
-#endif
QSGRenderLoop *QSGRenderLoop::s_instance = nullptr;
@@ -221,17 +209,10 @@ QSGRenderLoop *QSGRenderLoop::instance()
if (rhiSupport->isRhiEnabled() && rhiSupport->rhiBackend() != QRhi::OpenGLES2) {
loopType = ThreadedRenderLoop;
} else {
- loopType = BasicRenderLoop;
-#ifdef Q_OS_WIN
- if (QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL
- && QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL))
- {
- loopType = ThreadedRenderLoop;
- }
-#else
if (QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::ThreadedOpenGL))
loopType = ThreadedRenderLoop;
-#endif
+ else
+ loopType = BasicRenderLoop;
}
if (rhiSupport->isRhiEnabled()) {
@@ -684,11 +665,8 @@ void QSGGuiThreadRenderLoop::renderWindow(QQuickWindow *window)
Q_TRACE(QSG_swap_entry);
if (data.grabOnly) {
- const bool alpha = window->format().alphaBufferSize() > 0 && window->color().alpha() != 255;
if (cd->swapchain)
grabContent = rhiSupport->grabAndBlockInCurrentFrame(rhi, cd->swapchain->currentFrameCommandBuffer());
- else
- grabContent = qt_gl_read_framebuffer(window->size() * window->effectiveDevicePixelRatio(), alpha, alpha);
grabContent.setDevicePixelRatio(window->effectiveDevicePixelRatio());
data.grabOnly = false;
}
diff --git a/src/quick/scenegraph/qsgrhisupport.cpp b/src/quick/scenegraph/qsgrhisupport.cpp
index 07730a5d2b..86c2ea7806 100644
--- a/src/quick/scenegraph/qsgrhisupport.cpp
+++ b/src/quick/scenegraph/qsgrhisupport.cpp
@@ -39,9 +39,7 @@
#include "qsgrhisupport_p.h"
#include "qsgcontext_p.h"
-#if QT_CONFIG(opengl)
# include "qsgdefaultrendercontext_p.h"
-#endif
#include <QtQuick/private/qquickitem_p.h>
#include <QtQuick/private/qquickwindow_p.h>
@@ -177,10 +175,11 @@ void QSGRhiSupport::applySettings()
m_rhiBackend = QRhi::D3D11;
#elif defined(Q_OS_MACOS) || defined(Q_OS_IOS)
m_rhiBackend = QRhi::Metal;
-#else
+#elif QT_CONFIG(opengl)
m_rhiBackend = QRhi::OpenGLES2;
+#else
+ m_rhiBackend = QRhi::Vulkan;
#endif
- // Vulkan has to be requested explicitly
// Now that we established our initial choice, we may want to opt
// for another backend under certain special circumstances.
@@ -439,12 +438,6 @@ const void *QSGRhiSupport::rifResource(QSGRendererInterface::Resource res,
const QSGDefaultRenderContext *rc,
const QQuickWindow *w)
{
-// ### This condition is a temporary workaround to allow compilation
-// with -no-opengl, but Vulkan or Metal enabled, to succeed. Full
-// support for RHI-capable -no-opengl builds will be available in
-// Qt 6 once the direct OpenGL code path gets removed.
-#if QT_CONFIG(opengl)
-
QRhi *rhi = rc->rhi();
if (res == QSGRendererInterface::RhiResource || !rhi)
return rhi;
@@ -484,12 +477,6 @@ const void *QSGRhiSupport::rifResource(QSGRendererInterface::Resource res,
default:
return nullptr;
}
-
-#else
- Q_UNUSED(res);
- Q_UNUSED(rc);
- return nullptr;
-#endif
}
int QSGRhiSupport::chooseSampleCountForWindowWithRhi(QWindow *window, QRhi *rhi)
@@ -703,18 +690,13 @@ QImage QSGRhiSupport::grabOffscreen(QQuickWindow *window)
wd->rhi = rhi.data();
-// ### This condition is a temporary workaround to allow compilation
-// with -no-opengl, but Vulkan or Metal enabled, to succeed. Full
-// support for RHI-capable -no-opengl builds will be available in
-// Qt 6 once the direct OpenGL code path gets removed.
-#if QT_CONFIG(opengl)
QSGDefaultRenderContext::InitParams params;
params.rhi = rhi.data();
params.sampleCount = 1;
params.initialSurfacePixelSize = pixelSize;
params.maybeSurface = window;
wd->context->initialize(&params);
-#endif
+
// There was no rendercontrol which means a custom render target
// should not be set either. Set our own, temporarily.
window->setRenderTarget(QQuickRenderTarget::fromRhiRenderTarget(rt.data()));
diff --git a/src/quick/scenegraph/scenegraph.pri b/src/quick/scenegraph/scenegraph.pri
index 2ea25c9d13..0f10e4d061 100644
--- a/src/quick/scenegraph/scenegraph.pri
+++ b/src/quick/scenegraph/scenegraph.pri
@@ -18,7 +18,9 @@ HEADERS += \
$$PWD/coreapi/qsgrendererinterface.h \
$$PWD/coreapi/qsggeometry_p.h \
$$PWD/coreapi/qsgtexture.h \
- $$PWD/coreapi/qsgtexture_p.h
+ $$PWD/coreapi/qsgtexture_p.h \
+ $$PWD/coreapi/qsgbatchrenderer_p.h \
+ $$PWD/coreapi/qsgrhivisualizer_p.h
SOURCES += \
$$PWD/coreapi/qsgabstractrenderer.cpp \
@@ -30,16 +32,10 @@ SOURCES += \
$$PWD/coreapi/qsgnodeupdater.cpp \
$$PWD/coreapi/qsgrenderer.cpp \
$$PWD/coreapi/qsgrendernode.cpp \
- $$PWD/coreapi/qsgrendererinterface.cpp
+ $$PWD/coreapi/qsgrendererinterface.cpp \
+ $$PWD/coreapi/qsgbatchrenderer.cpp \
+ $$PWD/coreapi/qsgrhivisualizer.cpp
-qtConfig(opengl(es1|es2)?) {
- HEADERS += \
- $$PWD/coreapi/qsgbatchrenderer_p.h \
- $$PWD/coreapi/qsgrhivisualizer_p.h
- SOURCES += \
- $$PWD/coreapi/qsgbatchrenderer.cpp \
- $$PWD/coreapi/qsgrhivisualizer.cpp
-}
# Util API
HEADERS += \
@@ -69,22 +65,20 @@ SOURCES += \
$$PWD/util/qsgimagenode.cpp \
$$PWD/util/qsgninepatchnode.cpp
-qtConfig(opengl(es1|es2)?) {
- # rhi, still tied to OpenGL-enabled Qt builds for now
- HEADERS += \
- $$PWD/qsgrhitextureglyphcache_p.h \
- $$PWD/util/qsgrhiatlastexture_p.h \
- $$PWD/qsgrhilayer_p.h \
- $$PWD/qsgrhishadereffectnode_p.h \
- $$PWD/qsgrhidistancefieldglyphcache_p.h
+# RHI
+HEADERS += \
+ $$PWD/qsgrhitextureglyphcache_p.h \
+ $$PWD/util/qsgrhiatlastexture_p.h \
+ $$PWD/qsgrhilayer_p.h \
+ $$PWD/qsgrhishadereffectnode_p.h \
+ $$PWD/qsgrhidistancefieldglyphcache_p.h
- SOURCES += \
- $$PWD/qsgrhitextureglyphcache.cpp \
- $$PWD/qsgrhilayer.cpp \
- $$PWD/qsgrhishadereffectnode.cpp \
- $$PWD/util/qsgrhiatlastexture.cpp \
- $$PWD/qsgrhidistancefieldglyphcache.cpp
-}
+SOURCES += \
+ $$PWD/qsgrhitextureglyphcache.cpp \
+ $$PWD/qsgrhilayer.cpp \
+ $$PWD/qsgrhishadereffectnode.cpp \
+ $$PWD/util/qsgrhiatlastexture.cpp \
+ $$PWD/qsgrhidistancefieldglyphcache.cpp
# QML / Adaptations API
HEADERS += \
@@ -107,47 +101,45 @@ SOURCES += \
$$PWD/qsgrenderloop.cpp \
$$PWD/qsgrhisupport.cpp
-qtConfig(opengl(es1|es2)?) {
+SOURCES += \
+ $$PWD/qsgdefaultglyphnode.cpp \
+ $$PWD/qsgdefaultglyphnode_p.cpp \
+ $$PWD/qsgdistancefieldglyphnode.cpp \
+ $$PWD/qsgdistancefieldglyphnode_p.cpp \
+ $$PWD/qsgdefaultinternalimagenode.cpp \
+ $$PWD/qsgdefaultinternalrectanglenode.cpp \
+ $$PWD/qsgdefaultrendercontext.cpp \
+ $$PWD/qsgdefaultcontext.cpp \
+ $$PWD/util/qsgdefaultpainternode.cpp \
+ $$PWD/util/qsgdefaultrectanglenode.cpp \
+ $$PWD/util/qsgdefaultimagenode.cpp \
+ $$PWD/util/qsgdefaultninepatchnode.cpp
+HEADERS += \
+ $$PWD/qsgdefaultglyphnode_p.h \
+ $$PWD/qsgdistancefieldglyphnode_p.h \
+ $$PWD/qsgdistancefieldglyphnode_p_p.h \
+ $$PWD/qsgdefaultglyphnode_p_p.h \
+ $$PWD/qsgdefaultinternalimagenode_p.h \
+ $$PWD/qsgdefaultinternalrectanglenode_p.h \
+ $$PWD/qsgdefaultrendercontext_p.h \
+ $$PWD/qsgdefaultcontext_p.h \
+ $$PWD/util/qsgdefaultpainternode_p.h \
+ $$PWD/util/qsgdefaultrectanglenode_p.h \
+ $$PWD/util/qsgdefaultimagenode_p.h \
+ $$PWD/util/qsgdefaultninepatchnode_p.h
+
+qtConfig(thread) {
+ SOURCES += \
+ $$PWD/qsgthreadedrenderloop.cpp
+ HEADERS += \
+ $$PWD/qsgthreadedrenderloop_p.h
+}
+
+qtConfig(quick-sprite) {
SOURCES += \
- $$PWD/qsgdefaultglyphnode.cpp \
- $$PWD/qsgdefaultglyphnode_p.cpp \
- $$PWD/qsgdistancefieldglyphnode.cpp \
- $$PWD/qsgdistancefieldglyphnode_p.cpp \
- $$PWD/qsgdefaultinternalimagenode.cpp \
- $$PWD/qsgdefaultinternalrectanglenode.cpp \
- $$PWD/qsgdefaultrendercontext.cpp \
- $$PWD/qsgdefaultcontext.cpp \
- $$PWD/util/qsgdefaultpainternode.cpp \
- $$PWD/util/qsgdefaultrectanglenode.cpp \
- $$PWD/util/qsgdefaultimagenode.cpp \
- $$PWD/util/qsgdefaultninepatchnode.cpp
+ $$PWD/qsgdefaultspritenode.cpp
HEADERS += \
- $$PWD/qsgdefaultglyphnode_p.h \
- $$PWD/qsgdistancefieldglyphnode_p.h \
- $$PWD/qsgdistancefieldglyphnode_p_p.h \
- $$PWD/qsgdefaultglyphnode_p_p.h \
- $$PWD/qsgdefaultinternalimagenode_p.h \
- $$PWD/qsgdefaultinternalrectanglenode_p.h \
- $$PWD/qsgdefaultrendercontext_p.h \
- $$PWD/qsgdefaultcontext_p.h \
- $$PWD/util/qsgdefaultpainternode_p.h \
- $$PWD/util/qsgdefaultrectanglenode_p.h \
- $$PWD/util/qsgdefaultimagenode_p.h \
- $$PWD/util/qsgdefaultninepatchnode_p.h
-
- qtConfig(thread) {
- SOURCES += \
- $$PWD/qsgthreadedrenderloop.cpp
- HEADERS += \
- $$PWD/qsgthreadedrenderloop_p.h
- }
-
- qtConfig(quick-sprite) {
- SOURCES += \
- $$PWD/qsgdefaultspritenode.cpp
- HEADERS += \
- $$PWD/qsgdefaultspritenode_p.h
- }
+ $$PWD/qsgdefaultspritenode_p.h
}
# Built-in, non-plugin-based adaptations
@@ -156,77 +148,6 @@ include(adaptations/adaptations.pri)
RESOURCES += \
$$PWD/scenegraph.qrc
-# OpenGL Shaders
-qtConfig(opengl(es1|es2)?) {
- OTHER_FILES += \
- $$PWD/shaders/24bittextmask.frag \
- $$PWD/shaders/8bittextmask.frag \
- $$PWD/shaders/distancefieldoutlinetext.frag \
- $$PWD/shaders/distancefieldshiftedtext.frag \
- $$PWD/shaders/distancefieldshiftedtext.vert \
- $$PWD/shaders/distancefieldtext.frag \
- $$PWD/shaders/distancefieldtext.vert \
- $$PWD/shaders/flatcolor.frag \
- $$PWD/shaders/flatcolor.vert \
- $$PWD/shaders/hiqsubpixeldistancefieldtext.frag \
- $$PWD/shaders/hiqsubpixeldistancefieldtext.vert \
- $$PWD/shaders/loqsubpixeldistancefieldtext.frag \
- $$PWD/shaders/loqsubpixeldistancefieldtext.vert \
- $$PWD/shaders/opaquetexture.frag \
- $$PWD/shaders/opaquetexture.vert \
- $$PWD/shaders/outlinedtext.frag \
- $$PWD/shaders/outlinedtext.vert \
- $$PWD/shaders/rendernode.frag \
- $$PWD/shaders/rendernode.vert \
- $$PWD/shaders/smoothcolor.frag \
- $$PWD/shaders/smoothcolor.vert \
- $$PWD/shaders/smoothtexture.frag \
- $$PWD/shaders/smoothtexture.vert \
- $$PWD/shaders/stencilclip.frag \
- $$PWD/shaders/stencilclip.vert \
- $$PWD/shaders/styledtext.frag \
- $$PWD/shaders/styledtext.vert \
- $$PWD/shaders/textmask.frag \
- $$PWD/shaders/textmask.vert \
- $$PWD/shaders/texture.frag \
- $$PWD/shaders/vertexcolor.frag \
- $$PWD/shaders/vertexcolor.vert \
- $$PWD/shaders/24bittextmask_core.frag \
- $$PWD/shaders/8bittextmask_core.frag \
- $$PWD/shaders/distancefieldoutlinetext_core.frag \
- $$PWD/shaders/distancefieldshiftedtext_core.frag \
- $$PWD/shaders/distancefieldshiftedtext_core.vert \
- $$PWD/shaders/distancefieldtext_core.frag \
- $$PWD/shaders/distancefieldtext_core.vert \
- $$PWD/shaders/flatcolor_core.frag \
- $$PWD/shaders/flatcolor_core.vert \
- $$PWD/shaders/hiqsubpixeldistancefieldtext_core.frag \
- $$PWD/shaders/hiqsubpixeldistancefieldtext_core.vert \
- $$PWD/shaders/loqsubpixeldistancefieldtext_core.frag \
- $$PWD/shaders/loqsubpixeldistancefieldtext_core.vert \
- $$PWD/shaders/opaquetexture_core.frag \
- $$PWD/shaders/opaquetexture_core.vert \
- $$PWD/shaders/outlinedtext_core.frag \
- $$PWD/shaders/outlinedtext_core.vert \
- $$PWD/shaders/rendernode_core.frag \
- $$PWD/shaders/rendernode_core.vert \
- $$PWD/shaders/smoothcolor_core.frag \
- $$PWD/shaders/smoothcolor_core.vert \
- $$PWD/shaders/smoothtexture_core.frag \
- $$PWD/shaders/smoothtexture_core.vert \
- $$PWD/shaders/stencilclip_core.frag \
- $$PWD/shaders/stencilclip_core.vert \
- $$PWD/shaders/styledtext_core.frag \
- $$PWD/shaders/styledtext_core.vert \
- $$PWD/shaders/textmask_core.frag \
- $$PWD/shaders/textmask_core.vert \
- $$PWD/shaders/texture_core.frag \
- $$PWD/shaders/vertexcolor_core.frag \
- $$PWD/shaders/vertexcolor_core.vert \
- $$PWD/shaders/visualization.frag \
- $$PWD/shaders/visualization.vert
-}
-
# Compressed Texture API
HEADERS += \
$$PWD/util/qsgtexturereader_p.h
@@ -234,7 +155,6 @@ HEADERS += \
SOURCES += \
$$PWD/util/qsgtexturereader.cpp
-qtConfig(opengl(es1|es2)?) {
HEADERS += \
$$PWD/compressedtexture/qsgcompressedatlastexture_p.h \
$$PWD/compressedtexture/qsgcompressedtexture_p.h
@@ -242,4 +162,4 @@ qtConfig(opengl(es1|es2)?) {
SOURCES += \
$$PWD/compressedtexture/qsgcompressedatlastexture.cpp \
$$PWD/compressedtexture/qsgcompressedtexture.cpp
-}
+
diff --git a/src/quick/scenegraph/util/qsgtexturereader.cpp b/src/quick/scenegraph/util/qsgtexturereader.cpp
index 5e12ca4035..78d729eb36 100644
--- a/src/quick/scenegraph/util/qsgtexturereader.cpp
+++ b/src/quick/scenegraph/util/qsgtexturereader.cpp
@@ -40,20 +40,13 @@
#include "qsgtexturereader_p.h"
#include <private/qtexturefilereader_p.h>
-#if QT_CONFIG(opengl)
#include <private/qsgcompressedtexture_p.h>
-#endif
QT_BEGIN_NAMESPACE
QSGTextureReader::QSGTextureReader(QIODevice *device, const QString &fileName)
{
-#if QT_CONFIG(opengl)
m_reader = new QTextureFileReader(device, fileName);
-#else
- Q_UNUSED(device);
- Q_UNUSED(fileName);
-#endif
}
QSGTextureReader::~QSGTextureReader()
@@ -63,7 +56,6 @@ QSGTextureReader::~QSGTextureReader()
QQuickTextureFactory *QSGTextureReader::read()
{
-#if QT_CONFIG(opengl)
if (!m_reader)
return nullptr;
@@ -72,9 +64,6 @@ QQuickTextureFactory *QSGTextureReader::read()
return nullptr;
return new QSGCompressedTextureFactory(texData);
-#else
- return nullptr;
-#endif
}
bool QSGTextureReader::isTexture()
diff --git a/src/quickshapes/qquickshape.cpp b/src/quickshapes/qquickshape.cpp
index b71e872841..3fa4a74a01 100644
--- a/src/quickshapes/qquickshape.cpp
+++ b/src/quickshapes/qquickshape.cpp
@@ -981,12 +981,6 @@ void QQuickShapePrivate::createRenderer()
return;
switch (ri->graphicsApi()) {
-#if QT_CONFIG(opengl)
- case QSGRendererInterface::OpenGL:
- rendererType = QQuickShape::GeometryRenderer;
- renderer = new QQuickShapeGenericRenderer(q);
- break;
-#endif
case QSGRendererInterface::Software:
rendererType = QQuickShape::SoftwareRenderer;
renderer = new QQuickShapeSoftwareRenderer;
@@ -1014,13 +1008,6 @@ QSGNode *QQuickShapePrivate::createNode()
return node;
switch (ri->graphicsApi()) {
-#if QT_CONFIG(opengl)
- case QSGRendererInterface::OpenGL:
- node = new QQuickShapeGenericNode;
- static_cast<QQuickShapeGenericRenderer *>(renderer)->setRootNode(
- static_cast<QQuickShapeGenericNode *>(node));
- break;
-#endif
case QSGRendererInterface::Software:
node = new QQuickShapeSoftwareRenderNode(q);
static_cast<QQuickShapeSoftwareRenderer *>(renderer)->setNode(
diff --git a/src/quickshapes/qquickshapegenericrenderer.cpp b/src/quickshapes/qquickshapegenericrenderer.cpp
index 373a014a68..16831d59d3 100644
--- a/src/quickshapes/qquickshapegenericrenderer.cpp
+++ b/src/quickshapes/qquickshapegenericrenderer.cpp
@@ -40,18 +40,13 @@
#include "qquickshapegenericrenderer_p.h"
#include <QtGui/private/qtriangulator_p.h>
#include <QtGui/private/qtriangulatingstroker_p.h>
+#include <QtGui/private/qrhi_p.h>
#include <QSGVertexColorMaterial>
#if QT_CONFIG(thread)
#include <QThreadPool>
#endif
-#if QT_CONFIG(opengl)
-#include <QOpenGLContext>
-#include <QOffscreenSurface>
-#include <private/qopenglextensions_p.h>
-#endif
-
QT_BEGIN_NAMESPACE
static const qreal TRI_SCALE = 1;
@@ -114,47 +109,6 @@ void QQuickShapeGenericStrokeFillNode::activateMaterial(QQuickWindow *window, Ma
setMaterial(m_material.data());
}
-static bool q_supportsElementIndexUint(QSGRendererInterface::GraphicsApi api)
-{
- static bool elementIndexUint = true;
-#if QT_CONFIG(opengl)
- if (api == QSGRendererInterface::OpenGL) {
- static bool elementIndexUintChecked = false;
- if (!elementIndexUintChecked) {
- elementIndexUintChecked = true;
- QOpenGLContext *context = QOpenGLContext::currentContext();
- const bool needsTempContext = !context;
- QScopedPointer<QOpenGLContext> dummyContext;
- QScopedPointer<QOffscreenSurface> dummySurface;
- bool ok = true;
- if (needsTempContext) {
- dummyContext.reset(new QOpenGLContext);
- dummyContext->create();
- context = dummyContext.data();
- dummySurface.reset(new QOffscreenSurface);
- dummySurface->setFormat(context->format());
- dummySurface->create();
- ok = context->makeCurrent(dummySurface.data());
- }
- if (ok) {
- elementIndexUint = static_cast<QOpenGLExtensions *>(context->functions())->hasOpenGLExtension(
- QOpenGLExtensions::ElementIndexUint);
-
- if (needsTempContext) {
- // Must not let the temprary context be destroyed while current and
- // the associated surface already gone, because some implementations
- // (Mesa on drm) do not like that.
- context->doneCurrent();
- }
- }
- }
- }
-#else
- Q_UNUSED(api);
-#endif
- return elementIndexUint;
-}
-
QQuickShapeGenericRenderer::~QQuickShapeGenericRenderer()
{
for (ShapePathData &d : m_sp) {
@@ -338,6 +292,14 @@ void QQuickShapeGenericRenderer::endSync(bool async)
pathWorkThreadPool->setMaxThreadCount(idealCount > 0 ? idealCount * 2 : 4);
}
#endif
+ auto testFeatureIndexUint = [](QQuickItem *item) -> bool {
+ if (auto *w = item->window()) {
+ if (auto *rhi = QQuickWindowPrivate::get(w)->rhi)
+ return rhi->isFeatureSupported(QRhi::ElementIndexUint);
+ }
+ return true;
+ };
+ static bool supportsElementIndexUint = testFeatureIndexUint(m_item);
if ((d.syncDirty & DirtyFillGeom) && d.fillColor.a) {
d.path.setFillRule(d.fillRule);
if (m_api == QSGRendererInterface::Unknown)
@@ -350,7 +312,7 @@ void QQuickShapeGenericRenderer::endSync(bool async)
d.pendingFill = r;
r->path = d.path;
r->fillColor = d.fillColor;
- r->supportsElementIndexUint = q_supportsElementIndexUint(m_api);
+ r->supportsElementIndexUint = supportsElementIndexUint;
// Unlikely in practice but in theory m_sp could be
// resized. Therefore, capture 'i' instead of 'd'.
QObject::connect(r, &QQuickShapeFillRunnable::done, qApp, [this, i](QQuickShapeFillRunnable *r) {
@@ -375,7 +337,7 @@ void QQuickShapeGenericRenderer::endSync(bool async)
pathWorkThreadPool->start(r);
#endif
} else {
- triangulateFill(d.path, d.fillColor, &d.fillVertices, &d.fillIndices, &d.indexType, q_supportsElementIndexUint(m_api));
+ triangulateFill(d.path, d.fillColor, &d.fillVertices, &d.fillIndices, &d.indexType, supportsElementIndexUint);
}
}
diff --git a/tests/auto/.prev_CMakeLists.txt b/tests/auto/.prev_CMakeLists.txt
index c52566a954..addaaa6bde 100644
--- a/tests/auto/.prev_CMakeLists.txt
+++ b/tests/auto/.prev_CMakeLists.txt
@@ -10,9 +10,9 @@ add_subdirectory(toolsupport)
if(NOT UIKIT)
add_subdirectory(qmltest)
endif()
-if(TARGET Qt::Gui AND (QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3))
+if(TARGET Qt::Gui)
add_subdirectory(particles)
endif()
-if(TARGET Qt::Gui AND TARGET Qt::Widgets AND (QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3))
+if(TARGET Qt::Widgets)
add_subdirectory(quickwidgets)
endif()
diff --git a/tests/auto/CMakeLists.txt b/tests/auto/CMakeLists.txt
index eb1c2d34df..cdec7346eb 100644
--- a/tests/auto/CMakeLists.txt
+++ b/tests/auto/CMakeLists.txt
@@ -12,9 +12,9 @@ add_subdirectory(toolsupport)
if(NOT UIKIT)
add_subdirectory(qmltest)
endif()
-if(TARGET Qt::Gui AND (QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3))
+if(TARGET Qt::Gui)
add_subdirectory(particles)
endif()
-if(TARGET Qt::Gui AND TARGET Qt::Widgets AND (QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3))
+if(TARGET Qt::Widgets)
add_subdirectory(quickwidgets)
endif()
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index d967b01d61..35dfe5dfbd 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -9,10 +9,8 @@ SUBDIRS=\
installed_cmake \
toolsupport
-qtHaveModule(gui):qtConfig(opengl(es1|es2)?) {
- SUBDIRS += particles
- qtHaveModule(widgets): SUBDIRS += quickwidgets
-}
+qtHaveModule(gui): SUBDIRS += particles
+qtHaveModule(widgets): SUBDIRS += quickwidgets
# console applications not supported
uikit: SUBDIRS -= qmltest
diff --git a/tests/auto/quick/qquickrendercontrol/CMakeLists.txt b/tests/auto/quick/qquickrendercontrol/CMakeLists.txt
index 4bb2e6928b..df20449a90 100644
--- a/tests/auto/quick/qquickrendercontrol/CMakeLists.txt
+++ b/tests/auto/quick/qquickrendercontrol/CMakeLists.txt
@@ -14,7 +14,6 @@ qt_add_test(tst_qquickrendercontrol
Qt::CorePrivate
Qt::Gui
Qt::GuiPrivate
- Qt::OpenGL
Qt::QmlPrivate
Qt::QuickPrivate
)
diff --git a/tests/auto/quick/qquickrendercontrol/qquickrendercontrol.pro b/tests/auto/quick/qquickrendercontrol/qquickrendercontrol.pro
index 958abe316d..4f0101bf22 100644
--- a/tests/auto/quick/qquickrendercontrol/qquickrendercontrol.pro
+++ b/tests/auto/quick/qquickrendercontrol/qquickrendercontrol.pro
@@ -6,7 +6,7 @@ include (../../shared/util.pri)
macos:CONFIG -= app_bundle
-QT += core-private gui-private qml-private quick-private testlib opengl
+QT += core-private gui-private qml-private quick-private testlib
OTHER_FILES += \
data/rect.qml
diff --git a/tests/benchmarks/CMakeLists.txt b/tests/benchmarks/CMakeLists.txt
index 06cce61350..0ce6f79ce1 100644
--- a/tests/benchmarks/CMakeLists.txt
+++ b/tests/benchmarks/CMakeLists.txt
@@ -2,6 +2,6 @@
add_subdirectory(qml)
add_subdirectory(quick)
-if(QT_FEATURE_private_tests AND (QT_FEATURE_opengl OR QT_FEATURE_opengles2 OR QT_FEATURE_opengles3))
+if(QT_FEATURE_private_tests)
add_subdirectory(particles)
endif()
diff --git a/tests/benchmarks/benchmarks.pro b/tests/benchmarks/benchmarks.pro
index 6d62fa09d9..f70d4e52bd 100644
--- a/tests/benchmarks/benchmarks.pro
+++ b/tests/benchmarks/benchmarks.pro
@@ -1,5 +1,5 @@
TEMPLATE = subdirs
SUBDIRS = qml quick
qtConfig(private_tests) {
- qtConfig(opengl(es1|es2)?):SUBDIRS += particles
+ SUBDIRS += particles
}
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 71bd104596..bf1f96b54f 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -282,12 +282,12 @@ void LoadWatcher::contain(QObject *o, const QUrl &containPath)
void LoadWatcher::checkForWindow(QObject *o)
{
-#if defined(QT_GUI_LIB) && QT_CONFIG(opengl)
+#if defined(QT_GUI_LIB)
if (o->isWindowType() && o->inherits("QQuickWindow"))
haveWindow = true;
#else
Q_UNUSED(o)
-#endif // QT_GUI_LIB && !QT_NO_OPENGL
+#endif // QT_GUI_LIB
}
void quietMessageHandler(QtMsgType type, const QMessageLogContext &ctxt, const QString &msg)
@@ -480,7 +480,7 @@ int main(int argc, char *argv[])
QCoreApplication::translate("main", "Run animations off animation tick rather than wall time."));
parser.addOption(fixedAnimationsOption);
QCommandLineOption rhiOption(QStringList() << QStringLiteral("r") << QStringLiteral("rhi"),
- QCoreApplication::translate("main", "Use the Qt graphics abstraction (RHI) instead of OpenGL directly. "
+ QCoreApplication::translate("main", "Set the backend for the Qt graphics abstraction (RHI). "
"Backend is one of: default, vulkan, metal, d3d11, gl"),
QStringLiteral("backend"));
parser.addOption(rhiOption);
@@ -534,7 +534,7 @@ int main(int argc, char *argv[])
if (!customSelectors.isEmpty())
e.setExtraFileSelectors(customSelectors);
-#if defined(QT_GUI_LIB) && QT_CONFIG(opengl)
+#if defined(QT_GUI_LIB)
if (qEnvironmentVariableIsSet("QSG_CORE_PROFILE") || qEnvironmentVariableIsSet("QML_CORE_PROFILE")) {
QSurfaceFormat surfaceFormat;
surfaceFormat.setStencilBufferSize(8);
@@ -553,7 +553,6 @@ int main(int argc, char *argv[])
if (parser.isSet(dummyDataOption))
dummyDir = parser.value(dummyDataOption);
if (parser.isSet(rhiOption)) {
- qputenv("QSG_RHI", "1");
const QString rhiBackend = parser.value(rhiOption);
if (rhiBackend == QLatin1String("default"))
qunsetenv("QSG_RHI_BACKEND");
diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp
index 2824ba35fa..449e682b4e 100644
--- a/tools/qmlscene/main.cpp
+++ b/tools/qmlscene/main.cpp
@@ -47,7 +47,6 @@
#include <QtQuick/qquickview.h>
#include <private/qabstractanimation_p.h>
-#include <private/qopenglcontext_p.h>
#ifdef QT_WIDGETS_LIB
#include <QtWidgets/QApplication>
@@ -351,8 +350,7 @@ static void usage()
puts(" --transparent .................... Make the window transparent");
puts(" --multisample .................... Enable multisampling (OpenGL anti-aliasing)");
puts(" --core-profile ................... Request a core profile OpenGL context");
- puts(" --rhi [vulkan|metal|d3d11|gl] .... Use the Qt graphics abstraction (RHI) instead of OpenGL directly.\n"
- " .... Backend has platform specific defaults. Specify to override.");
+ puts(" --rhi [vulkan|metal|d3d11|gl] .... Specify backend for the Qt graphics abstraction (RHI).\n");
puts(" --no-version-detection ........... Do not try to detect the version of the .qml file");
puts(" --slow-animations ................ Run all animations in slow motion");
puts(" --resize-to-root ................. Resize the window to the size of the root item");
@@ -390,10 +388,6 @@ static void setWindowTitle(bool verbose, const QObject *topLevel, QWindow *windo
if (verbose) {
newTitle += QLatin1String(" [Qt ") + QLatin1String(QT_VERSION_STR) + QLatin1Char(' ')
+ QGuiApplication::platformName() + QLatin1Char(' ');
-#if QT_CONFIG(opengl)
- newTitle += QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL
- ? QLatin1String("GL") : QLatin1String("GLES");
-#endif
newTitle += QLatin1Char(']');
}
if (oldTitle != newTitle)
@@ -573,7 +567,6 @@ int main(int argc, char ** argv)
QUnifiedTimer::instance()->setSlowModeEnabled(options.slowAnimations);
if (options.rhi) {
- qputenv("QSG_RHI", "1");
if (options.rhiBackendSet)
qputenv("QSG_RHI_BACKEND", options.rhiBackend.toLatin1());
else