aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/quickshapes/qquickshape.cpp28
-rw-r--r--src/quickshapes/qquickshape_p_p.h2
-rw-r--r--tests/auto/quick/qquickshape/tst_qquickshape.cpp4
3 files changed, 20 insertions, 14 deletions
diff --git a/src/quickshapes/qquickshape.cpp b/src/quickshapes/qquickshape.cpp
index edfa308c4d..0c159ec21b 100644
--- a/src/quickshapes/qquickshape.cpp
+++ b/src/quickshapes/qquickshape.cpp
@@ -577,10 +577,10 @@ void QQuickShapePath::resetFillGradient()
\li When running with the default, OpenGL backend of Qt Quick, both the
generic, triangulation-based and the NVIDIA-specific
- \c{GL_NV_path_rendering} methods are available. The choice is made at
- runtime, depending on the graphics driver's capabilities. When this is not
- desired, applications can force using the generic method by setting the
- Shape.vendorExtensionsEnabled property to \c false.
+ \c{GL_NV_path_rendering} methods are available. By default only the generic
+ approach is used. Setting Shape.vendorExtensionsEnabled property to \c true
+ leads to using NV_path_rendering on NVIDIA systems, and the generic method
+ on others.
\li The \c software backend is fully supported. The path is rendered via
QPainter::strokePath() and QPainter::fillPath() in this case.
@@ -624,9 +624,8 @@ void QQuickShapePath::resetFillGradient()
\li As a general rule, scenes should avoid using separate Shape items when
it is not absolutely necessary. Prefer using one Shape item with multiple
- ShapePath elements over multiple Shape items. Scenes that cannot avoid
- using a large number of individual Shape items should consider setting
- Shape.vendorExtensionsEnabled to \c false.
+ ShapePath elements over multiple Shape items.
+
\endlist
\sa {Qt Quick Examples - Shapes}, Path, PathMove, PathLine, PathQuad, PathCubic, PathArc, PathSvg
@@ -750,11 +749,18 @@ void QQuickShape::setAsynchronous(bool async)
\qmlproperty bool QtQuick.Shapes::Shape::vendorExtensionsEnabled
This property controls the usage of non-standard OpenGL extensions like
- \c GL_NV_path_rendering. To disable Shape.NvprRenderer and force a uniform
- behavior regardless of the graphics card and drivers, set this property to
- \c false.
+ \c GL_NV_path_rendering.
+
+ The default value is \c false.
- The default value is \c true.
+ As of Qt 5.12 Shape.NvprRenderer is disabled by default and a uniform
+ behavior, based on triangulating the path and generating QSGGeometryNode
+ instances, is used regardless of the graphics card and drivers. To enable
+ using vendor-specific path rendering approaches set the value to \c true.
+ Depending on the platform and content, this can lead to improved
+ performance. Setting the value to \c true is safe in any case since
+ rendering falls back to the default method when the vendor-specific
+ approach, such as \c GL_NV_path_rendering, is not supported at run time.
*/
bool QQuickShape::vendorExtensionsEnabled() const
diff --git a/src/quickshapes/qquickshape_p_p.h b/src/quickshapes/qquickshape_p_p.h
index bf4a47f62c..bc06c8fde8 100644
--- a/src/quickshapes/qquickshape_p_p.h
+++ b/src/quickshapes/qquickshape_p_p.h
@@ -182,7 +182,7 @@ public:
QQuickShape::ContainsMode containsMode = QQuickShape::BoundingRectContains;
bool spChanged = false;
bool async = false;
- bool enableVendorExts = true;
+ bool enableVendorExts = false;
bool syncTimingActive = false;
};
diff --git a/tests/auto/quick/qquickshape/tst_qquickshape.cpp b/tests/auto/quick/qquickshape/tst_qquickshape.cpp
index 72f987ce4a..3206129e72 100644
--- a/tests/auto/quick/qquickshape/tst_qquickshape.cpp
+++ b/tests/auto/quick/qquickshape/tst_qquickshape.cpp
@@ -82,7 +82,7 @@ void tst_QQuickShape::initValues()
QVERIFY(obj != nullptr);
QVERIFY(obj->rendererType() == QQuickShape::UnknownRenderer);
QVERIFY(!obj->asynchronous());
- QVERIFY(obj->vendorExtensionsEnabled());
+ QVERIFY(!obj->vendorExtensionsEnabled());
QVERIFY(obj->status() == QQuickShape::Null);
auto vps = obj->data();
QVERIFY(vps.count(&vps) == 0);
@@ -99,7 +99,7 @@ void tst_QQuickShape::vpInitValues()
QVERIFY(obj != nullptr);
QVERIFY(obj->rendererType() == QQuickShape::UnknownRenderer);
QVERIFY(!obj->asynchronous());
- QVERIFY(obj->vendorExtensionsEnabled());
+ QVERIFY(!obj->vendorExtensionsEnabled());
QVERIFY(obj->status() == QQuickShape::Null);
auto vps = obj->data();
QVERIFY(vps.count(&vps) == 2);