| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
src/quick/doc/src/qmltypereference.qdoc
Change-Id: Ia58f1c5a98309c32ef8d8e5c893faf261215f19f
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The docs for this was added to the font property documentation in
Text/TextEdit/TextInput, but not to the main font QML type
documentation.
Change-Id: I579706bea77b6fcd3972921c34b7693bf686ba31
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Idc4521e142603ee37a71acdae63ec750fa970d71
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Iffee781932773fe22c7d946b532ba74492e1e2df
Task-number: QTBUG-59789
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Without them, qdoc tries to parse the backslashes as qdoc commands:
src/quick/util/qquickvalidator.cpp:231: warning: Unknown command '\d'
Change-Id: I36322586c477822f7efbae8b80adaee177c7ca44
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
With the 'basic' and the 'windows' render loop the scene graph
context is shared. Because of this we cannot start deleting textures
after the first window is synchronized as it may contain textures
needed by the another window, which is not yet synchronized.
QWindowPrivate::syncSceneGraph() is not calling endSync() anymore
as it doesn't know whether it is the last window or not. Instead
the renderloop is now responsible for calling endSync() once this
is safe to do.
Change-Id: Icb50ebfb447c928e38b41df7e26f3bfafdb4a811
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Copy-pasted the docs for Text.font.kerning into TextEdit
and TextInput and forgot to change the class name in the
example.
Amends 441e0b41bf5b700cdaa3b0ba2393c487ed4b9de5.
Task-number: QTBUG-56728
Change-Id: Ieab27efb51fa702d83b891e3c7b7aeb5e4795fc5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
It is since qtbase commit 29bcbeab90210da80234529905d17280374f9684.
Change-Id: I8d96dea9955d4c749b99fffd14cd512a8ff88a74
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For text where the content is known, it can be handy to be able
to disable the kerning feature in OpenType to improve performance.
[ChangeLog][Qt Quick][Text] Added "kerning" property to the font
type to support disabling kerning on text.
Task-number: QTBUG-56728
Change-Id: I2e447587a066a7e12c5d38967e0845eaad021014
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
samplerExternalOES type defined in OES_EGL_image_external extension
is used on embedded platforms to achieve zero-copy of textures.
[ChangeLog][Qt Quick] Added support for samplerExternalOES sampler
type in ShaderEffect
Task-number: QTBUG-59462
Change-Id: Ib1e864f2e1321949b0a6539d37b92d2b62541ea8
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
f7ada9b9 redefined QQuickItem's implicitWidthChanged and
implicitHeightChanged signals in order to avoid warnings.
2ca187ca makes it possible to reuse the base class' signals as long as
they don't have parameters.
This change should be transparent to users.
[ChangeLog][QtQuick][Important Behavior Change] The
implicitWidthChanged2 and implicitHeightChanged2 signals of
QQuickImplicitSizeItem have been removed. Although these were
undocumented and hence private API, any applications currently using
them should use the public implicitWidthChanged and
implicitHeightChanged signals.
Task-number: QTCREATORBUG-15000
Change-Id: I35cfdefc6c992f4529b60c979265650c91ba8549
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
|
|\ \
| | |
| | |
| | |
| | |
| | | |
Say hello to Shape.
Change-Id: I1093feee4acc375e62bae1d351db0a7969a536d0
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: Ife5f290d6860d2e0a41b61da1f7cc2bc995a4079
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
|
| |\ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Conflicts:
src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenode.cpp
Change-Id: Id8107cb0de0fbfe7120a90a137b49c2b915ff2d3
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Shape { ShapePath { Path { ... } } } simply becomes
Shape { ShapePath { ... } }
Change-Id: Ie57936cd7953c8a8d6c67e78b9d73bdbe2a05316
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Change-Id: I299354da0632fb0b8487cfb13748ed58b97d75fd
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| |\ \ \
| | | | |
| | | | |
| | | | | |
Change-Id: Iea0bb0788357bc615d0e9ea411087114b8b3b720
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I1cd686cff60bd40fe2cbbc34f917fac7835b6b7d
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Reviewed-by: Robin Burchell <robin.burchell@crimson.no>
|
| |\ \ \ \
| | | | | |
| | | | | |
| | | | | | |
Change-Id: If2e7c1cf0f1522f6052bbc3e3636ef62bef1b4db
|
| |\ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
Change-Id: I0cbb2ba4a00580e6a74a4e4085fc4eb06d0fadae
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Change-Id: I25a1e14e755350350f9a37ab0ac711576c25f535
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Not including the mode in the comparison makes the scenegraph think
that two Pathitems with two linear gradients that only differ in the
spread mode can reuse the same material. That would be wrong.
Change-Id: I34ad1b74ec8f98ec3a11d6a2565e0a7e5ae3673a
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Change-Id: I276c185c93122e5eb05ef6678ab62fa6928f2523
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Also add the missing property for disabling vendor extensions like NVPR.
Change-Id: Id7dfe245305c8ecdfad87359894e7f496c4100d0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Change-Id: Ie8eb1dd5ea8a560f8160384637cc5d76e3bb7c60
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Prevent internal overflows in tesselation due to 100x scale and
keep the correct scenegraph node - VisualPath entry associations.
Change-Id: I181eae6872ea5c5af5783b68a8757a5249c074e5
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| |\ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Change-Id: Iba540adaeffb0098fc4e1923050eb611bf47287b
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
In order to avoid the over head of one QObject for each VisualPath, Path
and PathXxxx element, provide an optional JavaScript API.
PathItem {
VisualPath { strokeWidth: 4; fillColor: "blue";
dashPattern: [ 1, 2, 3, 4]; capStyle: RoundCap
path: Path { PathMove { x: 100; y: 200 }
PathLine { x: 300; y: 300 } }
}
can now also be written as, at least when the path and the stroke/fill params
are static and do not need changing/animating later on:
PathItem {
Component.onCompleted: {
var path = newPath();
var sfp = newStrokeFillParams();
path.moveTo(100, 200);
path.lineTo(300, 300);
sfp.strokeWidth = 4;
sfp.fillColor = "blue";
sfp.dashPattern = [ 1, 2, 3, 4 ];
sfp.capStyle = VisualPath.RoundCap;
appendVisualPath(path, sfp);
commitVisualPaths();
}
}
In order to emphasize the difference from an imperative API (like
context2d), keep the path and the path stroke/fill parameters separate.
To preserve our sanity, extras like gradients are not mapped to JavaScript,
instead, one still references an QML-defined object from properties like
fillGradient.
The objects from newPath() and newStrokeFillParams() are reusable by calling
clear(). This avoids the need for multiple temp objects when there are
multiple paths.
Add a simple test and a hidden stress test with the tiger to the manual
test.
Change-Id: I3b1e275bacf8c8fc52f585fbed5d6f9354d5ae8e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| |\ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Change-Id: I7b6437740077a4e2c9b2c36ee1cd4eb472f1f49f
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Avoid getting warnings from QWaitCondition on Windows by managing the
lifetime of the QThreadPool ourselves.
Change-Id: Idc3545a2336f7971bd382560aa958a325ac69fc6
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
visualPaths looks somewhat odd. Not that it matters much since
it is the default property anyway, but pick the commonly used
"elements" instead.
This also allows easier renaming of VisualPath to something better
in the future, in case a suitable candidate comes up.
Change-Id: I0cdc18cdec49ff821a75f45073598b31f5de9bf8
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
So that it actually performs when clipping the tiger. Add an example.
Change-Id: I7c1c6244710febdb6b02852ebca094665adec417
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Default to uint but keep supporting systems without ElementIndexUint.
Change-Id: Ic15f66408e2e2ffb6406c7e854fa65ee1e0f56b3
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Marking the work orphaned (to be ignored) is sufficient since
runnables exist independently of the renderer or item instances.
(even if the lambda executes after the entire Quick infra is gone,
we are still fine, as long as we bail out in time and do not
dereference the captured this)
Change-Id: I0cfb09aaa8b363191ff576b17a88bb7c1c38f3ad
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Reporting the QQuickItem geometry is incorrect. Report the area touched
by the path instead. This fixes the tiger in the pathitem example.
Change-Id: Ib443f442411befabe7864eff6473604926527f4e
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
A change in parameters affecting fill or stroke only does not need touching
the other set of geometry at all. Split DirtyGeom into DirtyFillGeom and
DirtyStrokeGeom. As a result, neither triangulation nor the QSGGeometry update
will happen for fill when only a stroke-related parameter changes, and vice
versa.
Change-Id: I839873899d687b6c1c8541c9186c9d93438b999a
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Change-Id: I09ccdf9c542ebca56187284a0d1776b64c98bfe8
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Spending 300+ ms in polish for the tiger when running with the generic
backend is not going to fly.
Therefore, add an optional mode for asynchronous triangulation.
Change-Id: Ida44c7b8a28d38fb11243a6657221f039c62e21b
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| |\ \ \ \ \ \ \ \
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Change-Id: I762e578aaf14a77efa26ce3fda2abb0e335003ea
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Not setting the matrices and other states again and again for every path
in the item saves a little CPU time.
Change-Id: Iec9447de4c22cd25343462160bd4a8b9aa44368a
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Combine stroke-only and fill-only. Drop the Repeater since it shows
the bad practice of unnecessarily creating multiple PathItem instances.
Drop the PathSvg example for now since this is a discouraged element.
Move the tiger into a separate file and use an async Loader in order to
avoid the 2 step activation.
Change-Id: Ie65eb0284bdb8957f8fd5af7557542a6d044ef61
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Change-Id: I8228b39d01097179e8b969b2ed479c18b80e9759
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Instead of
PathItem {
item properties
stroke/fill properties
path: Path { ... }
}
switch to
PathItem {
item properties
VisualPath {
stroke/fill settings
Path { ... }
}
VisualPath {
stroke/fill settings
Path { ... }
}
...
}
Limiting PathItem to a single path is arguably too limited. Applications will
likely try to work this around by using multiple PathItems. While this is not
particularly bad for the generic (geometry node based) implementation, it is
a massive overkill for the rendernode-based ones. Therefore, avoid the hassle
and allow multiple paths with different stroke/fill parameters inside a single
PathItem.
Change-Id: Ie7980cd656deb7d4cb1ee4eaa3c090c4b0493c7d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Change-Id: I70238e0e4b458ddfde9f32c40b76382c1a183e98
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
It is a standard feature of elliptical arc. While perhaps deemed too
advanced for PathView purposes, rendering the path using PathItem must
offer the ability to specify a non-zero X axis rotation for the
ellipses of which the arc is a section of.
Change-Id: I53f01713b7e0e97c40f22d75d46f75a140830683
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Like the generic one, this also needs to deal with the fact that
QPen does not take negative widths. Store the value separately.
Change-Id: Ia332c2d83e98c03125a05c838cb8184346f8303a
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Fix also the fill rule interpretation on NVPR - it was the opposite of
what QPainter was doing.
Change-Id: I23ff3b20e3b066d4b4e07aaa68b7da1e09d9127d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Use negative values as the trigger to disable stroking altogether. This matches
both QPainter and NVPR better.
Change-Id: I51395ae310fce8a8da0c06174eafa1dc17aae1db
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
Change-Id: I27aa5f94165fb07807d2bb711d81eade552b9f76
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | |
| | | | | | | | | | |
The generic backend uses the triangulator from QtGui, but is in
fact OpenGL-only for now due to materials.
The NVPR backend uses GL_NV_path_rendering on NVIDIA hardware with
OpenGL 4.3+ or OpenGL ES 3.1+.
The software backend simply uses QPainter.
With the generic backend each PathItem is backed by a non-visual root node
and 0, 1 or 2 child geometry nodes, depending on the presence of visible
stroking and filling. The potentially expensive triangulation happens on
updatePolish(), on the gui thread. This is proven to provide much smoother
results when compared to doing the geometry generation on the render thread
in updatePaintNode(), in particular on power-limited embedded devices.
The NVPR backend uses a QSGRenderNode in DepthAware mode so that the batch
renderer can continue to rely on the depth buffer and use opaque batches.
Due to not relying on slow CPU-side triangulation, this backend uses 5-10
times less CPU, even when properties of the path or its elements are
animated.
The path itself is specified with the PathView's Path, PathLine, PathArc,
PathQuad, etc. types. This allows for consistency with PathView and the
2D Canvas and avoids a naming mess in the API. However, there won't be a
100% symmetry: backends like NVPR will not rely on QPainterPath but process
the path elements on their own (as QPainterPath is essentially useless with
these APIs), which can lead to differences in the supported path elements.
The supported common set is currently Move, Line, Quad, Cubic, Arc.
The patch introduces PathMove, which is essentially PathLine but maps to
moveTo instead of lineTo. More types may get added later (e.g. NVPR can do
a wide variety of optimized rounded rects, but this requires directly
specifying a GL_ROUNDED_RECTx_NV command, thus neededing a dedicated Path
type on our side too)
For filling with gradients only linear gradients are supported at the
moment.
In addition to the declarative API, a more lightweight, QObject-less
JS-callable API should be considered as well for the future.
Change-Id: I335ad64b425ee279505d60e3e57ac6841e1cbd24
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|