diff options
| author | Ray Strode <rstrode@redhat.com> | 2008-06-02 16:06:51 -0400 |
|---|---|---|
| committer | Ray Strode <rstrode@redhat.com> | 2008-06-02 16:06:51 -0400 |
| commit | 1e03a9e52dbb9db5ccb5d64811939f23872a6487 (patch) | |
| tree | 7967d5956a266460c23d919116098c4b522029e5 /src/libply/ply-frame-buffer.c | |
| parent | f594e167b9a0504539bad9cebd0d5430ddbeb522 (diff) | |
| download | plymouth-1e03a9e52dbb9db5ccb5d64811939f23872a6487.tar.gz plymouth-1e03a9e52dbb9db5ccb5d64811939f23872a6487.tar.xz plymouth-1e03a9e52dbb9db5ccb5d64811939f23872a6487.zip | |
Add back a FIXME back to the gradient code
I accidentally dropped the FIXME when I wrote my comments
in the last commit.
Diffstat (limited to 'src/libply/ply-frame-buffer.c')
| -rw-r--r-- | src/libply/ply-frame-buffer.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/libply/ply-frame-buffer.c b/src/libply/ply-frame-buffer.c index b94f287..31246f5 100644 --- a/src/libply/ply-frame-buffer.c +++ b/src/libply/ply-frame-buffer.c @@ -714,6 +714,14 @@ ply_frame_buffer_fill_with_gradient (ply_frame_buffer_t *buffer, */ srand(100200); +/* FIXME: we assume RAND_MAX is at least 24 bits here, and it is on linux. + * On some platforms it's only 16its though. If that were true on linux, + * then NOISE_BITS would get effectively ignored, since those bits would + * always overlap with zeros. We could fix it by running rand() twice + * per channel generating 32-bits of noise, or by shifting the result of + * rand() over 8 bits, such that the zeros would be overlapping with the + * least significant fractional bits of the color channel instead. + */ #define NOISE() (rand () & NOISE_MASK) for (y = buffer->area.y; y < buffer->area.y + buffer->area.height; y++) |
