nano3d: remove surface-clear optimization

This patch fixes a GCC-10 compile error. Even though the optimization
was quite effective - I measured a speedup of factor 2 - it is not all
that important for the overall application performance. In the nano3d
case, we are talking about 1 vs. 2 percent of CPU time.

Fixes #4140
This commit is contained in:
Norman Feske 2021-05-06 13:19:13 +02:00 committed by Christian Helmuth
parent ff160decec
commit d19b751632

View File

@ -165,9 +165,9 @@ class Nano3d::Scene
template <typename T>
void _clear(Genode::Surface<T> &surface)
{
Genode::size_t n = (surface.size().count()*sizeof(T))/sizeof(long);
for (long *dst = (long *)surface.addr(); n--; dst++)
*dst = 0;
Genode::size_t n = surface.size().count();
for (T *dst = surface.addr(); n--; dst++)
*dst = { };
}
void clear()