aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Enhance rendernode example with opacity supportLaszlo Agocs2016-06-035-22/+49
| | | | | | | | The opacity is already animated in the QML scene but enabling blending and using inheritedOpacity() was not done. Until now. Change-Id: Iaaf50c20302e29db85c5dfaeaab4d069cb18714e Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* D3D12: Remove m_lastNN members from text materialLaszlo Agocs2016-06-032-33/+32
| | | | | | | | | | | | | To reduce the data size. The data is anyway available in the element-dedicated area of the constant buffer (better said, the plain CPU memory the renderer uses to prepare the data for the engine), so compare with that instead. Note that while the memcmp-memcpy pair may seem to have little value at first, setting the UpdatedConstantBuffer flag only when needed does have its benefits since the GPU-visible buffer mapping can be skipped completely when nothing has changed. Change-Id: Ie5d6797a06cb4259bd65114c5b69b11ff165e871 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Add OpenGL prefixes to ContextProfile in GraphicsInfoLaszlo Agocs2016-06-022-13/+13
| | | | | | | Make it clear with the naming that this is specific to OpenGL. Change-Id: Ib2106c1539ee424a0d208d17c684c3bb9ad28fa9 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* Avoid ifdefed enumLaszlo Agocs2016-06-022-11/+4
| | | | | | | | | Do it like in QSGGeometry: use the values directly to avoid the GL header dependency. Change-Id: Ia83dea5cbbab7dfee8b88d1b01fcfcb51ad41fc1 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Only build textureprovider example when OpenGL is availableAndy Nichols2016-06-011-2/+3
| | | | | Change-Id: Ia4bae77ff66babb6eb8ff8c818bb5f842244ccc9 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fix build with latest qtbase due to qsimd_p changesLaszlo Agocs2016-06-011-2/+2
| | | | | | | | _bit_scan_forward is no more. Switch to qCountTrailingZeroBits which in the end also boils down to _BitScanForward on MSVC. Change-Id: Ic10ac2b0663c95c86be5414934105f5ec0bf1a9b Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* One GraphicsInfo to rule them allLaszlo Agocs2016-06-0129-480/+658
| | | | | | | | | Rename RendererInfo to GraphicsInfo. Deprecate OpenGLInfo and move the surface format properties into GraphicsInfo. Move also the shader info properties from ShaderEffect. Change-Id: I3b3f01080e059b3a30a132fd67de19a4bfca54ef Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* D3D12: Get rid of the material's RenderState duplicationLaszlo Agocs2016-06-019-110/+27
| | | | | Change-Id: Icd42a1bfff0f12f8162e888f204ad9b3a79aa911 Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
* Change graphicsAPI to graphicsApiLaszlo Agocs2016-06-0119-32/+32
| | | | | Change-Id: I065f17abd1cb71cd8d6ead76abf7a544eb7a99c0 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Make matrix and clipList setters' appearance more internalLaszlo Agocs2016-05-314-10/+21
| | | | | | | And start using them from the batch renderer as well. Change-Id: I20adc3962b06ac712267dc2be95e9e28cea82e21 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Enable QQuickItemGrabResult in all buildsLaszlo Agocs2016-05-314-12/+8
| | | | | | | | No OpenGL specifics in there anymore. Change-Id: Ib3a0ee316d2c7b72b40b6c0331605edae7ce259b Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Refactor the rendernode exampleLaszlo Agocs2016-05-316-112/+94
| | | | | | | | By removing the Renderer abstraction it becomes easier to follow and understand. Change-Id: Iddacb461d51a75864983850660c5480985b3524f Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* D3D12: Remove unused srv gettersLaszlo Agocs2016-05-315-23/+0
| | | | | | | No need to expose the shader resource view. Change-Id: I2c65ba8bb356ca831aeb4b5c60979139aba944fe Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* D3D12: Drop QVectors from QSGD3D12EngineLaszlo Agocs2016-05-316-32/+58
| | | | | | | | | | | | | | | Results in a more than 3x drop (and now below GL, as expected) in CPU usage in the 500 Image elements test. There is zero value in using a dynamic data structure for these anyhow, apart from getting == and qHash. However, writing our own hash provides further opportunities for optimizing, for instance there is not much point in hashing the individual input elements since the same shader code pointers imply that the input elements match too. Thus hashing becomes faster without more collisions in practice. Change-Id: Iae766bd44d30ec37080369c8b37677e633c37a88 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* D3D12: Experiment with dropping QImage data once the upload is queuedLaszlo Agocs2016-05-311-0/+12
| | | | | | | | | | | But do not enable it yet. We would lose the ability to enable mipmapping later on which is annoying since property values can get set after the first bind() for some reason. Needs some more investigation later on. Change-Id: If4ffbc762f05dc2a3bbd811bccd6cffba0b66fc6 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* D3D12 manual test: add an async, uncached image loading testLaszlo Agocs2016-05-315-2/+79
| | | | | Change-Id: I8901a67d9e2b3343ba3f57775f1849400f6cdf18 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* D3D12: Preliminary UWP supportLaszlo Agocs2016-05-311-2/+51
| | | | | | | | | | Seems to be working on a developer desktop at least. Apps are expected to force the backend via the recently introduced QQuickWindow::setSceneGraphBackend() function. Change-Id: Ib7096ace199622a97f55dd530ea59f9e3f6eca87 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
* Merge remote-tracking branch 'origin/dev' into scenegraphngAndy Nichols2016-05-3170-529/+934
|\ | | | | | | Change-Id: I35715e07b6f837f21cd8e8898f19d97af92c6b69
| * Move dependent scripts to QV4::CompiledData::CompilationUnitSimon Hausmann2016-05-316-11/+16
| | | | | | | | | | Change-Id: I85e8267ce4cd26ae83fe567357e1368658fdb43d Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Moved object/bindings/customparser counters to CompilationUnitSimon Hausmann2016-05-316-18/+20
| | | | | | | | | | | | | | These allow pre-allocating some arrays when instantiating types. Change-Id: I2ca4ba4a69429918f03a5ba4c501c763e7ffa8dc Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Moved the import cache from QQmlCompiledData to CompilationUnitSimon Hausmann2016-05-317-14/+20
| | | | | | | | | | Change-Id: I77892919678cb01ba1e697a44122760679a72045 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Move property caches from QQmlCompiledData to QV4::CompiledData::CompilationUnitSimon Hausmann2016-05-319-30/+33
| | | | | | | | | | | | | | | | | | This makes particularly sense as the binding property data per object that allows us to avoid a by-name property lookup when instantiating types is also stored there. Change-Id: I4d9275c1d8fde252df83eb11a9dfea71e5e9583a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Fix bug in designer support reference countingSimon Hausmann2016-05-301-0/+5
| | | | | | | | | | | | | | | | | | | | The QtQuick designer support may override the meta-object and reparent the property-cache of the object under editing. The code for replacing the parent of the property cache however was not handling the refcount of the _parent correctly. Change-Id: Ic73294fc208b297e8ec9c0b775b5da01a309dba6 Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * Removed the dependency to QQmlCompiledData from QQmlCustomParserSimon Hausmann2016-05-3012-34/+34
| | | | | | | | | | | | | | | | We only need fields from the compilation unit, so let's pass that instead. This is private, internal QQmlEngine API only used by QtQml and QtQuick. Change-Id: I1a659654d95585b736384b5b519d05a4df3f9ead Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Remove the custom parser binding bits hash table from QQmlCompiledDataSimon Hausmann2016-05-306-58/+66
| | | | | | | | | | | | | | | | | | Similary to the other hash tables we can store the actual information about whether a binding is covered by a custom parser or not straight in the CompiledData::Binding. Change-Id: Iab9044af57338cec935d3ef38764d7dc1aa507e8 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Centralize deferred binding bit information in CompiledData::BindingSimon Hausmann2016-05-306-58/+142
| | | | | | | | | | | | | | | | | | | | | | Ultimately the decision which bindings to initialize in a deferred way depends on the data in the meta-object (deferred property names entry). The hash in QQmlCompiledData is just caching this information. We are better off storing this single bit right in the binding itself instead of in a parallel data structure. Change-Id: Ib66d3550210af1f882b98b0ba9089391813d69ad Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * QmlProfiler: Send RangeData and RangeLocation only once per typeUlf Hermann2016-05-2718-89/+200
| | | | | | | | | | | | | | This saves time when serializing the data to be sent. Change-Id: Ic8c534d55445934a64dd253273099194b27d98af Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Small type compilation data structure cleanupSimon Hausmann2016-05-263-38/+27
| | | | | | | | | | | | | | | | | | | | After the removal of the named object hash tables in the persistent compilation unit data, we can also eliminate them from the temporary internal type compilation structures. We have everything we need in the object naming table in the CompiledData::Object - the only thing missing are the component roots. Change-Id: Ia2a7b3894310cfdb5cfecf1c2a921fb51e2a883b Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Simplify id and alias collectionSimon Hausmann2016-05-262-13/+5
| | | | | | | | | | | | | | | | | | | | | | Ids and aliases that refer to their target by id are bound to the scope of components. Instead of determining this boundary through a binary search for bindings that refer to the inner object, we can simply query the flags of the component object itself as to when to stop. This is based on the assumption that a component has only one binding anyway. Change-Id: I9a555ca95f8274b6d9a98793a2c946f47348f9d4 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Optimize named object handlingSimon Hausmann2016-05-2615-45/+153
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By storing the object indices of named objects in the CompiledData::Object of a component, we can achieve two things: (1) We can eliminate the hash of vectors in QQmlCompiledData for the object-to-id mapping (2) We can store the mapping from object name to integer object id in the CompilationUnit and share it across different QQmlContextData instances (as long as it is not modified). Also added a new test that verifies the functionality of a .qml file starting with Component{} itself with object names, something that was previously only implicitly tested through some of the examples (corkboards.qml for example). Change-Id: I28c70217222dc0e5252bf5247b7e3fc4def47446 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * QQuickWindow: Process a synthetic hover once per frameRobin Burchell2016-05-267-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the limitation that hover only changes when the mouse moves, and (in my opinion) is required to make hover functionality even remotely useful. QtQuick scenes are a dynamic medium, items can move (or change) frequently, so only changing this in response to a user action means it will frequently end up out of date. A very simple example of this is a ListView of delegates that each have a background set on hover: when flicking the list, it won't reset the hover to actually match the item under the mouse. This is now not a (very) expensive operation to do, as deliverHoverEvent does nothing if the item tree in question doesn't have hover enabled. [ChangeLog][QtQuick][MouseArea] Hover state is now updated once per frame. This means that MouseArea::containsMouse property will now be correct even if the mouse is not moving, but items move under the cursor. Likewise the mouse position properties and positionChanged signal will act as if the mouse had moved. Task-number: QTBUG-40475 Task-number: QTBUG-42194 Task-number: QTBUG-33982 Task-number: QTBUG-42578 Task-number: QTBUG-52537 Change-Id: Ic2dcbb45339e11c07f5c6a9c95eb7f64957968eb Reviewed-by: Gunnar Sletta <gunnar@sletta.org> Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * QML: re-use event objects across signal emissions.Erik Verbruggen2016-05-265-25/+71
| | | | | | | | | | | | | | | | | | | | | | This change creates a single key/mouse/wheel event for use in signals, and re-uses that event across emissions. This prevents allocating a new event (and it's QObjectPrivate data) for every key press / mouse move / wheel spin. Change-Id: I395f6ce3ed8588157e4175c8481351b330793fac Reviewed-by: Robin Burchell <robin.burchell@viroteck.net> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * Simplify object to id-in-context mappingSimon Hausmann2016-05-2611-85/+84
| | | | | | | | | | | | | | | | | | By storing the calculated integer id for an id-named object in CompiledData::Object we can simplify the code and replace a hash table with a plain vector. Change-Id: I4a84cdd00e98766d603d152e5a6574b232771a02 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Add a flag to CompiledData::Object record component boundariesSimon Hausmann2016-05-267-22/+24
| | | | | | | | | | | | | | | | This allows simplifying some code and reducing the usage of the objectIndexToId hash maps. Change-Id: I1f08d4b224c4f9fa498d90471fa545ae4e4f2af4 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * V4: fix all pedantic warningsErik Verbruggen2016-05-261-25/+31
| | | | | | | | | | | | | | | | | | - signed/unsigned conversions - size conversions (i.e. int<->long) - padding issues inside MemoryManager::Data Change-Id: I3770de2c187d1520d98e2322d682b3ecc9a14671 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Minor cleanup of pool array allocationSimon Hausmann2016-05-263-12/+13
| | | | | | | | | | | | | | | | | | We store the CompiledData::Function indices for a give QML object in a fixed sized array in the memory pool in the IR. That array can be stored as pointer/len pair directly, there is no need for another pointer indirection. Change-Id: Iccad465ab873e0e7203dc563abb67cf6354a8bfd Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
| * Fixed another batch of QHash/QMap::values() (mis)useFrank Meerkoetter2016-05-256-9/+9
| | | | | | | | | | | | | | | | | | Avoid memory allocations. Change-Id: I0b4cbef6a8c22184781a44d92172d93ac38e778c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Anton Kudryavtsev <a.kudryavtsev@netris.ru> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * Add QQuickWheelEvent::inverted()Jan Arve Sæther2016-05-254-4/+29
| | | | | | | | | | | | | | | | | | | | | | | | When handling wheel events, it's useful to know whether or not "natural" scrolling was enabled on platforms like OSX where the scrolling direction can be reversed. It's especially useful when implementing components like Slider (see QTBUG-35972). This will soon be needed in QtQuick.Controls because we plan to remove the WheelArea. Change-Id: I2770e0aa39e7e54511d7f9f7cc12760580a55e5c Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * V4: Get more code inlined in the MemoryManager.Erik Verbruggen2016-05-252-11/+14
| | | | | | | | | | | | Change-Id: I7cf6c5d3458b0c43283e63a7300ee9965ba803fb Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com> Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
* | Add an API to set the scenegraph backendLaszlo Agocs2016-05-304-12/+78
| | | | | | | | | | | | | | | | | | | | | | | | As an alternative to QT_QUICK_BACKEND and QMLSCENE_DEVICE. The need for this is twofold: it is requested by Creator since environment variables have potential issues with child processes inheriting them. Also, platforms like WinRT may have issues with environment variables - as such a concept may not necessarily exist. Change-Id: Ia66b78dc83fce5af0f36d4b34dc094582eb6e61d Reviewed-by: Robin Burchell <robin.burchell@viroteck.net>
* | Merge remote-tracking branch 'origin/dev' into HEADLaszlo Agocs2016-05-24111-459/+595
|\| | | | | | | Change-Id: If91e0e28d004f1db978dcab393f189743bb69cd5
| * Get rid of QQmlCompiledData::rootPropertyCache memberSimon Hausmann2016-05-245-22/+15
| | | | | | | | | | | | | | | | This would not seem like a member variable that is hot enough to keep there and it is two loads away. Change-Id: Id7088771bd33545a2846cc3497e5904dd8ac4f5d Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Get rid of QQmlVMEMetaDataSimon Hausmann2016-05-2410-102/+60
| | | | | | | | | | | | | | | | | | | | | | It is unused now and we can remove it as well as its QByteArray based storage. The non-emptyness of the meta-data QByteArray was also used to indicate whether it is necessary to create a VME meta-object when instantiating an object. This bit is now folded into the flag of the QFlagPointer storing the property caches. Change-Id: I3c3604c61ff16a4e76912e68b1c19afdb0f2bd9d Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Fix compilationSimon Hausmann2016-05-241-0/+1
| | | | | | | | | | | | | | Add missing qdebug.h include after some header file changes in qtbase. Change-Id: Ie3bc9469650c954596a03fb471765767149b8f05 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Get rid of QQmlVMEMetaData::AliasDataSimon Hausmann2016-05-244-27/+12
| | | | | | | | | | | | | | | | | | The remaining signal index for the changed signal of the alias target is something that we need only once (when doing the initial alias endpoint connection) and then we can retrieve it from the property cache. Change-Id: Ifbd4625f9af3ca00c9b916eee5c82f58450d54ef Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| * Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/devSimon Hausmann2016-05-24100-310/+509
| |\
| | * Merge remote-tracking branch 'origin/5.7' into devLiang Qi2016-05-24100-310/+509
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/qml/jsruntime/qv4engine_p.h src/qml/jsruntime/qv4runtime_p.h src/qml/qml/qqmldelayedcallqueue.cpp src/qml/qml/qqmlvaluetypewrapper.cpp src/qml/qml/qqmlvmemetaobject.cpp src/qml/qml/v8/qv8engine_p.h tests/auto/quick/qquicktext/tst_qquicktext.cpp Change-Id: I3f0608c7beb88088cbbef4d0db59920f56deaea9
| | | * V4: allow inlining of ExecutionEngine::{qml,js}Engine()Erik Verbruggen2016-05-2036-17/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All other changes are just to be able to include qv8engine_p.h in qv4engine_p.h Change-Id: I71ba2ec42cdc20d5c7d97a74b99b4d1ada1a5ed8 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
| | | * V4: create a fast-path for QObjectWrapper::wrapErik Verbruggen2016-05-202-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The typical case is that there's already a QQmlData for a QObject, so fast-path this, and fall back to the general case if there is none (or it is deleted, etc.) Change-Id: I00c890e5fe7abdd743c4e99316a7ce93eb3db9df Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
| | | * Always use ::copysign instead of std::copysign where availableRalf Nolden2016-05-201-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change to remove the Q_OS_ANDROID define for using ::copysign there instead of std::copysign as other systems are affected as well (FreeBSD 9.3 with gcc 4.8 in particular). The distinction does cause more problems than simply using ::copysign everywhere. Change-Id: I1fe42fdee9c1c1bbb3e5930573ff29c600dfb5e0 Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>