Removing shader uniform map observers 56/286556/2
authorDavid Steele <david.steele@samsung.com>
Mon, 9 Jan 2023 15:34:49 +0000 (15:34 +0000)
committerDavid Steele <david.steele@samsung.com>
Mon, 9 Jan 2023 18:12:22 +0000 (18:12 +0000)
commitf1561580eb4fbdff610b31f51758e4363cd43304
tree68619135df912a19788a6cc845ccb04870e6e798
parent82eba25935835ef78d113414981eaf1e1fc046c5
Removing shader uniform map observers

Many renderers use few shaders. Currently, there is an observer list
in Shader's uniform map to inform Renderer to update it's collective
uniform map when it's updated.

In practice, shader uniforms are rare (Especially in visuals, with the
exception of PrimitiveVisual, which isn't really used much), so we
are paying the price (an array of observers) for something un-necessary.

Instead, we can change Renderer to store the last known change counter
for it's attached shader. If the shader's uniform map changes, then we
can detect this during PrepareRender, prior to rendering, by testing
the change counter.

We can therefore fully remove the uniform map observer list, improving
memory consumption and speeding up renderer creation time.

Change-Id: I96b9b5c4f7b21fda9593dc1f89f580e7ceb4513c
Signed-off-by: David Steele <david.steele@samsung.com>
dali/internal/update/common/property-owner.cpp
dali/internal/update/common/property-owner.h
dali/internal/update/common/uniform-map.cpp
dali/internal/update/common/uniform-map.h
dali/internal/update/rendering/scene-graph-renderer.cpp
dali/internal/update/rendering/scene-graph-renderer.h