diff options
author | Vito Caputo <vcaputo@gnugeneration.com> | 2017-01-07 16:28:46 -0800 |
---|---|---|
committer | Vito Caputo <vcaputo@gnugeneration.com> | 2017-01-07 16:28:46 -0800 |
commit | 86bc322c65e3e2eabb91edcfe897ef2183dbddf2 (patch) | |
tree | a3603533ab2c992f4c4d165392bd27abc6adb133 /modules/sparkler/particles.c | |
parent | 5bc0f3f05a856c839470942f9a8a1d3dbdc2ffce (diff) |
sparkler: don't _particles_draw() empty children
trivial per-particle savings
Diffstat (limited to 'modules/sparkler/particles.c')
-rw-r--r-- | modules/sparkler/particles.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/sparkler/particles.c b/modules/sparkler/particles.c index daf60ef..cce8d7f 100644 --- a/modules/sparkler/particles.c +++ b/modules/sparkler/particles.c @@ -231,7 +231,10 @@ static inline void _particles_draw(particles_t *particles, list_head_t *list, fb y = ((float)(p->props.position.y / (p->props.position.z - ZCONST)) * h2) + h2; particle_draw(particles, &p->public, x, y, fragment); - _particles_draw(particles, &p->children, fragment); + + if (!list_empty(&p->children)) { + _particles_draw(particles, &p->children, fragment); + } } } |