summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* QNode: setParent create creation change only when neededPaul Lemire2017-05-103-2/+68
| | | | | | | | | | | | | | | | Two cases need to be handled by setParent: 1) Parent already has a backend node and receives a new child -> in which case we need to send the creation event to the backend 2) Parent was created in the frontend, but has no backend (delayed notification sending because a ctor can't call a virtual) -> in that case, when adding a child and setting its parent we shouldn't be sending the creation change. We rather let that be handled when the creation change for the parent is requested Change-Id: I434c7d4e6af785c0314ac6538dc689992d90ed0c Task-number: QTBUG-60612 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Oleg Evseev <ev.mipt@gmail.com>
* Merge "Merge remote-tracking branch 'origin/5.9' into 5.9.0" into ↵Jani Heikkinen2017-05-095-8/+17
|\ | | | | | | refs/staging/5.9.0
| * Merge remote-tracking branch 'origin/5.9' into 5.9.0Oswald Buddenhagen2017-05-085-8/+17
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/render/geometry/buffer.cpp Change-Id: If4d28a1e4c95cbd8e81b1751eed3214952516d8c
| | * Fix Buffer uploadingPaul Lemire2017-05-081-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We used to load buffer data when creating it. This led to cases where we would not take into account immediately buffer updates after creation. This would then results in artifacts that would pop up on screen as actual buffer data and count would be different Change-Id: I5a2fad4fb5d7c1e1542cd0bf87ded16a111bc613 Task-number: QTBUG-60429 Reviewed-by: Oleg Evseev <ev.mipt@gmail.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
| | * Revert to using new window for each testSean Harmer2017-05-074-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the underlying problem from QTBUG-58107 in the macOS QPA is fixed we can go back to using a fresh window for each test function. Task-number: QTBUG-58107 Change-Id: If77fa7dbcb5b8b1a7e096e262832297ce871313d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* | | Scene2D cleanup - register pick events when scene is initializedAntti Määttä2017-05-092-10/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current model where mouseGrab is connected to picker signal doesn't work. The pressed event is not sent to scene2d item, because it is already lost when scene2d gets the grabMouse message where it registers to the picker events. This breaks the mouse event sequence (press-move-release) for the quick item. Instead hook to setScene of the node to message scene2d when the scene gets initialized and always register to the picker events. Task-number: QTBUG-58876 Change-Id: Ic9ca4b0899a030336ef20ff2cffbe10b567c36f5 Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* | | Add autotests for new animation classesAntti Määttä2017-05-0915-2/+1418
| | | | | | | | | | | | | | | Change-Id: Id657443693009455c9307b51e862d43f41255f1d Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* | | Scene2D cleanup - remove qml engine and sourceMäättä Antti2017-05-091-55/+0
|/ / | | | | | | | | | | | | | | | | | | Remove QQmlEngine constructor and source property. Update unit tests and manual tests accordingly. Task-number: QTBUG-58876 Change-Id: Ide06bb1381f48efa5378f9a008476734a33089c1 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Antti Määttä <antti.maatta@qt.io>
* / Scene2D: put picking coordinates back in window coordinatesKevin Ottens2017-05-051-8/+8
|/ | | | | | | | | We get the picking coordinates in model local tex coords which have a different convention than the mouse events in window coordinates. So flip them vertically to pass them in the right convention. Change-Id: I558cc62c7c820677407730eead8011193a4b967c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Renderer: fix OnDemand renderingPaul Lemire2017-04-271-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | Note: this is a risky change For some reason the renderer assumed that a RenderQueue would never have a size of 0. This prevented the renderer from calling proceedToNextFrame() on the vsync advance service as it somehow felt that it was a case of rendering with a RenderQueue not yet ready. In the case of OnDemand rendering it is perfectly valid to have a RenderQueue of 0 (nothing has changed that requires rendering) but we still need to call proceedToNextFrame() otherwise syncChanges() is never called and we end up never updating the aspects ever again. The renderer was updated to 1) check if a RenderQueue is complete 2) check if the RenderQueue is empty. (a RenderQueue can be complete but empty (OnDemand case)) 3) Proceed to next frame if RenderQueue is complete or RenderQueue is empty. Change-Id: I27ae778831c9b136db1e1a69892f6fde291fd965 Task-number: QTBUG-59696 Task-number: QTBUG-54900 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add unit tests for FrameGraphVisitorPaul Lemire2017-04-273-1/+189
| | | | | Change-Id: I1ef3c275649fe874d2dc4c6caf81082729aca360 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Send move events when hover is enabledMike Krus2017-04-251-0/+3
| | | | | | Change-Id: I3bea4f27361dd4f51f8547c6d9d45c964f4fb5d3 Task-number: QTBUG-58607 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Remove last bits of qsortcriterionPaul Lemire2017-04-251-138/+0
| | | | | | | | | QSortCriterion was replaced with QSortPolicy, somehow some files were still around. Change-Id: Ic41fe557eb77c0b8d9d701a875598a7850a92b62 Task-number: QTBUG-55952 Reviewed-by: Kevin Ottens <kevin.ottens@kdab.com>
* Try to investigate why tst_GraphicsHelperGL3_3::blitFramebuffer() failsv5.9.0-beta3Giuseppe D'Angelo2017-04-181-2/+2
| | | | | | Change-Id: Ide10e84479bdcfea71c29cd46b8a29199574d856 Task-number: QTBUG-59828 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* tst_GraphicsHelperGL3_2::blitFramebuffer(): check how many samples are supportedGiuseppe D'Angelo2017-04-182-3/+6
| | | | | | | | | Apply the same fix as tst_GraphicsHelperGL3_3. Unblacklist the test, since it now passes. Change-Id: I72bde506c3c6c802ed30acf40e10013f01e69de3 Task-number: QTBUG-59921 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* tst_GraphicsHelperGL3_3: remove blacklist of blitFramebufferGiuseppe D'Angelo2017-04-181-2/+0
| | | | | | | | Got fixed in the meanwhile. Change-Id: I3efccd988b39b77bebab628bbf637b302a247cef Task-number: QTBUG-59828 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* tst_GraphicsHelperGL3_3::blitFramebuffer(): check how many samples are supportedGiuseppe D'Angelo2017-04-181-1/+6
| | | | | | | | | | | | | | We can't just generate a multisampled 2D texture with 4 samples per texel; we need to check the implementation-defined maximum amount of samples. Lacking glGetInternalformat*, query GL_MAX_SAMPLES. Since OpenGL does not mandate a minimum, getting 0 is actually allowed; glTexImage2DMultisample however does not accept 0 as number of samples, hence skip the test in that case. Change-Id: Id1b0c9705aed0665093aae44983eac8b656b676f Task-number: QTBUG-59828 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use using namespace declaration to animation clip unit testSean Harmer2017-04-121-8/+10
| | | | | | | Reduces the noise. Change-Id: Icb7eea31b140c4f5380b99ba67f0b9f5519faab6 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Rename AnimationClipLoader to AnimationClipSean Harmer2017-04-126-42/+42
| | | | | | | | It handles both loadign from file and from data constructed using the public API. Change-Id: Ic9e71dc60c36869548323312f7129df6c9edd763 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add a flag to AnimationClipLoader to track where its data comes fromSean Harmer2017-04-122-0/+6
| | | | | | | Nicer than implicitly tracking it via m_source.isEmpty(). Change-Id: I120cb3728504b2bbc77d5959711a3f94731399ce Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Picking: don’t emit click if mouse released on different entityMike Krus2017-04-121-4/+4
| | | | | | Task-number: QTBUG-59582 Change-Id: I88e49add59d1caa3167576c8f0c014dd61211f29 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Use interpolation enum from QKeyFrameSean Harmer2017-04-112-8/+10
| | | | | | | No point in duplicating this on the backend just for the sake of it. Change-Id: I1852f7f22d5519b260ed90adce3715ab4257df61 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Blacklist a tst_VSyncFrameAdvanceService test on openSUSE 42.1Tony Sarajärvi2017-04-041-0/+2
| | | | | | Task-number: QTBUG-56576 Change-Id: I7ad2367de7d5dc855a2493832db99dc1b9c4c070 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Blacklist tst_GraphicsHelperGL3_2::blitFramebuffer on Ubuntu 16.04Tony Sarajärvi2017-04-041-0/+2
| | | | | | Task-number: QTBUG-59921 Change-Id: I2385f5079adf91d6ced64470dfa90d8f654d0f35 Reviewed-by: Liang Qi <liang.qi@qt.io>
* Blacklist tst_GraphicsHelperGL3_3::blitFramebuffer on Ubuntu 16.04Tony Sarajärvi2017-03-311-0/+2
| | | | | | Task-number: QTBUG-59828 Change-Id: I5fc74639dc9bffcccdfc42655656ba37822ae07c Reviewed-by: Liang Qi <liang.qi@qt.io>
* Remove pointless template member function from QAbstractFunctorSean Harmer2017-03-306-9/+9
| | | | | | | Use template free function instead. Change-Id: I1171279423f164b877aaef21926ceda512fcbd2e Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Use [setL|l]oopCount in C++ for QAbstractClipAnimatorSean Harmer2017-03-304-24/+24
| | | | | | | | | Keep the property name as loops for consistency with Qt Quick. Avoids ambiguity in function name meaning. Change-Id: Icf35f30d3020e77aba9db878c9dbc6e890c898ff Reviewed-by: Marc Mutz <marc.mutz@kdab.com> Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add Threshold suffix to QLevelOfDetail enum valuesSean Harmer2017-03-292-7/+7
| | | | | | Change-Id: I70a39b4a2664e2952d9f3cdd1ace1f021b0311dd Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Add arguments to notify signals in QFirstpersonCameraControllerSean Harmer2017-03-281-2/+2
| | | | | Change-Id: Ic7a970bf51e11dde38bbf3ce9b708e957f9fee8e Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Fix ShaderData following texture support changesPaul Lemire2017-03-271-2/+70
| | | | | Change-Id: Ia1ef3fdd796070fa6c5b37be5774babd1eaf2d96 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove last vestiges of parent-child data from ClipBlendNodeSean Harmer2017-03-261-2/+0
| | | | | Change-Id: I76c28fc48ee6683f3e86aceffd66e2b579899d5b Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Make ClipBlendNodeVisitor use allDependencyIds()Sean Harmer2017-03-261-9/+15
| | | | | | | | | Instead of childrenIds() which no longer makes sense since we do not use the parent/child relationship to define the tree but rather explicit properties on each node type. Change-Id: Ia2a20a62d5f51acbbb364f6b5bd1ffebdbc8a28c Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add allDependencyIds() pure virtual and overrides to backend nodesSean Harmer2017-03-265-0/+25
| | | | | | | | This will be used to visit all nodes by the visitor for the purpose of collecting vlaue nodes that should be evaluated. Change-Id: Iff84eed2ee139a0ecd3639994549e5859b5827d0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename dependencyIds() to currentDependencyIds()Sean Harmer2017-03-266-11/+11
| | | | | | | | | | We need to add another function that returns all potential dependencies rather than just those that are dependencies given the current state (blend value). Make room for that by renaming this to a more descriptive name. Change-Id: I06cdc2e471007e3bd40cd7b687a4a2c21e4b2828 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename QClipBlendNode::performBlend() to blend()Sean Harmer2017-03-263-3/+3
| | | | | | | | Now the old blend() virtual is gone we can give this function a nicer name. Change-Id: I74e427692f9667d52342d5c558bff3e7cf63c652 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove blend() virtual function from backend blend tree nodesSean Harmer2017-03-265-69/+0
| | | | | | | | No longer needed as replaced by the more general doBlend() protected virtual. Change-Id: I5f11c068f8a379baa53a033e5ce8ce63ff64d5ba Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove ClipBlendNode::parentId() functionSean Harmer2017-03-262-11/+0
| | | | | | | | No longer needed. The tree is not managed by parent/child relationships any longer. Change-Id: I711e71a4b54491f5713732ea54100b7ce9526527 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Remove clips property from QAbstractClipBlendNode and friendsSean Harmer2017-03-269-318/+0
| | | | | | | | No longer needed as concrete subclasses each provide their own specific APIs for managing clips or sub trees. Change-Id: I8e090bcf18ad9bf0d19e36128d7556aaa6cd6edf Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add overload of buildPropertyMappingsSean Harmer2017-03-251-0/+196
| | | | | | | | | | Eventually we should remove the original form which is currently called by the non-blended animation code path. It will be better to merge the blended and non-blended code paths so we have less code to maintain. Also the blended code path seems more efficient. Change-Id: Ib6aa4006e4b830a32b985527bae900ce6f3facec Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add function to generate component indices for blend tree formatSean Harmer2017-03-253-0/+577
| | | | | | | | | | This generates the format indices required by the formatClipResults() function which performs the gather to reorder the raw results from an animation clip to the format used by the blend tree/animator. Change-Id: I5cd8fbe366792ae9d8317f098699c413450b9b87 Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add function assignChannelComponentIndicesSean Harmer2017-03-251-0/+66
| | | | | | | | | | | | | | This iterates through the channel description and assigns channel component indices in ascending order. The next step will be to use this in conjunction with the channel description with the layout of channels in each clip to generate the format indices that will allow us to quickly map from the clip's raw ClipResults to ClipResults formatted in the layotu used by the blend tree/animator. Change-Id: I04dd5a21ca8355529118cfb2b05f4904e43ef0e2 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add a function to build list of unique channel names and typesSean Harmer2017-03-251-0/+126
| | | | | | | This will be needed to construct the data layout for blend trees. Change-Id: I0b11076f5ecd55cfad094d864f3f8270841fc62a Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add function to format clip results using a gather operationSean Harmer2017-03-251-0/+68
| | | | | | | | | If an index in the format is -1 put a default value of 0 into the formatted results. This will allow clips to not have to provide every channel used anywhere by the blend tree. Change-Id: I9e18d0840e75a959ef680cbd54259a74c9331fa8 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add methods to set and retrieve format indices for a blend value nodeSean Harmer2017-03-251-0/+130
| | | | | | | | | | | | | | | | | | | | | | | | In order to have a consistent data layout for all interior nodes of a blend tree, we need a place to convert from whatever data layout a clip produces when evaluated to the format used by the blend tree. We will do this by creating for each value leaf node a vector of indices that can be used to map from the ClipResults layout output by the clip to the ClipResults format used by the blend tree. With this approach, we can do the following: * Evaluate each leaf node in the blend tree * Perform a gather operation using these format indices to reorder the data into a consistent layout for the whole blend tree * Evaluate the blend tree using this consistent layout This completely avoids having to perform complex mappings when evaluating each blend node, which is a significant saving in overhead and allows for more parallellism in the future. Change-Id: Ie534534f9555842d0d0f1a89fc996e25f5c6ce9e Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add function to evaluate a blend treeSean Harmer2017-03-251-0/+335
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out with this design, evaluating the blend tree is actually really simple. Visit the tree nodes and call blend on the interior nodes. The leaf nodes will already have their values from an earlier stage. This also makes apparent yet another opportunity for parallelism during the blend tree evaluation. The blend tree may contain independent subtrees that can safely be evaluated in parallel. Once we have the ability for jobs to spawn jobs there are at least 3 ways we can have parallelism in the blend tree evaluation: 1) Each blended clip animator can be processed in its own job. 2) Sub trees of the blend tree can be evaluated in parallel, relying upon dependencies between jobs to do this properly. 3) Within each node's doBlend() there is potential to use a parallel implementation of the map operation like parallel_for in TBB. There are also other opportunities in earlier stages of processing such as when evaluating the actual clips, we then need a gather operation to map the clip results into the layout used by the blend tree. This evaluations could be done in parallel as well as a parallel gather (which is just a map with a random access read operation). This all bodes well for being able to process large numbers of animations each containing large numbers of channels which will be needed when we add support for skeletons. Change-Id: Id81e3a5e563a7ef9b7ac39b90c518c656cf8a3cf Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Add virtual doBlend to ClipBlendNode and subclassesSean Harmer2017-03-254-1/+446
| | | | | | | | | | | | | | | | | | | This is called by the non virtual performBlend (will be renamed once old implementation is removed). The key here is that all nodes in the blend tree will have the exact same layout for the ClipResults for a given animator. This means we don't need to have a mapping data structure for every node in the tree. This really simplifies the blending implementation and will allow us to parallelise this much better in the future as each blend node could make use of a parallel_for() or map() type operation. To achieve this we will need to perform a gather operation that maps the ClipResults coming straight out of an animation clip to the ClipResults layout used by the blend tree as described above. This will be done in a follow up commit. Change-Id: I389383d3b9197a6ef36b529f44ac89cb5c593023 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add missing parentheses in conditionalSean Harmer2017-03-251-2/+2
| | | | | Change-Id: I58dc19a06283a5999dbcd76f74d095daf0a9017d Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Add function to recursively calculate duration of a blend treeSean Harmer2017-03-255-0/+154
| | | | | | | | | | | | | | The resulting duration is independent of which animators the blend tree is associated with so this can be implemented as a simple set of virtual functions in the concrete classes. The value node simply returns the duration of the contained clip; the additive node returns the duration of the base node; and the lerp node lerps the durations of the start and end nodes. Change-Id: Ib6edea3fa495885493fa72d44437fea5a8c5a446 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Mike Krus <mike.krus@kdab.com>
* Fix scene2d mouse event coordinate calculationAntti Määttä2017-03-233-2/+293
| | | | | | | | | Apply the window size and use correct texture coordinates. Task-number: QTBUG-57253 Change-Id: Ibc5f7ef878baf938b1b3e3b7cfb4eba2cea38ad6 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Add function to find set of leaf blend node ids that need evaluatingSean Harmer2017-03-191-0/+69
| | | | | | | | | | | | | | | | | | | We should only evaluate the clips that are actually dependencies of the blend tree being evaluated given its current state. At present this will simply be the set of all leaf nodes in the blend tree but in the future when we support generalised lerp nodes etc, this will yield the subset needed for the current state. This involved adding support for pre-order traversal of the blend tree. As a result, extended the visitor to work with both pre and post orders and for all nodes or only the dependencies. Note that we return the ids of the blend tree nodes, not the ids of the clips themsevles. This is so we can then index the results by blend node id in a later commit. Change-Id: Ia13fe90ec3090306c1e8ade316ce0540f36a67fd Reviewed-by: Mike Krus <mike.krus@kdab.com>