diff options
author | Tavian Barnes <tavianator@gmail.com> | 2009-07-01 20:07:12 +0000 |
---|---|---|
committer | Tavian Barnes <tavianator@gmail.com> | 2009-07-01 20:07:12 +0000 |
commit | 219fc9ac99e2c24acea011d7845a22d6b3700f75 (patch) | |
tree | 9532ecc162dd317fa47d841e2b77e3044e022976 /libdimension/canvas.c | |
parent | 74a94dd492f9bcabf442e3f0c89dbb7cf8463cf8 (diff) | |
download | dimension-219fc9ac99e2c24acea011d7845a22d6b3700f75.tar.xz |
Inline some functions: about a 5% performance boost.
Diffstat (limited to 'libdimension/canvas.c')
-rw-r--r-- | libdimension/canvas.c | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/libdimension/canvas.c b/libdimension/canvas.c index c2bd5cf..8d37c73 100644 --- a/libdimension/canvas.c +++ b/libdimension/canvas.c @@ -55,25 +55,3 @@ dmnsn_delete_canvas(dmnsn_canvas *canvas) free(canvas); } } - -/* Get a pixel at (x,y) */ -dmnsn_color -dmnsn_get_pixel(const dmnsn_canvas *canvas, unsigned int x, unsigned int y) -{ - return canvas->pixels[y*canvas->x + x]; -} - -/* Set a pixel at (x,y) */ -void -dmnsn_set_pixel(dmnsn_canvas *canvas, - unsigned int x, unsigned int y, dmnsn_color color) -{ - canvas->pixels[y*canvas->x + x] = color; -} - -/* Point to the pixel at (x,y) */ -dmnsn_color * -dmnsn_pixel_at(dmnsn_canvas *canvas, unsigned int x, unsigned int y) -{ - return canvas->pixels + y*canvas->x + x; -} |