aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * | | Use GradientStop and rename ShapeLinearGradient to LinearGradientLaszlo Agocs2017-06-0814-222/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thus application code becomes: ShapePath { ... fillGradient: LinearGradient { ... GradientStop { ... } } } which is even more clean and readable. The duplication for stops is now avoided. Change-Id: I50ae2f388e21683a37dc4787763dc71e16eef4f5 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
| | | * | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2017-06-08197-3240/+2679
| | | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/quick/scenegraph/adaptations/software/qsgsoftwarerenderablenode.cpp Change-Id: Id8107cb0de0fbfe7120a90a137b49c2b915ff2d3
| | | * | | | Reduce objects: Make ShapePath inherit PathLaszlo Agocs2017-06-0727-3166/+2575
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Shape { ShapePath { Path { ... } } } simply becomes Shape { ShapePath { ... } } Change-Id: Ie57936cd7953c8a8d6c67e78b9d73bdbe2a05316 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
| | | * | | | Rename to Shape/ShapePath and remove public JS APILaszlo Agocs2017-06-0271-7329/+2890
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I299354da0632fb0b8487cfb13748ed58b97d75fd Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * | | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2017-05-31277-622/+2301
| | | |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iea0bb0788357bc615d0e9ea411087114b8b3b720
| | | * | | | | Move PathItem to qt.labsLaszlo Agocs2017-04-2557-64/+525
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2017-04-25187-1635/+2399
| | | |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: If2e7c1cf0f1522f6052bbc3e3636ef62bef1b4db
| | | * \ \ \ \ \ Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2017-04-03280-2842/+62466
| | | |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I0cbb2ba4a00580e6a74a4e4085fc4eb06d0fadae
| | | * | | | | | | PathItem: add some docs for the JS APILaszlo Agocs2017-03-301-0/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I25a1e14e755350350f9a37ab0ac711576c25f535 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * | | | | | | PathItem/generic: Fix spread modes in gradient materialLaszlo Agocs2017-03-301-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | Add some Lancelot tests for PathItemLaszlo Agocs2017-03-307-0/+488
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ifec23f855d4c3e0c58e59777cf23149ad99a2b91 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| | | * | | | | | | Add a PathItem autotest for the declarative APILaszlo Agocs2017-03-3012-1/+385
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I276c185c93122e5eb05ef6678ab62fa6928f2523 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * | | | | | | PathItem docs for the declarative APILaszlo Agocs2017-03-305-17/+447
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also add the missing property for disabling vendor extensions like NVPR. Change-Id: Id7dfe245305c8ecdfad87359894e7f496c4100d0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * | | | | | | Add an interactive PathItem exampleLaszlo Agocs2017-03-304-0/+289
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1ddfba07e80cd0315a2ef85c85a568636f8e808a Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * | | | | | | Fix async PathItem results not always showing upLaszlo Agocs2017-03-281-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ie8eb1dd5ea8a560f8160384637cc5d76e3bb7c60 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * | | | | | | Fix for disappearing VisualPath entries in generic PathItemLaszlo Agocs2017-03-171-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | PathItem example: add super- and multisample exampleLaszlo Agocs2017-03-026-69/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iefd1a2656161b69de73e66e0bcefc36a49f733e2 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * | | | | | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2017-03-01271-4005/+9081
| | | |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Iba540adaeffb0098fc4e1923050eb611bf47287b
| | | * | | | | | | | JS API for defining static paths and draw paramsLaszlo Agocs2017-01-2710-89/+4565
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2017-01-2591-4232/+4974
| | | |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I7b6437740077a4e2c9b2c36ee1cd4eb472f1f49f
| | | * | | | | | | | | Destroy the async PathItem work pool properlyLaszlo Agocs2017-01-231-8/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | | | PathItem API cleanup: rename visualPaths to elementsLaszlo Agocs2017-01-232-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | | | Improve stencil clipping with NVPRLaszlo Agocs2017-01-239-30/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So that it actually performs when clipping the tiger. Add an example. Change-Id: I7c1c6244710febdb6b02852ebca094665adec417 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * | | | | | | | | Path generic PathItem work with both ushort and uint index typeLaszlo Agocs2017-01-232-30/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Default to uint but keep supporting systems without ElementIndexUint. Change-Id: Ic15f66408e2e2ffb6406c7e854fa65ee1e0f56b3 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * | | | | | | | | Fix case when async PathItem goes down before finishLaszlo Agocs2017-01-232-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | | | Correct software PathItem bounding rectLaszlo Agocs2017-01-233-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | | | Separate fill and stroke geometry updates in generic PathItemLaszlo Agocs2017-01-232-81/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | | | Add PathItem.status to report async processing progressLaszlo Agocs2017-01-236-9/+95
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I09ccdf9c542ebca56187284a0d1776b64c98bfe8 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * | | | | | | | | PathItem: add optional threaded triangulationLaszlo Agocs2017-01-2311-61/+245
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2017-01-23220-1756/+3910
| | | |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I762e578aaf14a77efa26ce3fda2abb0e335003ea
| | | * | | | | | | | | | Reduce state changes with NVPR-backed PathItemsLaszlo Agocs2017-01-131-12/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | | | | Clean up pathitem example grid viewLaszlo Agocs2017-01-139-4293/+4205
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | | | | PathItem/NVPR: Remove unused member variableLaszlo Agocs2017-01-102-6/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I8228b39d01097179e8b969b2ed479c18b80e9759 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * | | | | | | | | | Allow multiple paths in a PathItemLaszlo Agocs2017-01-1032-1252/+5891
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | | | | NVPR: Take X axis rotation into account for PathArcLaszlo Agocs2017-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I70238e0e4b458ddfde9f32c40b76382c1a183e98 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * | | | | | | | | | Add X axis rotation property to PathArcLaszlo Agocs2017-01-105-2/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | | | | pathitem example: Add 3 more arc examplesLaszlo Agocs2017-01-106-1/+317
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I1a5698116bac2c2b7d1ecf692398c478b10663fd Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * | | | | | | | | | Fix negative stroke width for software PathItemLaszlo Agocs2017-01-102-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | | | | Stencil clipping for NVPRLaszlo Agocs2017-01-105-42/+352
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | | | | Treat 0 as a valid strokeWidth valueLaszlo Agocs2016-12-235-5/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | | | | software backend: Fix clipping of QSGRenderNodesLaszlo Agocs2016-12-214-15/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I27aa5f94165fb07807d2bb711d81eade552b9f76 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
| | | * | | | | | | | | | Add QQuickPathItem and its backend infraLaszlo Agocs2016-12-1953-18/+6027
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
| | | * | | | | | | | | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2016-12-1911-3/+282
| | | |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Id7c17b390a8360b4324afa040774dba8e8fc891f
| | | * \ \ \ \ \ \ \ \ \ \ Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2016-12-15397-4139/+12725
| | | |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I105afe41c9a71441a0eb39371e0f9622fa245643
| | | * | | | | | | | | | | | Fix projection matrix for DepthAware QSGRenderNodesLaszlo Agocs2016-12-091-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unlike renderUnmergedBatches(), renderRenderNode() did not adjust the projection matrix. Change-Id: Ie8ab0024a5f743ae30fe469f694805f803116613 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
| | | * | | | | | | | | | | | Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2016-12-03464-2747/+117062
| | | |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I9433075d0865f2492ff785ee0b28e8733863be44
| | | * \ \ \ \ \ \ \ \ \ \ \ \ Merge remote-tracking branch 'origin/dev' into wip/scenegraphngLaszlo Agocs2016-10-13962-17768/+31852
| | | |\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ica09141c3d3c4f9e8585c9dc66a050158a25f446
| * | | | | | | | | | | | | | | | Prospective build fix for Integrity OSSimon Hausmann2017-06-203-15/+15
| |/ / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If ExecutionEngine is forward declared and the compiler tries to instantiate the Value/Array/etc. templates early on, it may not be able to map ExecutionEngine to EngineBase. That is what the error message suggests. Since we don't need ExecutionEngine let's try EngineBase. Change-Id: Idd18dd431705cce8df79180e7ac08574bbe1170c Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | | | | | | | | | | | | | | Add check in buffer creationJesus Fernandez2017-06-161-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checks if the buffer was created successfully in QSGDefaultDistanceFieldGlyphCache::QSGDefaultDistanceFieldGlyphCache. In case of error shows a warning. Change-Id: I14565c411bbe1081f87b809ea417c44f8cefd9c5 Reviewed-by: Gunnar Sletta <gunnar@crimson.no>
| * | | | | | | | | | | | | | | Move default renderer selection from build to run timeSami Nurmenniemi2017-06-161-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously software renderer was used as default only if OpenGL support was not compiled in. That does not work for example when using offscreen or minimal platforms with Qt that has OpenGL support compiled in. [ChangeLog][QtQuick] Selecting software as default renderer moved from build time to run time Task-number: QTBUG-60268 Change-Id: I4d1de09d8402af9c2b2feb36f8cfa92acd160243 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>