Optimize: Prefer QVector over QList for QObserverList.

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>
Style cleanup: Pass QString as const&.

Change-Id: I9ca6b1ef8fd1411f017e0de6c7675fd813cdbe73
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Optimize: Do not allocate QStrings for the QMetaObject class names.

We can use QByteArray here, and construct those fromRawData. This
gets rid of quite some useless allocations in the bigscene example.

Change-Id: If90358651dcfc4bbcc173b0a7f381d1dbfdee205
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Use a QVarLengthArray for findRenderPassesForTechnique.

This way, we don't need to allocate the vector contents every time,
but can use the stack instead. As this is relevant for all nodes,
every frame, the impact is large.

Change-Id: I861ecf0a3bd40a1d4e57446f99dcf08f0b53b246
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Optimize: Do not allocate the state name every time.

The compiler is not smart enough to get rid of this call, even
when the debug() function is not doing anything.

Upstream should be fixed to use categorized logging instead,
which would not have this problem.

Change-Id: I70ed344cce0dc2130d3aa96f3873ffc4799f6d60
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Initialize m_surface member.

Change-Id: I15f15634d3c6cab1c16108ccaf3b22b6d3ec5ea6
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>