diff options
author | Jason Sams <rjsams@android.com> | 2009-09-14 14:55:30 -0700 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2009-09-14 15:00:05 -0700 |
commit | 988f6ebb443846228db1749bdbdd7712d73d3f3d (patch) | |
tree | 7797a7c37886ae9e29a636f8c1bcd335a649ee68 | |
parent | 482d54bb0cd9e00fd929185c31fea3ad845d97bc (diff) | |
download | frameworks_base-988f6ebb443846228db1749bdbdd7712d73d3f3d.zip frameworks_base-988f6ebb443846228db1749bdbdd7712d73d3f3d.tar.gz frameworks_base-988f6ebb443846228db1749bdbdd7712d73d3f3d.tar.bz2 |
Minor perf tweak for fountain.
-rw-r--r-- | libs/rs/java/Fountain/res/raw/fountain.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/libs/rs/java/Fountain/res/raw/fountain.c b/libs/rs/java/Fountain/res/raw/fountain.c index 36516c2..57e10cf 100644 --- a/libs/rs/java/Fountain/res/raw/fountain.c +++ b/libs/rs/java/Fountain/res/raw/fountain.c @@ -20,20 +20,21 @@ int main(int launchID) { char r = Control->r * 255.f; char g = Control->g * 255.f; char b = Control->b * 255.f; - char a = 0xf0; + struct point_s * np = &p[newPart]; while (rate--) { - vec2Rand((float *)(p + newPart), rMax); - p[newPart].x = x; - p[newPart].y = y; - p[newPart].r = r; - p[newPart].g = g; - p[newPart].b = b; - p[newPart].a = a; + vec2Rand((float *)np, rMax); + np->x = x; + np->y = y; + np->r = r; + np->g = g; + np->b = b; + np->a = 0xf0; newPart++; if (newPart >= count) { newPart = 0; } + np++; } } |