Qt Declarative (Quick 2)
Go to file
Eskil Abrahamsen Blomfeldt 1f3dd3f5db Get rid of preprocess in QQuickText
Preprocessing in the scene graph is actually pretty expensive,
so we want to avoid using it for something like text, where you
can often have a lot of nodes in a UI.

For text it was previously used for two purposes:

1. To make sure the distance field glyph cache was updated with
potential new glyphs before the frame was rendered, but *after*
all new glyph nodes had been created (this is an optimization to
avoid having to resize the cache multiple times in one frame,
but rather wait until we know the exact amount of new glyphs
that need to be added)

2. Update the coordinates of the glyph based on their position
in the glyph cache if the glyph cache says they have moved (or
if they have just been added for the first time).

Point #1 can actually be handled a lot simpler, by having a
separate loop for the existing glyph caches where we ask them
to preprocess. There is typically only a few glyph caches, but
can be hundreds of glyph nodes in a scene, so in the previous
code we would be calling the update() functions on the same
glyph cache over and over again every frame.

Point #2 does not need preprocessing every frame, but can be
reduced to only preprocess when the geometry is marked as
dirty. We then do a pass on the glyph node in question to
update its geometry and turn the flag off again so that we
don't pay the cost every frame.

Pick-to: 5.15
Fixes: QTBUG-84351
Change-Id: If8c492acaef9c512c2db61b64bcab2103db2d997
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-15 07:10:04 +02:00
cmake CMake: Regenerate configure.cmake files 2020-06-04 22:27:33 +02:00
coin CMake: Enable cross-building Coin configurations 2020-03-15 12:43:42 +01:00
dist Add changes file for Qt 5.15.0 2020-04-28 19:57:47 +02:00
examples Move resetOpenGLState() to QQuickFbo 2020-06-12 12:38:39 +02:00
features Add the skeleton for a D3D12 backend 2016-02-19 14:51:37 +00:00
src Get rid of preprocess in QQuickText 2020-06-15 07:10:04 +02:00
tests Port type registrar test to cmake 2020-06-14 23:15:53 +02:00
tools Replace calls to deprecated QEvent accessor functions 2020-06-11 22:00:19 +02:00
.cmake.conf CMake: Regenerate qtdeclarative/src 2020-05-29 10:01:16 +02:00
.gitattributes Update the git-archive export options 2012-09-10 14:24:05 +02:00
.gitignore Ignore some cmake generated files 2020-04-02 08:41:08 +02:00
.gitmodules Update to the latest version of the ecmascript test suite 2018-04-26 20:26:36 +00:00
.prev_CMakeLists.txt CMake: Regenerate qtdeclarative/src 2020-05-29 10:01:16 +02:00
.qmake.conf Remove QT_NO_LINKED_LIST 2020-02-12 12:48:32 +01:00
.tag Update the git-archive export options 2012-09-10 14:24:05 +02:00
CMakeLists.txt CMake: Regenerate qtdeclarative/src 2020-05-29 10:01:16 +02:00
LICENSE.FDL Add license files mandated by (L)GPL. 2013-02-15 00:03:10 +01:00
LICENSE.GPL2 Updated license headers 2016-01-19 14:53:18 +00:00
LICENSE.GPL3 Updated license headers 2016-01-19 14:53:18 +00:00
LICENSE.GPL3-EXCEPT Updated license headers 2016-01-20 11:46:25 +00:00
LICENSE.LGPL3 Updated license headers 2016-01-19 14:53:18 +00:00
configure.json Move model types into their own library 2019-05-02 09:26:04 +00:00
dependencies.yaml Update dependencies on 'dev' in qt/qtdeclarative 2020-06-15 04:37:22 +03:00
qtdeclarative.doxy Add doxyfile for building doxygen documentation 2018-08-16 15:54:40 +00:00
qtdeclarative.pro Port python check to configure system 2020-05-07 13:45:03 +02:00
sync.profile Move the header checking into ExecutableCompilationUnit 2019-06-14 19:08:51 +02:00