mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-22 12:28:02 +00:00
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:
parent
ff160decec
commit
d19b751632
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user