Avoid unnecessary updates when using in-process cache
authorEskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Thu, 1 Mar 2012 10:24:57 +0000 (11:24 +0100)
committerQt by Nokia <qt-info@nokia.com>
Thu, 1 Mar 2012 11:22:00 +0000 (12:22 +0100)
commitc0da7869001a52668f4ffaa851e05dd0ca6e6d67
tree457cc07456f8022496bc7e3ffe0a87a53f2fa39a
parent5422a86b39490c30ca86a272a111c3d7da15fb3f
Avoid unnecessary updates when using in-process cache

Whenever an in-process cache is updated, it will emit
itemsAvailable() signals to all listening glyph caches. This will
in turn cause each of the glyph caches to update and each
of the glyph nodes to be preprocessed (the entire scene graph will
be updated.) This happens even if the changes to the in-process
cache are requested by an external client, due to a cross-process
cache sharing mechanism. However, itemsAvailable() signals are
only interesting if the items were requested by the in-process
cache.

We therefore add a mechanism now to check if the glyphs were actually
requested by the cache before updating anything.

Change-Id: I529f94b3928c2a5e06fec354014fa11d21671057
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
src/quick/scenegraph/qsgshareddistancefieldglyphcache.cpp
src/quick/scenegraph/qsgshareddistancefieldglyphcache_p.h