Changed keys from raw int to templated class 05/284605/15
authorDavid Steele <david.steele@samsung.com>
Wed, 30 Nov 2022 11:27:55 +0000 (11:27 +0000)
committerDavid Steele <david.steele@samsung.com>
Fri, 20 Jan 2023 16:39:35 +0000 (16:39 +0000)
commitb8a0134a62e9b90c4c7130999e948f607078bfcf
tree9e24286b06a509017040c1d477c8e3f91943c67a
parentbf3272d90cfeef8b36e3b71c30e0f2200c897a73
Changed keys from raw int to templated class

MemoryPoolKey<Type> template has indirection operator
to enable simpler code at the point of use.

Updated FixedSizeMemoryPool to deduce mask and bitshift
values from max block count. Enabled for MemoryPool, so
that 32 bit keys can be used.

Added handling to switch key semantics between limited /
unlimited blocks. In the normal case, the block count is
limited, and the maximum block size is 1M entries, so
a block id range of 0-31 is sufficient. In the other case,
the block count is unlimited, so the key is the Nth item
in the memory pool across all blocks. Whilst this may be slower
to dereference, in practice, this mode isn't used.

Change-Id: Id7827d1beded831307b12ce8a3ef46e32366f82b
22 files changed:
automated-tests/CMakeLists.txt
automated-tests/src/dali-internal/utc-Dali-Internal-FixedSizeMemoryPool.cpp
dali/internal/common/fixed-size-memory-pool.cpp
dali/internal/common/fixed-size-memory-pool.h
dali/internal/common/memory-pool-key.h [new file with mode: 0644]
dali/internal/common/memory-pool-object-allocator.h
dali/internal/event/rendering/decorated-visual-renderer-impl.cpp
dali/internal/event/rendering/renderer-impl.cpp
dali/internal/event/rendering/visual-renderer-impl.cpp
dali/internal/event/rendering/visual-renderer-impl.h
dali/internal/render/data-providers/render-data-provider.h
dali/internal/update/manager/owner-key-container.h
dali/internal/update/manager/render-instruction-processor.cpp
dali/internal/update/manager/render-task-processor.cpp
dali/internal/update/manager/update-algorithms.cpp
dali/internal/update/manager/update-manager.cpp
dali/internal/update/manager/update-manager.h
dali/internal/update/nodes/node.cpp
dali/internal/update/nodes/node.h
dali/internal/update/nodes/scene-graph-layer.h
dali/internal/update/rendering/scene-graph-renderer.cpp
dali/internal/update/rendering/scene-graph-renderer.h