Mercurial > MadButterfly
changeset 868:f41ac71266bc
Remove rdman pointer from structure of paints.
Since a pointer of rdman is passed when calling free function of
paint, this pointer can be removed.
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Thu, 23 Sep 2010 10:51:25 +0800 |
parents | 4f8d53be9488 |
children | c18058fb48ee |
files | src/paint.c |
diffstat | 1 files changed, 3 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/src/paint.c Thu Sep 23 10:43:56 2010 +0800 +++ b/src/paint.c Thu Sep 23 10:51:25 2010 +0800 @@ -78,8 +78,6 @@ grad_stop_t *stops; int flags; mbe_pattern_t *ptn; - - redraw_man_t *rdman; /*!< \brief Used by paint_linear_free(). */ } paint_linear_t; #define LIF_DIRTY 0x1 @@ -111,7 +109,7 @@ if(linear->ptn) mbe_pattern_destroy(linear->ptn); paint_destroy(paint); - elmpool_elm_free(linear->rdman->paint_linear_pool, linear); + elmpool_elm_free(rdman->paint_linear_pool, linear); } paint_t *rdman_paint_linear_new(redraw_man_t *rdman, @@ -134,7 +132,6 @@ linear->stops = NULL; linear->flags = LIF_DIRTY; linear->ptn = NULL; - linear->rdman = rdman; return (paint_t *)linear; } @@ -171,8 +168,6 @@ grad_stop_t *stops; int flags; mbe_pattern_t *ptn; - - redraw_man_t *rdman; /*!< \brief Used by paint_radial_free() */ } paint_radial_t; #define RDF_DIRTY 0x1 @@ -202,7 +197,7 @@ if(radial->ptn) mbe_pattern_destroy(radial->ptn); paint_destroy(paint); - elmpool_elm_free(radial->rdman->paint_radial_pool, radial); + elmpool_elm_free(rdman->paint_radial_pool, radial); } paint_t *rdman_paint_radial_new(redraw_man_t *rdman, @@ -222,7 +217,6 @@ radial->stops = NULL; radial->flags = RDF_DIRTY; radial->ptn = NULL; - radial->rdman = rdman; return (paint_t *)radial; } @@ -257,8 +251,6 @@ mb_img_data_t *img; mbe_surface_t *surf; mbe_pattern_t *ptn; - - redraw_man_t *rdman; /*!< \brief Used by paint_image_free() */ } paint_image_t; int _paint_image_size = sizeof(paint_image_t); @@ -281,7 +273,7 @@ img_data = paint_img->img; MB_IMG_DATA_FREE(img_data); paint_destroy(&paint_img->paint); - elmpool_elm_free(paint_img->rdman->paint_image_pool, paint_img); + elmpool_elm_free(rdman->paint_image_pool, paint_img); } /*! \brief Create an image painter. @@ -302,7 +294,6 @@ paint_init(&paint->paint, MBP_IMAGE, paint_image_prepare, paint_image_free); paint->img = img; - paint->rdman = rdman; paint->surf = mbe_image_surface_create_for_data(img->content, img->fmt, img->w,