mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-02 07:30:58 +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>
|
template <typename T>
|
||||||
void _clear(Genode::Surface<T> &surface)
|
void _clear(Genode::Surface<T> &surface)
|
||||||
{
|
{
|
||||||
Genode::size_t n = (surface.size().count()*sizeof(T))/sizeof(long);
|
Genode::size_t n = surface.size().count();
|
||||||
for (long *dst = (long *)surface.addr(); n--; dst++)
|
for (T *dst = surface.addr(); n--; dst++)
|
||||||
*dst = 0;
|
*dst = { };
|
||||||
}
|
}
|
||||||
|
|
||||||
void clear()
|
void clear()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user