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/canvas.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'libdimension/dimension/canvas.h') diff --git a/libdimension/dimension/canvas.h b/libdimension/dimension/canvas.h index ba549ad..d03a37e 100644 --- a/libdimension/dimension/canvas.h +++ b/libdimension/dimension/canvas.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. * * * @@ -39,8 +39,6 @@ typedef struct dmnsn_canvas { * at (a,b) is accessible as pixels[b*width + a]. */ dmnsn_tcolor *pixels; - - DMNSN_REFCOUNT; /**< Reference count. */ } dmnsn_canvas; /** @@ -63,17 +61,12 @@ typedef struct dmnsn_canvas_optimizer { /** * Allocate a new canvas. - * @param[in] width The width of the canvas to allocate (in pixels). + * @param[in] pool The memory pool to allocate from. + * @param[in] width The width of the canvas to allocate (in pixels). * @param[in] height The height of the canvas to allocate (in pixels). * @return The allocated canvas. */ -dmnsn_canvas *dmnsn_new_canvas(size_t width, size_t height); - -/** - * Delete a canvas. - * @param[in,out] canvas The canvas to delete. - */ -void dmnsn_delete_canvas(dmnsn_canvas *canvas); +dmnsn_canvas *dmnsn_new_canvas(dmnsn_pool *pool, size_t width, size_t height); /** * Set a canvas optimizer -- cgit v1.2.3