aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-09-24 14:02:40 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-09-27 19:47:27 +0000
commit10356e7d5aa3fdb12b01239498ccc0c1cdf5a721 (patch)
tree4b5b3fe0d07e272c581f0f7a142ebe0c31341c29 /src
parentd3083dbdc6a732b1933d66554116bb66ad9b2909 (diff)
Disable GL_NV_path_rendering unless explicitly requested
Flip the default value of enableVendorExtensions, so that we use the generic Shape backend (triangulating + QSGGeometryNode) by default, even on NVIDIA systems. The Nvpr backend is only tried when enableVendorExtensions is set to true by the application. This makes the offering more stable over all since applications will not run into confusing glitches that only reproduce on certain systems while behaving differently on others. [ChangeLog][QtQuick] The Shape item is changed not to try using GL_NV_path_rendering by default, unless explicitly requested. Thus the default value of enableVendorExtensions is now false. Task-number: QTBUG-66843 Task-number: QTBUG-66457 Change-Id: I564708b672bd08a8e760af689d64349aab4ead82 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/quickshapes/qquickshape.cpp28
-rw-r--r--src/quickshapes/qquickshape_p_p.h2
2 files changed, 18 insertions, 12 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;
};