From 45e219eac23ea4a8181f68300fed693d9ac361a0 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Fri, 30 May 2014 15:48:29 -0400 Subject: canvas: Use pool. --- libdimension/dimension/png.h | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'libdimension/dimension/png.h') diff --git a/libdimension/dimension/png.h b/libdimension/dimension/png.h index 244c481..c45a9bf 100644 --- a/libdimension/dimension/png.h +++ b/libdimension/dimension/png.h @@ -1,5 +1,5 @@ /************************************************************************* - * Copyright (C) 2009-2011 Tavian Barnes * + * Copyright (C) 2009-2014 Tavian Barnes * * * * This file is part of The Dimension Library. * * * @@ -20,7 +20,7 @@ /** * @file - * PNG import/export of canvases + * PNG import/export of canvases. */ #include @@ -34,16 +34,16 @@ int dmnsn_png_optimize_canvas(dmnsn_canvas *canvas); /** * Write a canvas to a file in PNG format. - * @param[in] canvas The canvas to write. - * @param[in,out] file The file to write to. + * @param[in] canvas The canvas to write. + * @param[in,out] file The file to write to. * @return 0 on success, non-zero on failure. */ int dmnsn_png_write_canvas(const dmnsn_canvas *canvas, FILE *file); /** * Write a canvas to a PNG file in the background. - * @param[in] canvas The canvas to write. - * @param[in,out] file The file to write to. + * @param[in] canvas The canvas to write. + * @param[in,out] file The file to write to. * @return A \ref dmnsn_future object, or NULL on failure. */ dmnsn_future *dmnsn_png_write_canvas_async(const dmnsn_canvas *canvas, @@ -51,18 +51,20 @@ dmnsn_future *dmnsn_png_write_canvas_async(const dmnsn_canvas *canvas, /** * Read a canvas from a PNG file. + * @param[in] pool The memory pool to allocate from. * @param[in,out] file The PNG file to read. * @return The new canvas, or NULL on failure. */ -dmnsn_canvas *dmnsn_png_read_canvas(FILE *file); +dmnsn_canvas *dmnsn_png_read_canvas(dmnsn_pool *pool, FILE *file); /** * Read a canvas from a PNG file in the background. - * @param[out] canvas The address of a non-allocated canvas object. The - * canvas object will be allocated and filled with the - * contents of \p file. Do not read from this object - * until the background task has finished. - * @param[in,out] file The PNG file to read. + * @param[out] canvas The address of a non-allocated canvas object. The canvas + * object will be allocated and filled with the contents of + * \p file. Do not read from this object until the + * background task has finished. + * @param[in] pool The memory pool to allocate from. + * @param[in,out] file The PNG file to read. * @return A \ref dmnsn_future object, or NULL on failure. */ -dmnsn_future *dmnsn_png_read_canvas_async(dmnsn_canvas **canvas, FILE *file); +dmnsn_future *dmnsn_png_read_canvas_async(dmnsn_canvas **canvas, dmnsn_pool *pool, FILE *file); -- cgit v1.2.3