forked from minhngoc25a/freetype2
[sdf -> bsdf] Fixed memory leak.
* src/sdf/ftbsdf.c (bsdf_raster_render): Release the allocated distance map. Also, added a log of total memory allocated for generating SDF from bitmap.
This commit is contained in:
parent
d7a2e99bb0
commit
95846825f6
|
@ -1,3 +1,12 @@
|
|||
2020-08-3 Anuj Verma <anujv@iitbhilai.ac.in>
|
||||
|
||||
[sdf -> bsdf] Fixed memory leak.
|
||||
|
||||
* src/sdf/ftbsdf.c (bsdf_raster_render): Release the
|
||||
allocated distance map.
|
||||
Also, added a log of total memory allocated for
|
||||
generating SDF from bitmap.
|
||||
|
||||
2020-08-2 Anuj Verma <anujv@iitbhilai.ac.in>
|
||||
|
||||
[sdf -> bsdf] Fixed a bug with `finalize_sdf'.
|
||||
|
|
|
@ -965,7 +965,14 @@
|
|||
FT_CALL( edt8( &worker ) );
|
||||
FT_CALL( finalize_sdf( &worker, target ) );
|
||||
|
||||
FT_TRACE0(( "[bsdf] bsdf_raster_render: "
|
||||
"Total memory used = %ld\n",
|
||||
worker.width * worker.rows * sizeof( *worker.distance_map ) ));
|
||||
|
||||
Exit:
|
||||
if ( worker.distance_map )
|
||||
FT_FREE( worker.distance_map );
|
||||
|
||||
return error;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue