summaryrefslogtreecommitdiffstats
path: root/src/core/qchangearbiter_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Copyright header change.Mika Salmela2015-02-091-19/+14
| | | | | | | | As for preparation for Qt5.5 release the copyright header is updated to correspond the current license requirements. Change-Id: I36632918b66f455539453b42c369689fb11298ec Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Introduce QLockableObserverInterfaceKevin Ottens2015-02-081-4/+4
| | | | | | | | | We introduce QLockableObserverInterface as an intermediate interface before the QChangeArbiter and depend on that interface whenever possible. Change-Id: Ic92efec8d68c88344bb43f8fc7dc10b1212180af Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename ChangeQueue -> QChangeQueueSean Harmer2014-12-311-10/+10
| | | | | Change-Id: I2f53dfb314e3e4b12bf763dc4b7c43608374bc1c Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Remove some redundant typedefsSean Harmer2014-12-311-4/+0
| | | | | Change-Id: Id7674e90935073dd4a6756c71545f7fde93bbfde Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Optimize: Prefer QVector over QList for QObserverList.Milian Wolff2014-12-091-1/+1
| | | | | | | | | | | | | | This list stores QObserverPair, i.e. a pair of a QFlags and pointer, which by definition is larger than a pointer. Thus QList allocates each node on the heap, whereas a QVector can use a single block of memory. This reduces allocations and improves iteration speed, as this reduces the cache misses incurred with QList and pointer chasing. Change-Id: Ib3a9fbaa099cb41785086857e856072b74211605 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Rename QNodeUuid to QNodeIdSean Harmer2014-11-191-4/+4
| | | | | Change-Id: I0450a4d4708af1ccd3d4c8f2ddc5c9a5c9deca27 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* Optimize: use std::vector instead of QVector for the change queues.Milian Wolff2014-11-051-1/+1
| | | | | | | | | | | Note that QVector::clear() frees memory, as does resize(0) now apparently. This triggers repeated allocations after we distributed the changes. Using std::vector instead, we can reuse the memory leading to a noticeable performance improvement. Change-Id: Ib08795a7ba3f893c13dad29f50641e4e2dc924e4 Reviewed-by: Paul Lemire <paul.lemire@kdab.com> Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Release the TLS for the main thread's change queue in the arbiterSean Harmer2014-11-031-0/+1
| | | | | | | | | This solves the QFontCache shutdown bug. Now I think all that is left it to shutdown the render submission thread cleanly. Task-number: QTBUG-42353 Change-Id: If17c62680302cffa266782261400ae44bfbac612 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* More work towards a clean shutdownSean Harmer2014-11-031-3/+3
| | | | | | | | | | | | | | | | | | | The QAspectJobManager doesn't really need to be public now I think but as it still is let's make the base class have it's own private class that inherits from QObjectPrivate. The ThreadWeaver threads all get cleaned up cleanly upon shutdown. When trying with cylinder-cpp with all the rendering stuff in main() commented out, we consistently get the crash in QFontCache. With the rendering stuff enabled there is also an assert inside the swapbuffers() call. This is because the render thread is not cleanly shutdown yet. The QFontCache crash is something to do with freeing thread-local storage. I will continue to investigate. Change-Id: Ib3ad3ea04ae4859d27f0dd4604b00bc5a38859a1 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
* QNodeUuid: typedef for QUuidPaul Lemire2014-11-021-4/+4
| | | | | | | Should allow to easily replace QUuid by a custom quint64 based struct Change-Id: Ib4ba57efd2e070317aa3417b37ce091f2b4779a0 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QJobManagerInterface renamed to QAspectJobManagerInterfacePaul Lemire2014-10-181-3/+3
| | | | | Change-Id: I87b75ed9702240e1db46cf1c5ee8cfe3bb2ea91e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QChangeArbiter and Observers/Observables made privatePaul Lemire2014-10-171-8/+57
| | | | | | | | | Note: the Renderer aspect uses all those private headers, when we introduce the QBackendNode class that will be a wrapper around those, we will be able to remove those private includes. Change-Id: I6240f754e6da251da158cafcf76029ae59000e05 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QChangeArbiter/QScene refactoringPaul Lemire2014-09-301-8/+2
| | | | | | | | | | | | | | | Added nodeIfFromObservable method in QSceneInterface/QScene. Needed when the QChangeArbiter needs to find the QNode target from an Observable. QChangeArbiter/QPostman is passed a QObserverInterface, makes it easier to unit test. QPostMan sends change to QNode::sceneChangeEvent. This method should be overloaded by subclasses of QNode. Change-Id: If85fcb034b3fcdace82e63149ca7684d9d888d1c Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QChangeArbiter overhauledPaul Lemire2014-09-291-2/+8
| | | | | Change-Id: I46e81f4f428171db5304d11985ddbbb78ab09030 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* Renamed QFrontendSceneObserver to QPostmanPaul Lemire2014-09-281-0/+2
| | | | | | | | It is a QObserverInterface, created in the main thread and set in the QChangeArbiter directly without passing by the QAspectManager. Change-Id: Icc6065c26d6b1c7557d07cb057469a0309eed18b Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QChangeArbiter can register/unregister observers from a node QUuidPaul Lemire2014-08-131-1/+2
| | | | | Change-Id: Ie608e5be3a3c26bb59cd741ab9e3d3cf9fb3d94e Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QSceneObserverInterface registered to QChangeArbiterPaul Lemire2014-07-251-0/+2
| | | | | | | | | Registration occurs in QAspectManager::registerObserver just after the aspect is initialized. QSceneObserverInterface instances are unregistered at shutdown of the QAspectManager. Change-Id: I8cbe575454b13c262885d9965f35665ab0ff17a3 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
* QChangeArbiter d-pointeredPaul Lemire2014-07-091-0/+97
Change-Id: Ic33650363629860ff23dfb048fa831dccf47b516 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>