softbuffer/examples
Ian Douglas Scott edc5c76180 examples: Avoid dividing index to get x, y; calculate index from x, y
Division is more expensive than multiplication, and this doesn't seem to
be optimize away, so iterating over `(0..height)` and `(0..width)`
provides better performance.

It's good to have the example show the best way to write code using
softbuffer, and this helps when using examples as a benchmark. This will
also be needed if Softbuffer supports formats where `stride` isn't just
`width * pixel_size`, and needs alignment.
2023-04-11 12:21:50 -07:00
..
animation.rs examples: Avoid dividing index to get x, y; calculate index from x, y 2023-04-11 12:21:50 -07:00
fruit.jpg Added fruit example to show a more recognizable image for debugging 2022-01-18 22:07:17 -06:00
fruit.jpg.license Added fruit example to show a more recognizable image for debugging 2022-01-18 22:07:17 -06:00
fruit.rs Owned pixel buffer for no-copy presentation 2023-04-06 10:30:59 +03:00
libxcb.rs Owned pixel buffer for no-copy presentation 2023-04-06 10:30:59 +03:00
rectangle.rs examples: Avoid dividing index to get x, y; calculate index from x, y 2023-04-11 12:21:50 -07:00
winit.rs examples: Avoid dividing index to get x, y; calculate index from x, y 2023-04-11 12:21:50 -07:00
winit_wrong_sized_buffer.rs Owned pixel buffer for no-copy presentation 2023-04-06 10:30:59 +03:00